Package org.jibx.schema.elements

Examples of org.jibx.schema.elements.FilteredSegmentList


        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) {
            buildJava5Enumeration(name, fullname, facets, clasbuilder);
        } else {
            buildSimpleEnumeration(name, fullname, facets, clasbuilder);
        }
View Full Code Here


                // add namespaced schema to both reached set and processing order list
                ordereds.add(schema);
                schemaset.add(schema);
               
                // add any child include and imports only to reached set
                FilteredSegmentList childs = schema.getSchemaChildren();
                for (int j = 0; j < childs.size(); j++) {
                    Object child = childs.get(j);
                    if (child instanceof SchemaLocationBase) {
                        schemaset.add(((SchemaLocationBase)child).getReferencedSchema());
                    }
                }
            }
View Full Code Here

    protected String extractDocumentation(AnnotatedBase element) {
        if (m_schemaCustom.isJavaDocDocumentation()) {
            StringWriter writer = new StringWriter();
            AnnotationElement anno = element.getAnnotation();
            if (anno != null) {
                FilteredSegmentList items = anno.getItemsList();
                for (int i = 0; i < items.size(); i++) {
                    AnnotationItem item = (AnnotationItem)items.get(i);
                    if (item instanceof DocumentationElement) {
                        DocumentationElement doc = (DocumentationElement)item;
                        List contents = doc.getContent();
                        if (contents != null) {
                            for (Iterator iter = contents.iterator(); iter.hasNext();) {
View Full Code Here

                               
                            }
                        } else if (derivation.type() == SchemaBase.UNION_TYPE) {
                            UnionElement innerunion = (UnionElement)derivation;
                            QName[] innertypes = innerunion.getMemberTypes();
                            FilteredSegmentList innerinlines = innerunion.getInlineBaseList();
                            if (innertypes.length + innerinlines.size() == 1) {
                               
                                // replace child union with single type from union
                                if (innertypes.length == 1) {
                                   
                                    // global type reference, delete the child union and check if new type
                                    repltype = innertypes[0];
                                    if (typeset.contains(repltype)) {
                                        keeper = false;
                                    }
                                   
                                } else {
                                   
                                    // inline type definition, replace the child union with the inline type
                                    union.replaceChild(i, (SchemaBase)innerinlines.get(0));
                                   
                                }
                            }
                        }
                    }
View Full Code Here

     *
     * @param part compositor being added as a particle
     * @param comp target compositor for add
     */
    private static void addCompositorPart(CommonCompositorDefinition part, CommonCompositorDefinition comp)  {
        FilteredSegmentList parts = part.getParticleList();
        Count maxo = part.getMaxOccurs();
        Count mino = part.getMinOccurs();
        if (parts.size() == 1 && (maxo == null || maxo.isEqual(1)) && (mino == null || mino.isEqual(1))) {
            comp.getParticleList().add(parts.get(0));
        } else if (parts.size() > 1) {
            comp.getParticleList().add(part);
        }
    }
View Full Code Here

    public static boolean isEnumeration(AnnotatedBase comp) {
        if (comp.type() == SchemaBase.SIMPLETYPE_TYPE) {
            SimpleTypeElement type = (SimpleTypeElement)comp;
            if (type.getDerivation().type() == SchemaBase.RESTRICTION_TYPE) {
                SimpleRestrictionElement restrict = (SimpleRestrictionElement)type.getDerivation();
                FilteredSegmentList facets = restrict.getFacetsList();
                for (int i = 0; i < facets.size(); i++) {
                    FacetElement facet = (FacetElement)facets.get(i);
                    if (facet.type() == SchemaBase.ENUMERATION_TYPE) {
                        return true;
                    }
                }
            }
View Full Code Here

TOP

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

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.