Package org.jibx.schema.elements

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


                    // check for name associated with this node
                    if (subparent.isNamed()) {
                       
                        // check if this is an attribute
                        AnnotatedBase comp = item.getSchemaComponent();
                        if (comp.type() == SchemaBase.ATTRIBUTE_TYPE) {
                           
                            // handle attribute with embedded definition
                            ValueElement value = new ValueElement();
                            value.setEffectiveStyle(NestingAttributes.ATTRIBUTE_STYLE);
                            setName(subparent.getQName(), holder, value);
View Full Code Here


        fixFlexibleNames(m_dataRoot, false);
       
        // make class abstract if appropriate
        AnnotatedBase comp = m_dataRoot.getSchemaComponent();
        boolean abs = false;
        int type = comp.type();
        if (type == SchemaBase.ELEMENT_TYPE) {
            abs = ((ElementElement)comp).isAbstract();
        } else if (type == SchemaBase.COMPLEXTYPE_TYPE) {
            abs = ((ComplexTypeElement)comp).isAbstract();
        }
View Full Code Here

                text = ((ValueItem)item).getSchemaType().getName();
            } else {
                text = comp.name();
            }
           
        } else if (item instanceof ReferenceItem && (TYPE_DEFINE_MASK & comp.type()) == 0) {
           
            // use name from definition in the case of anything except a type definition
            text = ((ReferenceItem)item).getDefinition().getName();
        }
       
View Full Code Here

    private void assignNames(String prefix, GroupItem group, boolean force) {
       
        // use existing name if set, otherwise derive from context if necessary
        String name = group.getName();
        AnnotatedBase comp = group.getSchemaComponent();
        int type = comp.type();
        boolean propagate = group.getChildCount() == 1 &&
            (type == SchemaBase.ELEMENT_TYPE || type == SchemaBase.ATTRIBUTE_TYPE);
        if (name == null) {
            name = checkDirectName(group);
            if (name == null && force) {
View Full Code Here

        }
       
        // set passed-down prefix to this name if inline group with element name and more than one child, or multiple
        //  nested children and no passed-in prefix
        if (group.isInline() && name != null) {
            if (comp.type() == SchemaBase.ELEMENT_TYPE && SchemaUtils.isNamed(comp)) {
                boolean passprefix = false;
                if (group.getChildCount() > 1) {
                    passprefix = true;
                } else if (prefix == null) {
                    passprefix = true;
View Full Code Here

            DefinitionItem definition = (DefinitionItem)items.get(i);
            if (!definition.isPregenerated()) {
               
                // record all simple element definition items separately for next pass
                AnnotatedBase child = definition.getSchemaComponent();
                if (child.type() == SchemaBase.ELEMENT_TYPE && definition.getChildCount() == 1) {
                    Item item = definition.getFirstChild();
                    if (item instanceof ReferenceItem) {
                        DefinitionItem basedef = ((ReferenceItem)item).getDefinition();
                        if (!basedef.isPregenerated()) {
                            AnnotatedBase comp = basedef.getSchemaComponent();
View Full Code Here

                    Item item = definition.getFirstChild();
                    if (item instanceof ReferenceItem) {
                        DefinitionItem basedef = ((ReferenceItem)item).getDefinition();
                        if (!basedef.isPregenerated()) {
                            AnnotatedBase comp = basedef.getSchemaComponent();
                            if (comp.type() != SchemaBase.SIMPLETYPE_TYPE) {
                                checkitems.add(definition);
                            }
                        }
                    }
                }
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.