Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.XSMultiValueFacet


                    sendUnIndentedElement("psv:" + name);
                }
            }
            if (multiValueFacets != null) {
                for (int i = 0; i < multiValueFacets.getLength(); i++) {
                    XSMultiValueFacet facet =
                        (XSMultiValueFacet)multiValueFacets.item(i);
                    String name = this.translateFacetKind(facet.getFacetKind());
                    sendIndentedElement("psv:" + name);
                    StringList values = facet.getLexicalFacetValues();
                    for (int j = 0; j < values.getLength(); j++) {
                        sendElementEvent("psv:value", values.item(j));
                    }
                    sendElementEvent("psv:fixed", "false");
                    processPSVIAnnotations(facet.getAnnotations());
                    sendUnIndentedElement("psv:" + name);
                }
            }
            sendUnIndentedElement("psv:facets");
        }
View Full Code Here


                    sendUnIndentedElement("psv:" + name);
                }
            }
            if (multiValueFacets != null) {
                for (int i = 0; i < multiValueFacets.getLength(); i++) {
                    XSMultiValueFacet facet =
                        (XSMultiValueFacet)multiValueFacets.item(i);
                    String name = this.translateFacetKind(facet.getFacetKind());
                    sendIndentedElement("psv:" + name);
                    StringList values = facet.getLexicalFacetValues();
                    for (int j = 0; j < values.getLength(); j++) {
                        sendElementEvent("psv:value", values.item(j));
                    }
                    sendElementEvent("psv:fixed", "false");
                    processPSVIAnnotations(facet.getAnnotations());
                    sendUnIndentedElement("psv:" + name);
                }
            }
            sendUnIndentedElement("psv:facets");
        }
View Full Code Here

    public XSObject getFacet(int facetType) {
        if (facetType == FACET_ENUMERATION || facetType == FACET_PATTERN) {
            XSObjectList list = getMultiValueFacets();
            for (int i = 0; i < list.getLength(); i++) {
                XSMultiValueFacet f = (XSMultiValueFacet)list.item(i);
                if (f.getFacetKind() == facetType) {
                    return f;
                }
            }
        }
        else {
            XSObjectList list = getFacets();
            for (int i = 0; i < list.getLength(); i++) {
                XSFacet f = (XSFacet)list.item(i);
                if (f.getFacetKind() == facetType) {
                    return f;
                }
            }
        }
        return null;
View Full Code Here

                    sendUnIndentedElement("psv:" + name);
                }
            }
            if (multiValueFacets != null) {
                for (int i = 0; i < multiValueFacets.getLength(); i++) {
                    XSMultiValueFacet facet =
                        (XSMultiValueFacet)multiValueFacets.item(i);
                    String name = this.translateFacetKind(facet.getFacetKind());
                    sendIndentedElement("psv:" + name);
                    StringList values = facet.getLexicalFacetValues();
                    for (int j = 0; j < values.getLength(); j++) {
                        sendElementEvent("psv:value", values.item(j));
                    }
                    sendElementEvent("psv:fixed", "false");
                    processPSVIAnnotations(facet.getAnnotations());
                    sendUnIndentedElement("psv:" + name);
                }
            }
            sendUnIndentedElement("psv:facets");
        }
View Full Code Here

                    sendUnIndentedElement("psv:" + name);
                }
            }
            if (multiValueFacets != null) {
                for (int i = 0; i < multiValueFacets.getLength(); i++) {
                    XSMultiValueFacet facet =
                        (XSMultiValueFacet)multiValueFacets.item(i);
                    String name = this.translateFacetKind(facet.getFacetKind());
                    sendIndentedElement("psv:" + name);
                    StringList values = facet.getLexicalFacetValues();
                    for (int j = 0; j < values.getLength(); j++) {
                        sendElementEvent("psv:value", values.item(j));
                    }
                    sendElementEvent("psv:fixed", "false");
                    processPSVIAnnotations(facet.getAnnotations());
                    sendUnIndentedElement("psv:" + name);
                }
            }
            sendUnIndentedElement("psv:facets");
        }
