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

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


                    ComplexType ct = ((ComplexTypeHost)parent).complexType();
                    writeName(c,ct);
                    if(c.isFinal())
                        ct._final("extension restriction");

                    SimpleExtension se = ct.simpleContent().extension();
                    se.block(); // because we might have attribute before value
                    for (PropertyInfo<T,C> p : c.getProperties()) {
                        switch (p.kind()) {
                        case ATTRIBUTE:
                            handleAttributeProp((AttributePropertyInfo<T,C>)p,se);
                            break;
                        case VALUE:
                            TODO.checkSpec("what if vp.isCollection() == true?");
                            ValuePropertyInfo vp = (ValuePropertyInfo) p;
                            se.base(vp.getTarget().getTypeName());
                            break;
                        case ELEMENT:   // error
                        case REFERENCE: // error
                        default:
                            assert false;
                            throw new IllegalStateException();
                        }
                    }
                    se.commit();
                }
                TODO.schemaGenerator("figure out what to do if bc != null");
                TODO.checkSpec("handle sec 8.9.5.2, bullet #4");
                // Java types containing value props can only contain properties of type
                // ValuePropertyinfo and AttributePropertyInfo which have just been handled,
                // so return.
                return;
            }

            // we didn't fall into the special case for value props, so we
            // need to initialize the ct.
            // generate the complexType
            ComplexType ct = ((ComplexTypeHost)parent).complexType();
            writeName(c,ct);
            if(c.isFinal())
                ct._final("extension restriction");
            if(c.isAbstract())
                ct._abstract(true);

            // these are where we write content model and attributes
            AttrDecls contentModel = ct;
            TypeDefParticle contentModelOwner = 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;
                    contentModelOwner = null;
                    se.base(bc.getTypeName());
                } else {
                    ComplexExtension ce = ct.complexContent().extension();
                    contentModel = ce;
                    contentModelOwner = ce;
View Full Code Here


                    ComplexType ct = ((ComplexTypeHost)parent).complexType();
                    writeName(c,ct);
                    if(c.isFinal())
                        ct._final("extension restriction");

                    SimpleExtension se = ct.simpleContent().extension();
                    se.block(); // because we might have attribute before value
                    for (PropertyInfo<T,C> p : c.getProperties()) {
                        switch (p.kind()) {
                        case ATTRIBUTE:
                            handleAttributeProp((AttributePropertyInfo<T,C>)p,se);
                            break;
                        case VALUE:
                            TODO.checkSpec("what if vp.isCollection() == true?");
                            ValuePropertyInfo vp = (ValuePropertyInfo) p;
                            se.base(vp.getTarget().getTypeName());
                            break;
                        case ELEMENT:   // error
                        case REFERENCE: // error
                        default:
                            assert false;
                            throw new IllegalStateException();
                        }
                    }
                    se.commit();
                }
                TODO.schemaGenerator("figure out what to do if bc != null");
                TODO.checkSpec("handle sec 8.9.5.2, bullet #4");
                // Java types containing value props can only contain properties of type
                // ValuePropertyinfo and AttributePropertyInfo which have just been handled,
                // so return.
                return;
            }

            // we didn't fall into the special case for value props, so we
            // need to initialize the ct.
            // generate the complexType
            ComplexType ct = ((ComplexTypeHost)parent).complexType();
            writeName(c,ct);
            if(c.isFinal())
                ct._final("extension restriction");
            if(c.isAbstract())
                ct._abstract(true);

            // 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());
