Package org.jibx.schema.elements

Examples of org.jibx.schema.elements.AnnotatedBase.type()


        if (s_logger.isInfoEnabled()) {
            s_logger.info("Generating enumeration class " + fullname);
        }
        GroupItem group = (GroupItem)item;
        AnnotatedBase comp = group.getFirstChild().getSchemaComponent();
        if (comp.type() == SchemaBase.SIMPLETYPE_TYPE) {
            comp = (AnnotatedBase)((SimpleTypeElement)comp).getDerivation();
        }
        SimpleRestrictionElement restrict = (SimpleRestrictionElement)comp;
        FilteredSegmentList facets = restrict.getFacetsList();
        if (java5) {
View Full Code Here


//        } else {
//      }
       
        // 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);
View Full Code Here

         */
        public DataNode(Item item, ParentNode parent) {
            m_item = item;
            m_parent = parent;
            AnnotatedBase comp = item.getSchemaComponent();
            int comptype = comp.type();
            m_named = (comptype == SchemaBase.ATTRIBUTE_TYPE || comptype == SchemaBase.ELEMENT_TYPE) &&
                ((INamed)comp).getName() != null;
            Item topmost = item.getTopmost();
            boolean optional = topmost.isOptional();
            if (parent != null && ((GroupItem)parent.getItem()).isInline() && !parent.isNamed()) {
View Full Code Here

            GroupItem parent = findDisjointParent();
            if (parent != null) {
               
                // flag content type for that parent group
                AnnotatedBase comp = getSchemaComponent();
                switch (comp.type()) {
                   
                    case SchemaBase.ANY_TYPE:
                    case SchemaBase.ELEMENT_TYPE:
                       
                        // set required component present if appropriate
View Full Code Here

                           
                            // create a new group for an inlined compositor only if it's <all> or <choice> or nested
                            ParentNode into = parent;
                            AnnotatedBase comp = item.getSchemaComponent();
                            if (comp instanceof CommonCompositorBase) {
                                if (comp.type() == SchemaBase.ALL_TYPE || comp.type() == SchemaBase.CHOICE_TYPE
                                    || comp.getParent() instanceof CommonCompositorBase) {
                                    into = new ParentNode(group, parent);
                                    into.setDocumentation(doctext);
                                    doctext = null;
                                }
View Full Code Here

                           
                            // create a new group for an inlined compositor only if it's <all> or <choice> or nested
                            ParentNode into = parent;
                            AnnotatedBase comp = item.getSchemaComponent();
                            if (comp instanceof CommonCompositorBase) {
                                if (comp.type() == SchemaBase.ALL_TYPE || comp.type() == SchemaBase.CHOICE_TYPE
                                    || comp.getParent() instanceof CommonCompositorBase) {
                                    into = new ParentNode(group, parent);
                                    into.setDocumentation(doctext);
                                    doctext = null;
                                }
View Full Code Here

               
            } else {
               
                // name will have been passed down from containing element
                // (since attributes handled directly)
                if (comp.type() == SchemaBase.ELEMENT_TYPE) {
                   
                    // value is an element, set the name directly
                    value.setEffectiveStyle(NestingAttributes.ELEMENT_STYLE);
                    ElementElement elem = (ElementElement)comp;
                    if (SchemaUtils.isOptionalElement(elem)) {
View Full Code Here

                        // as when a simpleType is nested inside an optional attribute. should the code be changed to
                        // inherit instead?
                        value.setUsage(PropertyAttributes.OPTIONAL_USAGE);
                    }
                   
                } else if (comp.type() == SchemaBase.ATTRIBUTE_TYPE) {
                   
                    // value is an attribute, set the name directly
                    value.setEffectiveStyle(NestingAttributes.ATTRIBUTE_STYLE);
                    AttributeElement attr = (AttributeElement)comp;
                    if (SchemaUtils.isOptionalAttribute(attr)) {
View Full Code Here

            if (parent.getQName() != null) {
                buff.append(parent.getQName().getName());
                buff.append(' ');
            }
            String descript;
            if (comp.type() == SchemaBase.UNION_TYPE) {
                descript = "form";
                buff.append("union");
            } else {
                descript = "choice";
                buff.append("choice");
View Full Code Here

               
                // implicit item uses superclass data, not a field, so just handle with map-as structure
                DefinitionItem def = ((ReferenceItem)item).getDefinition();
                QName qname = def.getQName();
                AnnotatedBase comp = def.getSchemaComponent();
                int type = comp.type();
                StructureElement struct = new StructureElement();
                if (type == SchemaBase.ELEMENT_TYPE) {
                   
                    // reference to global element definition, just set it directly as concrete mapping reference
                    struct.setMapAsName(getSuperClass().getBindingName());
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.