Examples of XSElementDecl


Examples of com.sun.org.apache.xerces.internal.impl.xs.XSElementDecl

    }

    private void addGlobalElementDecls(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
        XSNamedMap components = srcGrammar.getComponents(XSConstants.ELEMENT_DECLARATION);
        int len = components.getLength();
        XSElementDecl srcDecl, dstDecl;

        // add global components
        for (int i=0; i<len; i++) {
            srcDecl = (XSElementDecl) components.item(i);
            dstDecl = dstGrammar.getGlobalElementDecl(srcDecl.getName());
            if (dstDecl == null) {
                dstGrammar.addGlobalElementDecl(srcDecl);
            }
            else if (dstDecl != srcDecl){
                // TODO: if not tolerating duplicate, generate an error message
View Full Code Here

Examples of com.sun.xml.internal.xsom.XSElementDecl

        //     <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

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

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

Examples of com.sun.xml.xsom.XSElementDecl

        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

Examples of com.sun.xml.xsom.XSElementDecl

      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

Examples of com.sun.xml.xsom.XSElementDecl

            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

Examples of com.sun.xml.xsom.XSElementDecl

        //     <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

Examples of com.sun.xml.xsom.XSElementDecl

                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

Examples of com.sun.xml.xsom.XSElementDecl

        // 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
TOP
Copyright © 2018 www.massapi.com. 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.