View Full Code Here

    public XSObject getFacet(int facetType) {
        if (facetType == FACET_ENUMERATION || facetType == FACET_PATTERN) {
            XSObjectList list = getMultiValueFacets();
            for (int i = 0; i < list.getLength(); i++) {
                XSMultiValueFacet f = (XSMultiValueFacet)list.item(i);
                if (f.getFacetKind() == facetType) {
                    return f;
                }
            }
        }
        else {
            XSObjectList list = getFacets();
            for (int i = 0; i < list.getLength(); i++) {
                XSFacet f = (XSFacet)list.item(i);
                if (f.getFacetKind() == facetType) {
                    return f;
                }
            }
        }
        return null;
View Full Code Here

        // add assertion facets from "complexType -> simpleContent -> restriction"
        XSSimpleTypeDefinition simpleContentType = complexTypeDef.getSimpleType();
        if (simpleContentType != null) {
            XSObjectList complexTypeFacets = simpleContentType.getMultiValueFacets();
            for (int i = 0; i < complexTypeFacets.getLength(); i++) {
                XSMultiValueFacet facet = (XSMultiValueFacet) complexTypeFacets.item(i);
                if (facet.getFacetKind() == XSSimpleTypeDefinition.FACET_ASSERT) {
                    Vector simpleContentAsserts = facet.getAsserts();
                    for (int simpleAssertIdx = 0; simpleAssertIdx < simpleContentAsserts.size(); simpleAssertIdx++) {
                        XSAssert simpleContentAssert = (XSAssert) simpleContentAsserts.get(simpleAssertIdx);
                        complexTypeAsserts.addXSObject(simpleContentAssert);
                    }
                }
View Full Code Here

                }

                // iterate all the schema facets for attributes having the simpleType variety "atomic | list", and
                // accumulate assertions from them.
                for (int facetIdx = 0; facetIdx < facets.getLength(); facetIdx++) {
                    XSMultiValueFacet facet = (XSMultiValueFacet) facets.item(facetIdx);
                    if (facet.getFacetKind() == XSSimpleTypeDefinition.FACET_ASSERT) {
                        Vector attrAsserts = facet.getAsserts();
                        for (int j = 0; j < attrAsserts.size(); j++) {
                            XSAssertImpl attrAssert = (XSAssertImpl) attrAsserts.elementAt(j);
                            attrAssert.setAttrName(attributes.getLocalName(attrIndx));
                            attrAssert.setAttrValue(attributes.getValue(attrIndx));
                            attrAssert.setVariety(attrTypeVariety);                               
View Full Code Here

        }

        // iterate all the schema facets having the simpleType variety "atomic | list", and accumulate assertions
        // from them.
        for (int facetIdx = 0; facetIdx < facets.getLength(); facetIdx++) {
            XSMultiValueFacet facet = (XSMultiValueFacet) facets.item(facetIdx);
            if (facet.getFacetKind() == XSSimpleTypeDefinition.FACET_ASSERT) {
                if (simpleTypeAsserts == null) {
                    simpleTypeAsserts = new Vector();  
                }                 
                simpleTypeAsserts.addAll(facet.getAsserts());                 
            }
        }

        return simpleTypeAsserts;
       
View Full Code Here

            XSSimpleTypeDefinition memType = (XSSimpleTypeDefinition) memberTypes.item(memberTypeIdx);
            if (!SchemaSymbols.URI_SCHEMAFORSCHEMA.equals(memType.getNamespace())) {
                XSObjectList memberTypeFacets = memType.getMultiValueFacets();
                for (int memberTypeFacetIdx = 0; memberTypeFacetIdx < memberTypeFacets.getLength();
                                                                                memberTypeFacetIdx++) {
                    XSMultiValueFacet facet = (XSMultiValueFacet) memberTypeFacets.item(memberTypeFacetIdx);
                    if (facet.getFacetKind() == XSSimpleTypeDefinition.FACET_ASSERT) {
                        Vector assertFacets = facet.getAsserts();
                        assertImpl = (XSAssertImpl) assertFacets.get(0);                       
                        // return the 1st assertion that's found
                        return assertImpl;
                    }
                 }
View Full Code Here

TOP

Related Classes of org.apache.xerces.xs.XSMultiValueFacet

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.