Package org.jibx.schema.codegen.custom

Examples of org.jibx.schema.codegen.custom.ComponentExtension


//      }
       
        // decide which component to link to inlined group based on reference component type
        AnnotatedBase refcomp = getSchemaComponent();
        int type = refcomp.type();
        ComponentExtension ext = (type == SchemaBase.ATTRIBUTE_TYPE || type == SchemaBase.ELEMENT_TYPE) ?
            getComponentExtension() : m_definition.getComponentExtension();
       
        // create new group from definition group
        GroupItem group = new GroupItem(this, ext);
        if (s_logger.isDebugEnabled()) {
View Full Code Here


                SchemaBase child = schema.getChild(i);
                Object obj = child.getExtension();
                if (obj instanceof GlobalExtension) {
                   
                    // apply extension to global definition element
                    ComponentExtension exten = (ComponentExtension)obj;
                    if (exten.isRemoved()) {
                       
                        // just eliminate this definition from the schema
                        schema.detachChild(i);
                        instmod = true;
                       
                    } else {
                       
                        // process the definition to remove references to deleted components
                        exten.applyAndCountUsage(m_validationContext);
                       
                    }
                }
            }
            if (instmod) {
View Full Code Here

     * @param comp schema component (should be the simpleType component in the case of an enumeration)
     * @param parent (<code>null</code> if none)
     */
    protected GroupItem(AnnotatedBase comp, GroupItem parent) {
        super(comp, parent);
        ComponentExtension exten = getComponentExtension();
        m_className = exten.getClassName();
        m_allOptional = true;
    }
View Full Code Here

                SchemaBase child = schema.getChild(i);
                Object obj = child.getExtension();
                if (obj instanceof GlobalExtension) {
                   
                    // apply extension to global definition element
                    ComponentExtension exten = (ComponentExtension)obj;
                    if (exten.isRemoved()) {
                       
                        // just eliminate this definition from the schema
                        schema.detachChild(i);
                        instmod = true;
                       
                    } else {
                       
                        // process the definition to remove references to deleted components
                        exten.applyAndCountUsage(m_validationContext);
                       
                    }
                }
            }
            if (instmod) {
View Full Code Here

                //  collection and has more than one item (or a single item which is itself optional or a collection,
                //  which will be counted as multiple items); or the main group is a choice, and the nested group is a
                //  compositor with more than one element, and the first element is optional (or the first element child
                //  of that element, if inlined) - but allow override from customizations
                boolean inline = true;
                ComponentExtension exten = grpitem.getComponentExtension();
                if (exten.isSeparateClass()) {
                    inline = false;
                } else {
                    if (grpitem.isEnumeration()) {
                        inline = false;
                    } else if (grpitem.isCollection() || grpitem.isOptional()) {
View Full Code Here

            // TODO: this really should be a separate pass to handle fixed class names
            String prefix = NameUtils.toNameWord(group.getEffectiveClassName());
            m_prefix = prefix;
            int select = NestingCustomBase.SELECTION_UNCHECKED;
            boolean exposed = false;
            ComponentExtension extension = group.getComponentExtension();
            switch (group.getSchemaComponent().type()) {
                case SchemaBase.CHOICE_TYPE:
                    select = extension.getChoiceType();
                    exposed = extension.isChoiceExposed();
                    break;
                case SchemaBase.UNION_TYPE:
                    select = extension.getUnionType();
                    exposed = extension.isUnionExposed();
                    break;
            }
            if (select != NestingCustomBase.SELECTION_UNCHECKED) {
               
                // no selector needed if handled by parent, or if no choices
View Full Code Here

TOP

Related Classes of org.jibx.schema.codegen.custom.ComponentExtension

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.