Examples of ModelGroup


Examples of org.exolab.castor.xml.schema.ModelGroup

            return;
        }

        if (mode.equals("field")) {
            if (annotated instanceof ModelGroup) {
                ModelGroup group = (ModelGroup) annotated;
                final boolean isReference = group.isReference();
                if (isReference) {
                    return;
                }
            }
               
View Full Code Here

Examples of org.exolab.castor.xml.schema.ModelGroup

                    //-- create class member,if necessary
                    if (!((contentModel instanceof ComplexType)
                            || (contentModel instanceof ModelGroup))) {
                        if (contentModel instanceof ModelGroup) {
                            ModelGroup mg = (ModelGroup) contentModel;
                            if (mg.isReference()) {
                                contentModel = mg.getReference();
                            }
                        }

                        if (contentModel.getParticleCount() > 0) {
                            fieldInfo = _memberFactory.createFieldInfo(
                                    component, state.getSGStateInfo(), getConfig().useJava50());
                            handleField(fieldInfo, state, component);
                        }
                    } else {
                       //--else we just flatten the group
                       processContentModel(group, state);
                    }
                    break;

                case Structure.MODELGROUP:
                     ModelGroup modelgroup = (ModelGroup) annotated;
                     //--a Model Group definition can only referenced
                     //--another group at this point.
                     //get the contentModel and proccess it
                    if (modelgroup.getName() != null) {
                        //create the field info for the element
                        //that is referring to a model group in order
                        //not to loose the Particle information
                        if (modelgroup.isReference()) {
                            modelgroup = modelgroup.getReference();
                        }

                        if (modelgroup.getParticleCount() > 0) {
                            fieldInfo = _memberFactory.createFieldInfo(
                                    component, state.getSGStateInfo(), getConfig().useJava50());
                            handleField(fieldInfo, state, component);
                        }
                        break;
                    }
                    //--else we just flatten the group
                    processContentModel(modelgroup.getContentModelGroup(), state);
                    break;

                case Structure.WILDCARD:
                    Wildcard wildcard = (Wildcard) annotated;
                    FieldInfo fieldForAny = _memberFactory.createFieldInfoForAny(
View Full Code Here

Examples of org.exolab.castor.xml.schema.ModelGroup

            ElementDecl element = null;
            element = ((ElementUnmarshaller) _unmarshaller).getElement();
            _schema.addElementDecl(element);
        } else if (name.equals(SchemaNames.GROUP)) {
            //--<group>
            ModelGroup group = null;
            group = (((ModelGroupUnmarshaller) _unmarshaller).getGroup());
            _schema.addModelGroup(group);
        } else if (name.equals(SchemaNames.REDEFINE)) {
            //--<redefine>
            RedefineSchema redefine = null;
View Full Code Here

Examples of org.exolab.castor.xml.schema.ModelGroup

        for (Enumeration<ElementDecl> structures = schema.getElementDecls(); structures.hasMoreElements(); ) {
            ElementDecl element = structures.nextElement();
            _xmlInfoRegistry.prebindGlobalElement(XPathHelper.getSchemaLocation(element));
        }
        for (Enumeration<ModelGroup> structures = schema.getModelGroups(); structures.hasMoreElements(); ) {
            ModelGroup modelGroup = structures.nextElement();
            _xmlInfoRegistry.prebindGlobalElement(XPathHelper.getSchemaLocation(modelGroup));
        }

        //-- handle all top-level element declarations
        for (Enumeration<ElementDecl> structures = schema.getElementDecls(); structures.hasMoreElements(); ) {
View Full Code Here

Examples of org.exolab.castor.xml.schema.ModelGroup

        }

        //-- don't generate classes for empty groups
        if (group.getParticleCount() == 0) {
            if (group instanceof ModelGroup) {
                ModelGroup mg = (ModelGroup) group;
                if (mg.isReference()) {
                    mg = mg.getReference();
                    if (mg.getParticleCount() == 0) {
                        return;
                    }
                }
            } else {
                return;
View Full Code Here

Examples of org.exolab.castor.xml.schema.ModelGroup

                (AttributeGroupReference) unmarshaller.getObject();
            _complexType.addAttributeGroupReference(attrGroupRef);
        }
        //--group
        else if (name.equals(SchemaNames.GROUP)) {
            ModelGroup group = ((ModelGroupUnmarshaller)unmarshaller).getGroup();
            _complexType.addGroup(group);
        }

        //-- group declarations (all, choice, sequence)
        else if ( (SchemaNames.isGroupName(name)) && (name != SchemaNames.GROUP) )
View Full Code Here

Examples of org.exolab.castor.xml.schema.ModelGroup

                case Structure.COMPLEX_TYPE:
                    _schema = ((ComplexType)_annotated).getSchema();
                    break;
                case Structure.MODELGROUP:
                    //--resolve reference?
                    ModelGroup group = (ModelGroup)_annotated;
                    if (group.isReference())
                        group = group.getReference();
               
                    _schema = group.getSchema();
                    group = null;
                    break;
                case Structure.GROUP:
                    Structure parent = ((Group)_annotated).getParent();
                    short structure = parent.getStructureType();
View Full Code Here

Examples of org.exolab.castor.xml.schema.ModelGroup

                    location.append(((ComplexType)structure).getName());
                }
                break;

            case Structure.MODELGROUP:
                ModelGroup group = (ModelGroup)structure;
                parent = group.getParent();
                if (parent.getStructureType() != Structure.SCHEMA)
                   getSchemaLocation(parent, location);
                if (group.getName() != null) {
                    location.append(GROUP_ID);
                    location.append(group.getName());
                }
                break;

            case Structure.ATTRIBUTE:
                parent = ((AttributeDecl)structure).getParent();
View Full Code Here

Examples of org.exolab.castor.xml.schema.ModelGroup

                    if (!( (contentModel instanceof ComplexType)||
                            (contentModel instanceof ModelGroup)) )
                    {
                       
                        if (contentModel instanceof ModelGroup) {
                            ModelGroup mg = (ModelGroup)contentModel;
                            if (mg.isReference()) {
                                contentModel = mg.getReference();
                            }
                        }
                       
                        if (contentModel.getParticleCount() > 0) {
                          fieldInfo = memberFactory.createFieldInfo(component,
                                                                     state.getSGStateInfo());
                          handleField(fieldInfo, state);
                        }
                    } else {
                       //--else we just flatten the group
                       processContentModel(group, state);
                    }
                    break;

                case Structure.MODELGROUP:
                     ModelGroup modelgroup = (ModelGroup) annotated;
                     //--a Model Group definition can only referenced
                     //--another group at this point.
                     //get the contentModel and proccess it
                    if (modelgroup.getName() != null) {
                        //create the field info for the element
                        //that is referring to a model group in order
                        //not to loose the Particle information
                        if (modelgroup.isReference())
                            modelgroup = modelgroup.getReference();
                           
                        if (modelgroup.getParticleCount() > 0) {
                          fieldInfo = memberFactory.createFieldInfo(component,
                                                    state.getSGStateInfo());
                          handleField(fieldInfo, state);
                        }
                        break;
                    } else {
                        //--else we just flatten the group
                        processContentModel(modelgroup.getContentModelGroup(), state);
                    }
                    break;

                case Structure.WILDCARD:
                    Wildcard wildcard = (Wildcard)annotated;
View Full Code Here

Examples of org.exolab.castor.xml.schema.ModelGroup

                ((ElementUnmarshaller)unmarshaller).getElement();
            _complexType.addElementDecl(element);
        }
        //--group
        else if (name.equals(SchemaNames.GROUP)) {
            ModelGroup group = ((ModelGroupUnmarshaller)unmarshaller).getGroup();
            _complexType.addGroup(group);
        }

        //-- group declarations (all, choice, sequence)
        else if ( (SchemaNames.isGroupName(name)) && (name != SchemaNames.GROUP) )
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.