Package com.sun.xml.xsom

Examples of com.sun.xml.xsom.XSElementDecl


                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) {
                    XSAttributeUse attributeUse = (XSAttributeUse)f.getPropertyInfo().getSchemaComponent();
                    XSAttributeDecl decl = attributeUse.getDecl();
View Full Code Here


                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) {
                    XSAttributeUse attributeUse = (XSAttributeUse)f.getPropertyInfo().getSchemaComponent();
                    XSAttributeDecl decl = attributeUse.getDecl();
View Full Code Here

        XSModelGroup xsModelGroup = term.asModelGroup();
        XSParticle[] particles = xsModelGroup.getChildren();
        for(XSParticle p : particles ){
          XSTerm pterm = p.getTerm();
          if(pterm.isElementDecl()){
            XSElementDecl element = pterm.asElementDecl();
            String name = element.getName();
            log.debug(name);
            XSType type = element.getType();

            while(type != null) {
              String typeName = type.getName();
              if(typeName != null &&(typeName.equals("long") ||
                  typeName.equals("string") ||
View Full Code Here

      parser.parse(fname);
      XSSchemaSet xsSchema = parser.getResult();
      XSSchema schema = xsSchema.getSchema(1);
      File file = new File(fname);

      XSElementDecl element = schema.getElementDecl(file.getName().replace(".xsd", ""));

      if(element != null) {
        log.debug("element is " + element.getName());
        bufferName = element.getName();
        XSType xtype = element.getType();
        if(xtype.isComplexType()) {
          findElementType(xtype.asComplexType());
          rc = true;
        }
      }
View Full Code Here

            type = ( (XSAttributeUse) xs ).getDecl().getType();
        }
        else if ( xs instanceof XSElementDecl )
        {
            col = new Column();
            final XSElementDecl decl = (XSElementDecl) xs;
            col.setNullable( decl.isNillable() );
            columnEmpty = false;
            type = ( (XSElementDecl) xs ).getType().asSimpleType();
        }

        if ( type != null )
View Full Code Here

        //     <xs:annotation><xs:appinfo>
        //       <hyperjaxb:... />
        //
        // would be picked up
        if(src.getTerm().isElementDecl()) {
            XSElementDecl xed = src.getTerm().asElementDecl();
            if(xed.isGlobal())
                return getCustomizations((XSComponent)src);
        }

        return getCustomizations(src,src.getTerm());
    }
View Full Code Here

                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) {
                    XSAttributeUse attributeUse = (XSAttributeUse)f.getPropertyInfo().getSchemaComponent();
                    XSAttributeDecl decl = attributeUse.getDecl();
View Full Code Here

        // UGLY CODE WARNING
        XSComponent top = getReferer();

        if( top instanceof XSElementDecl ) {
            // if the parent is element type, its content type must be us.
            XSElementDecl eref = (XSElementDecl)top;
            assert eref.getType()==type;

            // for elements, you can't use <property>,
            // so we allow javaType to appear directly.
            BindInfo info = builder.getBindInfo(top);
            BIConversion conv = info.get(BIConversion.class);
View Full Code Here

   TreeNode currentNode;

   public XSOMSchemaTreeWalker(XSSchema schema, String rootName) {
      super();
      this.schema = schema;
      XSElementDecl decl = schema.getElementDecl(rootName);
      XSComplexType type = schema.getComplexType(decl.getType().getName());
      root = new TreeNode("infinispan", new TreeNode());
      root.setType(type);
      currentNode = root;
      complexType(type);
   }
View Full Code Here

   private TreeNode currentNode;

   public XSOMSchemaTreeWalker(XSSchema schema, String rootName) {
      super();
      this.schema = schema;
      XSElementDecl decl = schema.getElementDecl(rootName);
      XSComplexType type = schema.getComplexType(decl.getType().getName());
      root = new TreeNode("infinispan", new TreeNode());
      root.setType(type);
      currentNode = root;
      complexType(type);
   }
View Full Code Here

TOP

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

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.