Package com.sun.xml.internal.bind.v2.schemagen.xmlschema

Examples of com.sun.xml.internal.bind.v2.schemagen.xmlschema.ExplicitGroup


            Element e =  xsd._element(Element.class);
            e._attribute("name", wp.getName().getLocalPart());
            e.type(wp.getName());
            ComplexType ct =  xsd._element(ComplexType.class);
            ct._attribute("name", wp.getName().getLocalPart());
            ExplicitGroup sq = ct.sequence();           
            for (ParameterImpl p : wp.getWrapperChildren() ) if (p.getBinding().isBody()) addChild(sq, p);
        }
        for(Schema xsd: xsds.values()) xsd.commit();
    }
View Full Code Here


                    // TODO: entry, key, and value are always unqualified. that needs to be fixed, too.
                    // TODO: we need to generate the corresponding element declaration, if they are qualified
                    e = p.sequence().element();
                    e.name("entry").minOccurs(0).maxOccurs("unbounded");

                    ExplicitGroup seq = e.complexType().sequence();
                    writeKeyOrValue(seq, "key", mp.getKeyType());
                    writeKeyOrValue(seq, "value", mp.getValueType());
                }
            };
        }
View Full Code Here

            // hold the ct open in case we need to generate @mixed below...
            ct.block();

            // either <sequence> or <all>
            ExplicitGroup compositor = null;

            // only necessary if this type has a base class we need to extend from
            AttrDecls contentModel = ct;

            // if there is a base class, we need to generate an extension in the schema
            final ClassInfo<T,C> bc = c.getBaseClass();
            if (bc != null) {
                if(bc.hasValueProperty()) {
                    // extending complex type with simple content
                    SimpleExtension se = ct.simpleContent().extension();
                    contentModel = se;
                    se.base(bc.getTypeName());
                } else {
                    ComplexExtension ce = ct.complexContent().extension();
                    contentModel = ce;

                    ce.base(bc.getTypeName());
                    // TODO: what if the base type is anonymous?
                    // ordered props go in a sequence, unordered go in an all
                    if( c.isOrdered() ) {
                        compositor = ce.sequence();
                    } else {
                        compositor = ce.all();
                    }
                }
            }

            // iterate over the properties
            if (c.hasProperties()) {
                if( compositor == null ) { // if there is no extension base, create a top level seq
                    // ordered props go in a sequence, unordered go in an all
                    if( c.isOrdered() ) {
                        compositor = ct.sequence();
                    } else {
                        compositor = ct.all();
                    }
                }

                // block writing the compositor because we might need to
                // write some out of order attributes to handle min/maxOccurs
                compositor.block();

                for (PropertyInfo<T,C> p : c.getProperties()) {
                    // handling for <complexType @mixed='true' ...>
                    if(p instanceof ReferencePropertyInfo && ((ReferencePropertyInfo)p).isMixed()) {
                        ct.mixed(true);
                    }
                    writeProperty(p, contentModel, compositor);
                }

                compositor.commit();
            }

            // look for wildcard attributes
            if( c.hasAttributeWildcard()) {
                // TODO: not type safe
View Full Code Here

            // TODO: entry, key, and value are always unqualified. that needs to be fixed, too.
            // TODO: we need to generate the corresponding element declaration, if they are qualified
            e = p.sequence().element();
            e.name("entry").minOccurs(0).maxOccurs("unbounded");

            ExplicitGroup seq = e.complexType().sequence();
            writeKeyOrValue(seq, "key", mp.getKeyType());
            writeKeyOrValue(seq, "value", mp.getValueType());
        }
View Full Code Here

                    // TODO: entry, key, and value are always unqualified. that needs to be fixed, too.
                    // TODO: we need to generate the corresponding element declaration, if they are qualified
                    e = p.sequence().element();
                    e.name("entry").minOccurs(0).maxOccurs("unbounded");

                    ExplicitGroup seq = e.complexType().sequence();
                    writeKeyOrValue(seq, "key", mp.getKeyType());
                    writeKeyOrValue(seq, "value", mp.getValueType());
                }
            };
        }
View Full Code Here

                    // TODO: entry, key, and value are always unqualified. that needs to be fixed, too.
                    // TODO: we need to generate the corresponding element declaration, if they are qualified
                    e = p.sequence().element();
                    e.name("entry").minOccurs(0).maxOccurs("unbounded");

                    ExplicitGroup seq = e.complexType().sequence();
                    writeKeyOrValue(seq, "key", mp.getKeyType());
                    writeKeyOrValue(seq, "value", mp.getValueType());
                }
            };
        }
View Full Code Here

                    // TODO: entry, key, and value are always unqualified. that needs to be fixed, too.
                    // TODO: we need to generate the corresponding element declaration, if they are qualified
                    e = p.sequence().element();
                    e.name("entry").minOccurs(0).maxOccurs("unbounded");

                    ExplicitGroup seq = e.complexType().sequence();
                    writeKeyOrValue(seq, "key", mp.getKeyType());
                    writeKeyOrValue(seq, "value", mp.getValueType());
                }
            };
        }
View Full Code Here

                    // TODO: entry, key, and value are always unqualified. that needs to be fixed, too.
                    // TODO: we need to generate the corresponding element declaration, if they are qualified
                    e = p.sequence().element();
                    e.name("entry").minOccurs(0).maxOccurs("unbounded");

                    ExplicitGroup seq = e.complexType().sequence();
                    writeKeyOrValue(seq, "key", mp.getKeyType());
                    writeKeyOrValue(seq, "value", mp.getValueType());
                }
            };
        }
View Full Code Here

                    // TODO: entry, key, and value are always unqualified. that needs to be fixed, too.
                    // TODO: we need to generate the corresponding element declaration, if they are qualified
                    e = p.sequence().element();
                    e.name("entry").minOccurs(0).maxOccurs("unbounded");

                    ExplicitGroup seq = e.complexType().sequence();
                    writeKeyOrValue(seq, "key", mp.getKeyType());
                    writeKeyOrValue(seq, "value", mp.getValueType());
                }
            };
        }
View Full Code Here

/* 1238 */           ComplexType p = e.complexType();
/*      */
/* 1242 */           e = p.sequence().element();
/* 1243 */           e.name("entry").minOccurs(0).maxOccurs("unbounded");
/*      */
/* 1245 */           ExplicitGroup seq = e.complexType().sequence();
/* 1246 */           XmlSchemaGenerator.Namespace.this.writeKeyOrValue(seq, "key", this.val$mp.getKeyType());
/* 1247 */           XmlSchemaGenerator.Namespace.this.writeKeyOrValue(seq, "value", this.val$mp.getValueType());
/*      */         } } ;
/*      */     }
View Full Code Here

TOP

Related Classes of com.sun.xml.internal.bind.v2.schemagen.xmlschema.ExplicitGroup

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.