Package com.sun.xml.xsom

Examples of com.sun.xml.xsom.XSParticle


        if (fClass == null) {
            return false;
        }
        for (FieldOutline f : fClass.getDeclaredFields()) {
            if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
                XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
                XSTerm term = particle.getTerm();
                if (term.isElementDecl() && term.asElementDecl().getDefaultValue() != null) {
                    return true;
                }
            }
        }
View Full Code Here


                XmlString xmlDefaultValue = null;
                XSType xsType = null;
                boolean isElement = false;
                boolean isRequiredAttr = true;
                if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
                    XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
                    XSTerm term = particle.getTerm();
                    XSElementDecl element = null;

                    if (term.isElementDecl()) {
                        element = particle.getTerm().asElementDecl();
                        xmlDefaultValue = element.getDefaultValue();                       
                        xsType = element.getType();
                        isElement = true;
                    }
                } else if (f.getPropertyInfo().getSchemaComponent() instanceof XSAttributeUse) {
View Full Code Here

        if (fClass == null) {
            return false;
        }
        for (FieldOutline f : fClass.getDeclaredFields()) {
            if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
                XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
                XSTerm term = particle.getTerm();
                if (term.isElementDecl() && term.asElementDecl().getDefaultValue() != null) {
                    return true;
                }
            }
        }
View Full Code Here

                XmlString xmlDefaultValue = null;
                XSType xsType = null;
                boolean isElement = false;
                boolean isRequiredAttr = true;
                if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
                    XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
                    XSTerm term = particle.getTerm();
                    XSElementDecl element = null;

                    if (term.isElementDecl()) {
                        element = particle.getTerm().asElementDecl();
                        xmlDefaultValue = element.getDefaultValue();                       
                        xsType = element.getType();
                        isElement = true;
                    }
                } else if (f.getPropertyInfo().getSchemaComponent() instanceof XSAttributeUse) {
View Full Code Here

    flds = new HashMap<String, String>();
  }

  private void findElementType(XSComplexType xtype) {
    XSContentType xsContentType = xtype.getContentType();
    XSParticle particle = xsContentType.asParticle();

    if(particle != null){
      XSTerm term = particle.getTerm();
      if(term.isModelGroup()){
        XSModelGroup xsModelGroup = term.asModelGroup();
        XSParticle[] particles = xsModelGroup.getChildren();
        for(XSParticle p : particles ){
          XSTerm pterm = p.getTerm();
View Full Code Here

  // #########################################

  public static boolean isFieldMarkedAsRequiredOrMandatoryInXSDSchema(final FieldOutline fo) {
    final CPropertyInfo pi = fo.getPropertyInfo();
    if (pi.getSchemaComponent() instanceof XSParticle) {
      final XSParticle particle = (XSParticle) pi.getSchemaComponent();
      if (particle.getMinOccurs() > 0) {
        // LOG.info("!!! MinOccurs of Element [" + pi.getName(false) + "] is [" + particle.getMinOccurs() + "].");
      }
      return particle.getMinOccurs() > 0;
    } else if (pi.getSchemaComponent() instanceof XSAttributeUse) {
      final XSAttributeUse attributeUse = (XSAttributeUse) pi.getSchemaComponent();
      if (attributeUse.isRequired()) {
        // LOG.info("!!! Required of Attribute [" + pi.getName(false) + "] is [" + attributeUse.isRequired() + "].");
      }
View Full Code Here

                XmlString xmlDefaultValue = null;
                XSType xsType = null;
                boolean isElement = false;

                if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
                    XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
                    XSTerm term = particle.getTerm();
                    XSElementDecl element = null;

                    if (term.isElementDecl()) {
                        element = particle.getTerm().asElementDecl();
                        xmlDefaultValue = element.getDefaultValue();                       
                        xsType = element.getType();
                        isElement = true;
                    }
                } else if (f.getPropertyInfo().getSchemaComponent() instanceof XSAttributeUse) {
View Full Code Here

        if (fClass == null) {
            return false;
        }
        for (FieldOutline f : fClass.getDeclaredFields()) {
            if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
                XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
                XSTerm term = particle.getTerm();
                if (term.isElementDecl() && term.asElementDecl().getDefaultValue() != null) {
                    return true;
                }
            }
        }
View Full Code Here

                XmlString xmlDefaultValue = null;
                XSType xsType = null;
                boolean isElement = false;

                if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
                    XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
                    XSTerm term = particle.getTerm();
                    XSElementDecl element = null;

                    if (term.isElementDecl()) {
                        element = particle.getTerm().asElementDecl();
                        xmlDefaultValue = element.getDefaultValue();                       
                        xsType = element.getType();
                        isElement = true;
                    }
                } else if (f.getPropertyInfo().getSchemaComponent() instanceof XSAttributeUse) {
View Full Code Here

                XmlString xmlDefaultValue = null;
                XSType xsType = null;
                boolean isElement = false;

                if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
                    XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
                    XSTerm term = particle.getTerm();
                    XSElementDecl element = null;

                    if (term.isElementDecl()) {
                        element = particle.getTerm().asElementDecl();
                        xmlDefaultValue = element.getDefaultValue();                       
                        xsType = element.getType();
                        isElement = true;
                    }
                } else if (f.getPropertyInfo().getSchemaComponent() instanceof XSAttributeUse) {
View Full Code Here

TOP

Related Classes of com.sun.xml.xsom.XSParticle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.