Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.XSObject


  }
 
  private void parseXSModelGroup(TagInfo tagInfo, List tagList, XSModelGroup term){
    XSObjectList list = ((XSModelGroup)term).getParticles();
    for(int i=0;i<list.getLength();i++){
      XSObject obj = list.item(i);
     
      if(obj instanceof XSParticle){
        XSTerm term2 = ((XSParticle)obj).getTerm();
       
        if(term2 instanceof XSElementDeclaration){
View Full Code Here


      //Now that we have the schema, lets build the types for the schema
      XSNamedMap xsnamedmap = xsmodel.getComponents(XSConstants.TYPE_DEFINITION);
      int len = xsnamedmap != null ? xsnamedmap.getLength() : 0;
      for (int i = 0; i < len; i++)
      {
         XSObject type = xsnamedmap.item(i);
         if (type instanceof XSComplexTypeDefinition)
         {
            XSComplexTypeDefinition ctype = (XSComplexTypeDefinition)type;
            //Ignore xsd:anyType
            String nsuri = type.getNamespace();
            String tname = type.getName();
            if (Constants.NS_SCHEMA_XSD.equals(nsuri) && "anyType".equals(tname)) continue;
            xsdJava.createJavaFile(ctype, dirloc.getPath(), packageName, xsmodel);
         }
         else if (type instanceof XSSimpleTypeDefinition)
         {
            XSSimpleTypeDefinition stype = (XSSimpleTypeDefinition)type;
            //Ignore xsd:anyType
            String nsuri = type.getNamespace();
            String tname = type.getName();
            if (Constants.NS_SCHEMA_XSD.equals(nsuri) && "anyType".equals(tname)) continue;
            xsdJava.createJavaFile(stype, dirloc.getPath(), packageName, xsmodel);
         }
      }
View Full Code Here

                if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global element declarations: {namespace} name ");
          System.out.println("*************************************************");
                    for (int i = 0; i < map.getLength(); i++) {
                        XSObject item = map.item(i);
                        System.out.println("{" + item.getNamespace() + "}" + item.getName());
                    }
                }
                // attribute declarations
                map = model.getComponents(XSConstants.ATTRIBUTE_DECLARATION);
                if (map.getLength() != 0) {
          System.out.println("*************************************************");
                    System.out.println("* Global attribute declarations: {namespace} name");
          System.out.println("*************************************************");
                    for (int i = 0; i < map.getLength(); i++) {
                        XSObject item = map.item(i);
                        System.out.println("{" + item.getNamespace() + "}" + item.getName());
                    }
                }
        // notation declarations
        map = model.getComponents(XSConstants.TYPE_DEFINITION);
        if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global type declarations: {namespace} name");
          System.out.println("*************************************************");
          for (int i = 0; i < map.getLength(); i++) {
            XSObject item = map.item(i);
            System.out.println("{" + item.getNamespace() + "}" + item.getName());
          }
        }
               
        // notation declarations
        map = model.getComponents(XSConstants.NOTATION_DECLARATION);
        if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global notation declarations: {namespace} name");
          System.out.println("*************************************************");
          for (int i = 0; i < map.getLength(); i++) {
            XSObject item = map.item(i);
            System.out.println("{" + item.getNamespace() + "}" + item.getName());
          }
        }

            }

View Full Code Here

                if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global element declarations: {namespace} name ");
          System.out.println("*************************************************");
                    for (int i = 0; i < map.getLength(); i++) {
                        XSObject item = map.item(i);
                        System.out.println("{" + item.getNamespace() + "}" + item.getName());
                    }
                }
                // attribute declarations
                map = model.getComponents(XSConstants.ATTRIBUTE_DECLARATION);
                if (map.getLength() != 0) {
          System.out.println("*************************************************");
                    System.out.println("* Global attribute declarations: {namespace} name");
          System.out.println("*************************************************");
                    for (int i = 0; i < map.getLength(); i++) {
                        XSObject item = map.item(i);
                        System.out.println("{" + item.getNamespace() + "}" + item.getName());
                    }
                }
        // notation declarations
        map = model.getComponents(XSConstants.TYPE_DEFINITION);
        if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global type declarations: {namespace} name");
          System.out.println("*************************************************");
          for (int i = 0; i < map.getLength(); i++) {
            XSObject item = map.item(i);
            System.out.println("{" + item.getNamespace() + "}" + item.getName());
          }
        }
               
        // notation declarations
        map = model.getComponents(XSConstants.NOTATION_DECLARATION);
        if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global notation declarations: {namespace} name");
          System.out.println("*************************************************");
          for (int i = 0; i < map.getLength(); i++) {
            XSObject item = map.item(i);
            System.out.println("{" + item.getNamespace() + "}" + item.getName());
          }
        }

            }

