Examples of XSComplexType


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

            if( opt.mode==Mode.GBIND ) {
                try {
                    XSSchemaSet xss = new ModelLoader(opt, new JCodeModel(), receiver).loadXMLSchema();
                    Iterator<XSComplexType> it = xss.iterateComplexTypes();
                    while (it.hasNext()) {
                        XSComplexType ct =  it.next();
                        XSParticle p = ct.getContentType().asParticle();
                        if(p==null)     continue;

                        Expression tree = ExpressionBuilder.createTree(p);
                        System.out.println("Graph for "+ct.getName());
                        System.out.println(tree.toString());
                        Graph g = new Graph(tree);
                        System.out.println(g.toString());
                        System.out.println();
                    }
View Full Code Here

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

                ,null,1,1);
        public List<XSComplexType> getSubtypes() {
            ArrayList subtypeList = new ArrayList();
            Iterator<XSComplexType> cTypes = getRoot().iterateComplexTypes();
            while (cTypes.hasNext()) {
                XSComplexType cType= cTypes.next();
                XSType base = cType.getBaseType();
                if ((base != null) && (base.equals(this))) {
                    subtypeList.add(cType);
                }
            }
            return subtypeList;
View Full Code Here

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

        return o;
    }

    public Iterator<XSAttributeUse> iterateAttributeUses() {

        XSComplexType baseType = getBaseType().asComplexType();

        if( baseType==null )    return super.iterateAttributeUses();

        return new Iterators.Union<XSAttributeUse>(
            new Iterators.Filter<XSAttributeUse>(baseType.iterateAttributeUses()) {
                protected boolean matches(XSAttributeUse value) {
                    XSAttributeDecl u = value.getDecl();
                    UName n = new UName(u.getTargetNamespace(),u.getName());
                    return !prohibitedAtts.contains(n);
                }
View Full Code Here

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

            },
            super.iterateAttributeUses() );
    }

    public Collection<XSAttributeUse> getAttributeUses() {
        XSComplexType baseType = getBaseType().asComplexType();

        if( baseType==null )    return super.getAttributeUses();

        // TODO: this is fairly inefficient
        Map<UName,XSAttributeUse> uses = new HashMap<UName, XSAttributeUse>();
        for( XSAttributeUse a : baseType.getAttributeUses())
            uses.put(new UName(a.getDecl()),a);

        uses.keySet().removeAll(prohibitedAtts);

        for( XSAttributeUse a : super.getAttributeUses())
View Full Code Here

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

    public List<XSComplexType> getSubtypes() {
        ArrayList subtypeList = new ArrayList();
        Iterator<XSComplexType> cTypes = getRoot().iterateComplexTypes();
        while (cTypes.hasNext()) {
            XSComplexType cType= cTypes.next();
            XSType base = cType.getBaseType();
            if ((base != null) && (base.equals(this))) {
                subtypeList.add(cType);
            }
        }
        return subtypeList;
View Full Code Here

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

    private static boolean isSubstitutable( XSType _base, XSType derived ) {
        // too ugly to the point that it's almost unbearable.
        // I mean, it's not even transitive. Thus we end up calling this method
        // for each candidate
        if( _base.isComplexType() ) {
            XSComplexType base = _base.asComplexType();

            for( ; base!=derived; derived=derived.getBaseType() ) {
                if( base.isSubstitutionProhibited( derived.getDerivationMethod() ) )
                    return false;    // Type Derivation OK (Complex)-1
            }
            return true;
        } else {
            // simple type don't have any @block
View Full Code Here

Examples of com.sun.xml.xsom.XSComplexType

            XSAttributeDecl aref = (XSAttributeDecl)top;
            assert aref.getType()==type;
            detectJavaTypeCustomization();
        } else
        if( top instanceof XSComplexType ) {
            XSComplexType tref = (XSComplexType)top;
            assert tref.getBaseType()==type || tref.getContentType()==type;
            detectJavaTypeCustomization();
        } else
        if( top == type ) {
            // this means the simple type is built by itself and
            // not because it's referenced by something.
View Full Code Here

Examples of com.sun.xml.xsom.XSComplexType

   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

Examples of com.sun.xml.xsom.XSComplexType

      if (type.getDerivationMethod() == XSType.RESTRICTION) {
         type.getContentType().visit(this);
      } else {
         XSType baseType = type.getBaseType();
         String name = baseType.getName();
         XSComplexType parentType = schema.getComplexType(name);
         complexType(parentType);
         type.getExplicitContent().visit(this);
      }
   }
View Full Code Here

Examples of com.sun.xml.xsom.XSComplexType

   public void xpath(XSXPath xp) {
   }

   public void elementDecl(XSElementDecl decl) {
      XSComplexType type = schema.getComplexType(decl.getType().getName());
      if (!decl.isAbstract()) {
         TreeNode n = new TreeNode(decl.getName(), currentNode);
         /*System.out.println("Created node " + n.getName() + ", parent is "
                  + n.getParent().getName() + " depth is " + n.getDepth());*/
         currentNode.getChildren().add(n);
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.