View Full Code Here

                    ComplexType ct = ((ComplexTypeHost)parent).complexType();
                    writeName(c,ct);
                    if(c.isFinal())
                        ct._final("extension restriction");

                    SimpleExtension se = ct.simpleContent().extension();
                    se.block(); // because we might have attribute before value
                    for (PropertyInfo<T,C> p : c.getProperties()) {
                        switch (p.kind()) {
                        case ATTRIBUTE:
                            handleAttributeProp((AttributePropertyInfo<T,C>)p,se);
                            break;
                        case VALUE:
                            TODO.checkSpec("what if vp.isCollection() == true?");
                            ValuePropertyInfo vp = (ValuePropertyInfo) p;
                            se.base(vp.getTarget().getTypeName());
                            break;
                        case ELEMENT:   // error
                        case REFERENCE: // error
                        default:
                            assert false;
                            throw new IllegalStateException();
                        }
                    }
                    se.commit();
                }
                TODO.schemaGenerator("figure out what to do if bc != null");
                TODO.checkSpec("handle sec 8.9.5.2, bullet #4");
                // Java types containing value props can only contain properties of type
                // ValuePropertyinfo and AttributePropertyInfo which have just been handled,
                // so return.
                return;
            }

            // we didn't fall into the special case for value props, so we
            // need to initialize the ct.
            // generate the complexType
            ComplexType ct = ((ComplexTypeHost)parent).complexType();
            writeName(c,ct);
            if(c.isFinal())
                ct._final("extension restriction");
            if(c.isAbstract())
                ct._abstract(true);

            // these are where we write content model and attributes
            AttrDecls contentModel = ct;
            TypeDefParticle contentModelOwner = 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;
                    contentModelOwner = null;
                    se.base(bc.getTypeName());
                } else {
                    ComplexExtension ce = ct.complexContent().extension();
                    contentModel = ce;
                    contentModelOwner = ce;
View Full Code Here

                    ComplexType ct = ((ComplexTypeHost)parent).complexType();
                    writeName(c,ct);
                    if(c.isFinal())
                        ct._final("extension restriction");

                    SimpleExtension se = ct.simpleContent().extension();
                    se.block(); // because we might have attribute before value
                    for (PropertyInfo<T,C> p : c.getProperties()) {
                        switch (p.kind()) {
                        case ATTRIBUTE:
                            handleAttributeProp((AttributePropertyInfo<T,C>)p,se);
                            break;
                        case VALUE:
                            TODO.checkSpec("what if vp.isCollection() == true?");
                            ValuePropertyInfo vp = (ValuePropertyInfo) p;
                            se.base(vp.getTarget().getTypeName());
                            break;
                        case ELEMENT:   // error
                        case REFERENCE: // error
                        default:
                            assert false;
                            throw new IllegalStateException();
                        }
                    }
                    se.commit();
                }
                TODO.schemaGenerator("figure out what to do if bc != null");
                TODO.checkSpec("handle sec 8.9.5.2, bullet #4");
                // Java types containing value props can only contain properties of type
                // ValuePropertyinfo and AttributePropertyInfo which have just been handled,
                // so return.
                return;
            }

            // we didn't fall into the special case for value props, so we
            // need to initialize the ct.
            // generate the complexType
            ComplexType ct = ((ComplexTypeHost)parent).complexType();
            writeName(c,ct);
            if(c.isFinal())
                ct._final("extension restriction");
            if(c.isAbstract())
                ct._abstract(true);

            // these are where we write content model and attributes
            AttrDecls contentModel = ct;
            TypeDefParticle contentModelOwner = 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;
                    contentModelOwner = null;
                    se.base(bc.getTypeName());
                } else {
                    ComplexExtension ce = ct.complexContent().extension();
                    contentModel = ce;
                    contentModelOwner = ce;
View Full Code Here

                    ComplexType ct = ((ComplexTypeHost)parent).complexType();
                    writeName(c,ct);
                    if(c.isFinal())
                        ct._final("extension restriction");

                    SimpleExtension se = ct.simpleContent().extension();
                    se.block(); // because we might have attribute before value
                    for (PropertyInfo<T,C> p : c.getProperties()) {
                        switch (p.kind()) {
                        case ATTRIBUTE:
                            handleAttributeProp((AttributePropertyInfo<T,C>)p,se);
                            break;
                        case VALUE:
                            TODO.checkSpec("what if vp.isCollection() == true?");
                            ValuePropertyInfo vp = (ValuePropertyInfo) p;
                            se.base(vp.getTarget().getTypeName());
                            break;
                        case ELEMENT:   // error
                        case REFERENCE: // error
                        default:
                            assert false;
                            throw new IllegalStateException();
                        }
                    }
                    se.commit();
                }
                TODO.schemaGenerator("figure out what to do if bc != null");
                TODO.checkSpec("handle sec 8.9.5.2, bullet #4");
                // Java types containing value props can only contain properties of type
                // ValuePropertyinfo and AttributePropertyInfo which have just been handled,
                // so return.
                return;
            }

            // we didn't fall into the special case for value props, so we
            // need to initialize the ct.
            // generate the complexType
            ComplexType ct = ((ComplexTypeHost)parent).complexType();
            writeName(c,ct);
            if(c.isFinal())
                ct._final("extension restriction");
            if(c.isAbstract())
                ct._abstract(true);

            // these are where we write content model and attributes
            AttrDecls contentModel = ct;
            TypeDefParticle contentModelOwner = 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;
                    contentModelOwner = null;
                    se.base(bc.getTypeName());
                } else {
                    ComplexExtension ce = ct.complexContent().extension();
                    contentModel = ce;
                    contentModelOwner = ce;
View Full Code Here

                    ComplexType ct = ((ComplexTypeHost)parent).complexType();
                    writeName(c,ct);
                    if(c.isFinal())
                        ct._final("extension restriction");

                    SimpleExtension se = ct.simpleContent().extension();
                    se.block(); // because we might have attribute before value
                    for (PropertyInfo<T,C> p : c.getProperties()) {
                        switch (p.kind()) {
                        case ATTRIBUTE:
                            handleAttributeProp((AttributePropertyInfo<T,C>)p,se);
                            break;
                        case VALUE:
                            TODO.checkSpec("what if vp.isCollection() == true?");
                            ValuePropertyInfo vp = (ValuePropertyInfo) p;
                            se.base(vp.getTarget().getTypeName());
                            break;
                        case ELEMENT:   // error
                        case REFERENCE: // error
                        default:
                            assert false;
                            throw new IllegalStateException();
                        }
                    }
                    se.commit();
                }
                TODO.schemaGenerator("figure out what to do if bc != null");
                TODO.checkSpec("handle sec 8.9.5.2, bullet #4");
                // Java types containing value props can only contain properties of type
                // ValuePropertyinfo and AttributePropertyInfo which have just been handled,
                // so return.
                return;
            }

            // we didn't fall into the special case for value props, so we
            // need to initialize the ct.
            // generate the complexType
            ComplexType ct = ((ComplexTypeHost)parent).complexType();
            writeName(c,ct);
            if(c.isFinal())
                ct._final("extension restriction");
            if(c.isAbstract())
                ct._abstract(true);

            // these are where we write content model and attributes
            AttrDecls contentModel = ct;
            TypeDefParticle contentModelOwner = 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;
                    contentModelOwner = null;
                    se.base(bc.getTypeName());
                } else {
                    ComplexExtension ce = ct.complexContent().extension();
                    contentModel = ce;
                    contentModelOwner = ce;
View Full Code Here

                    ComplexType ct = ((ComplexTypeHost)parent).complexType();
                    writeName(c,ct);
                    if(c.isFinal())
                        ct._final("extension restriction");

                    SimpleExtension se = ct.simpleContent().extension();
                    se.block(); // because we might have attribute before value
                    for (PropertyInfo<T,C> p : c.getProperties()) {
                        switch (p.kind()) {
                        case ATTRIBUTE:
                            handleAttributeProp((AttributePropertyInfo<T,C>)p,se);
                            break;
                        case VALUE:
                            TODO.checkSpec("what if vp.isCollection() == true?");
                            ValuePropertyInfo vp = (ValuePropertyInfo) p;
                            se.base(vp.getTarget().getTypeName());
                            break;
                        case ELEMENT:   // error
                        case REFERENCE: // error
                        default:
                            assert false;
                            throw new IllegalStateException();
                        }
                    }
                    se.commit();
                }
                TODO.schemaGenerator("figure out what to do if bc != null");
                TODO.checkSpec("handle sec 8.9.5.2, bullet #4");
                // Java types containing value props can only contain properties of type
                // ValuePropertyinfo and AttributePropertyInfo which have just been handled,
                // so return.
                return;
            }

            // we didn't fall into the special case for value props, so we
            // need to initialize the ct.
            // generate the complexType
            ComplexType ct = ((ComplexTypeHost)parent).complexType();
            writeName(c,ct);
            if(c.isFinal())
                ct._final("extension restriction");
            if(c.isAbstract())
                ct._abstract(true);

            // these are where we write content model and attributes
            AttrDecls contentModel = ct;
            TypeDefParticle contentModelOwner = 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;
                    contentModelOwner = null;
                    se.base(bc.getTypeName());
                } else {
                    ComplexExtension ce = ct.complexContent().extension();
                    contentModel = ce;
                    contentModelOwner = ce;
View Full Code Here

                    ComplexType ct = ((ComplexTypeHost)parent).complexType();
                    writeName(c,ct);
                    if(c.isFinal())
                        ct._final("extension restriction");

                    SimpleExtension se = ct.simpleContent().extension();
                    se.block(); // because we might have attribute before value
                    for (PropertyInfo<T,C> p : c.getProperties()) {
                        switch (p.kind()) {
                        case ATTRIBUTE:
                            handleAttributeProp((AttributePropertyInfo<T,C>)p,se);
                            break;
                        case VALUE:
                            TODO.checkSpec("what if vp.isCollection() == true?");
                            ValuePropertyInfo vp = (ValuePropertyInfo) p;
                            se.base(vp.getTarget().getTypeName());
                            break;
                        case ELEMENT:   // error
                        case REFERENCE: // error
                        default:
                            assert false;
                            throw new IllegalStateException();
                        }
                    }
                    se.commit();
                }
                TODO.schemaGenerator("figure out what to do if bc != null");
                TODO.checkSpec("handle sec 8.9.5.2, bullet #4");
                // Java types containing value props can only contain properties of type
                // ValuePropertyinfo and AttributePropertyInfo which have just been handled,
                // so return.
                return;
            }

            // we didn't fall into the special case for value props, so we
            // need to initialize the ct.
            // generate the complexType
            ComplexType ct = ((ComplexTypeHost)parent).complexType();
            writeName(c,ct);
            if(c.isFinal())
                ct._final("extension restriction");
            if(c.isAbstract())
                ct._abstract(true);

            // these are where we write content model and attributes
            AttrDecls contentModel = ct;
            TypeDefParticle contentModelOwner = 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;
                    contentModelOwner = null;
                    se.base(bc.getTypeName());
                } else {
                    ComplexExtension ce = ct.complexContent().extension();
                    contentModel = ce;
                    contentModelOwner = ce;
View Full Code Here

                    ComplexType ct = ((ComplexTypeHost)parent).complexType();
                    writeName(c,ct);
                    if(c.isFinal())
                        ct._final("extension restriction");

                    SimpleExtension se = ct.simpleContent().extension();
                    se.block(); // because we might have attribute before value
                    for (PropertyInfo<T,C> p : c.getProperties()) {
                        switch (p.kind()) {
                        case ATTRIBUTE:
                            handleAttributeProp((AttributePropertyInfo<T,C>)p,se);
                            break;
                        case VALUE:
                            TODO.checkSpec("what if vp.isCollection() == true?");
                            ValuePropertyInfo vp = (ValuePropertyInfo) p;
                            se.base(vp.getTarget().getTypeName());
                            break;
                        case ELEMENT:   // error
                        case REFERENCE: // error
                        default:
                            assert false;
                            throw new IllegalStateException();
                        }
                    }
                    se.commit();
                }
                TODO.schemaGenerator("figure out what to do if bc != null");
                TODO.checkSpec("handle sec 8.9.5.2, bullet #4");
                // Java types containing value props can only contain properties of type
                // ValuePropertyinfo and AttributePropertyInfo which have just been handled,
                // so return.
                return;
            }

            // we didn't fall into the special case for value props, so we
            // need to initialize the ct.
            // generate the complexType
            ComplexType ct = ((ComplexTypeHost)parent).complexType();
            writeName(c,ct);
            if(c.isFinal())
                ct._final("extension restriction");
            if(c.isAbstract())
                ct._abstract(true);

            // these are where we write content model and attributes
            AttrDecls contentModel = ct;
            TypeDefParticle contentModelOwner = 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;
                    contentModelOwner = null;
                    se.base(bc.getTypeName());
                } else {
                    ComplexExtension ce = ct.complexContent().extension();
                    contentModel = ce;
                    contentModelOwner = ce;
View Full Code Here

                    ComplexType ct = ((ComplexTypeHost)parent).complexType();
                    writeName(c,ct);
                    if(c.isFinal())
                        ct._final("extension restriction");

                    SimpleExtension se = ct.simpleContent().extension();
                    se.block(); // because we might have attribute before value
                    for (PropertyInfo<T,C> p : c.getProperties()) {
                        switch (p.kind()) {
                        case ATTRIBUTE:
                            handleAttributeProp((AttributePropertyInfo<T,C>)p,se);
                            break;
                        case VALUE:
                            TODO.checkSpec("what if vp.isCollection() == true?");
                            ValuePropertyInfo vp = (ValuePropertyInfo) p;
                            se.base(vp.getTarget().getTypeName());
                            break;
                        case ELEMENT:   // error
                        case REFERENCE: // error
                        default:
                            assert false;
                            throw new IllegalStateException();
                        }
                    }
                    se.commit();
                }
                TODO.schemaGenerator("figure out what to do if bc != null");
                TODO.checkSpec("handle sec 8.9.5.2, bullet #4");
                // Java types containing value props can only contain properties of type
                // ValuePropertyinfo and AttributePropertyInfo which have just been handled,
                // so return.
                return;
            }

            // we didn't fall into the special case for value props, so we
            // need to initialize the ct.
            // generate the complexType
            ComplexType ct = ((ComplexTypeHost)parent).complexType();
            writeName(c,ct);
            if(c.isFinal())
                ct._final("extension restriction");
            if(c.isAbstract())
                ct._abstract(true);

            // these are where we write content model and attributes
            AttrDecls contentModel = ct;
            TypeDefParticle contentModelOwner = 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;
                    contentModelOwner = null;
                    se.base(bc.getTypeName());
                } else {
                    ComplexExtension ce = ct.complexContent().extension();
                    contentModel = ce;
                    contentModelOwner = ce;
View Full Code Here

TOP

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

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.