View Full Code Here

                if (fMaps != null) {
                    return (XSObject)fMaps[i].get(localName);
                }
                // Otherwise (it's created from an array)
                // go through the array to find a matching name
                XSObject ret;
                for (int j = 0; j < fLength; j++) {
                    ret = fArray[j];
                    if (ret.getName().equals(localName)) {
                        return ret;
                    }
                }
                return null;
            }
View Full Code Here

        // Defer creation of the entry set until it is actually needed.
        if (fEntrySet == null) {
            final int length = getLength();
            final XSNamedMapEntry[] entries = new XSNamedMapEntry[length];
            for (int i = 0; i < length; ++i) {
                XSObject xso = item(i);
                entries[i] = new XSNamedMapEntry(new QName(xso.getNamespace(), xso.getName()), xso);
            }
            // Create a view of this immutable map.
            fEntrySet = new AbstractSet() {
                public Iterator iterator() {
                    return new Iterator() {
View Full Code Here

    private boolean canAddComponents(Vector components) {
        final int size = components.size();
        final XSDDescription desc = new XSDDescription();
        for (int i=0; i<size; i++) {
            XSObject component = (XSObject) components.elementAt(i);
            if (!canAddComponent(component, desc)) {
                return false;
            }
        }
        return true;
View Full Code Here

                newComponents.add(components[i]);
            }
        }
       
        for (int i=0; i<newComponents.size(); i++) {
            final XSObject component = (XSObject) newComponents.elementAt(i);
            expandRelatedComponents(component, newComponents, dependencies);
        }
       
        return newComponents;
    }
View Full Code Here

                if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global element declarations: {namespace} name ");
          System.out.println("*************************************************");
                    for (int i = 0; i < map.getLength(); i++) {
                        XSObject item = map.item(i);
                        System.out.println("{" + item.getNamespace() + "}" + item.getName());
                    }
                }
                // attribute declarations
                map = model.getComponents(XSConstants.ATTRIBUTE_DECLARATION);
                if (map.getLength() != 0) {
          System.out.println("*************************************************");
                    System.out.println("* Global attribute declarations: {namespace} name");
          System.out.println("*************************************************");
                    for (int i = 0; i < map.getLength(); i++) {
                        XSObject item = map.item(i);
                        System.out.println("{" + item.getNamespace() + "}" + item.getName());
                    }
                }
        // notation declarations
        map = model.getComponents(XSConstants.TYPE_DEFINITION);
        if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global type declarations: {namespace} name");
          System.out.println("*************************************************");
          for (int i = 0; i < map.getLength(); i++) {
            XSObject item = map.item(i);
            System.out.println("{" + item.getNamespace() + "}" + item.getName());
          }
        }
               
        // notation declarations
        map = model.getComponents(XSConstants.NOTATION_DECLARATION);
        if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global notation declarations: {namespace} name");
          System.out.println("*************************************************");
          for (int i = 0; i < map.getLength(); i++) {
            XSObject item = map.item(i);
            System.out.println("{" + item.getNamespace() + "}" + item.getName());
          }
        }

            }

View Full Code Here

                if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global element declarations: {namespace} name ");
          System.out.println("*************************************************");
                    for (int i = 0; i < map.getLength(); i++) {
                        XSObject item = map.item(i);
                        System.out.println("{" + item.getNamespace() + "}" + item.getName());
                    }
                }
                // attribute declarations
                map = model.getComponents(XSConstants.ATTRIBUTE_DECLARATION);
                if (map.getLength() != 0) {
          System.out.println("*************************************************");
                    System.out.println("* Global attribute declarations: {namespace} name");
          System.out.println("*************************************************");
                    for (int i = 0; i < map.getLength(); i++) {
                        XSObject item = map.item(i);
                        System.out.println("{" + item.getNamespace() + "}" + item.getName());
                    }
                }
        // notation declarations
        map = model.getComponents(XSConstants.TYPE_DEFINITION);
        if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global type declarations: {namespace} name");
          System.out.println("*************************************************");
          for (int i = 0; i < map.getLength(); i++) {
            XSObject item = map.item(i);
            System.out.println("{" + item.getNamespace() + "}" + item.getName());
          }
        }
               
        // notation declarations
        map = model.getComponents(XSConstants.NOTATION_DECLARATION);
        if (map.getLength() != 0) {
          System.out.println("*************************************************");
          System.out.println("* Global notation declarations: {namespace} name");
          System.out.println("*************************************************");
          for (int i = 0; i < map.getLength(); i++) {
            XSObject item = map.item(i);
            System.out.println("{" + item.getNamespace() + "}" + item.getName());
          }
        }

            }

View Full Code Here

TOP

Related Classes of org.apache.xerces.xs.XSObject

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.