Package org.jibx.schema.elements

Examples of org.jibx.schema.elements.AnnotatedBase


        String fullname = getFullName();
        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

         *
         * @param obj referenced object (<code>null</code> if none, ignored if a schema type)
         */
        private void countUse(Object obj) {
            if (obj != null) {
                AnnotatedBase comp = (AnnotatedBase)obj;
                if (comp.getParent() != null) {
                    s_logger.debug(" incrementing usage count for " + SchemaUtils.describeComponent(comp));
                    if (m_usageMap.incrementCount(comp) == 1 && m_newReferences != null) {
                        if (comp.getParent() instanceof SchemaElement) {
                            s_logger.debug("  (first use for component, added to new references list)");
                            m_newReferences.add(obj);
                        } else if (((AnnotatedBase)obj).getParent() != null) {
                            throw new IllegalStateException("Internal error: non-global in usage counts");
                        }
View Full Code Here

                    s_logger.debug(" found " + (limit-base) + " new references in expansion pass");
                }
                for (int i = base; i < limit; i++) {
                   
                    // make sure component is a user type (not schema type)
                    AnnotatedBase ref = (AnnotatedBase)m_newReferences.get(i);
                    OpenAttrBase parent = ref.getParent();
                    if (parent instanceof SchemaElement) {
                       
                        // expand reference from this component
                        s_logger.debug(" adding reference closure for " + SchemaUtils.describeComponent(ref));
                        m_tracker.setNameRegister(((SchemaElement)parent).getRegister());
View Full Code Here

         * @param parent parent node
         */
        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

         * Check if a reference (element or attribute) is associated with this node.
         *
         * @return <code>true</code> if named
         */
        public boolean isReference() {
            AnnotatedBase comp = m_item.getSchemaComponent();
            return comp instanceof IReference && ((IReference)comp).getRef() != null;
        }
View Full Code Here

         * Get the reference name associated with a node.
         *
         * @return reference name, or <code>null</code> if none
         */
        public QName getReferenceQName() {
            AnnotatedBase comp = m_item.getSchemaComponent();
            if (comp instanceof IReference) {
                return ((IReference)comp).getRef();
            } else {
                return null;
            }
View Full Code Here

            buff.append("inlined ");
        }
        if (m_enumeration) {
            buff.append("enumeration ");
        }
        AnnotatedBase comp = getSchemaComponent();
        if (isTopmost()) {
            if (classified) {
                if (m_attributePresent) {
                    if (m_contentPresent) {
                        buff.append("attribute+content ");
View Full Code Here

     * Find the nearest ancestor group which relates to a different schema component.
     *
     * @return ancestor with different schema component, or <code>null</code> if none
     */
    protected GroupItem findDisjointParent() {
        AnnotatedBase comp = getSchemaComponent();
        GroupItem parent = getParent();
        while (parent != null && parent.getSchemaComponent() == comp) {
            parent = parent.getParent();
        }
        return parent;
View Full Code Here

            // find the parent group with a different schema component
            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

TOP

Related Classes of org.jibx.schema.elements.AnnotatedBase

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.