Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.StringList


        sendElementEvent(
            "psv:variety",
            this.translateConstraintType(wildcard.getConstraintType()));

        StringBuffer constraintBuffer = new StringBuffer();
        StringList constraints = wildcard.getNsConstraintList();
        if (constraints != null && constraints.getLength() > 0) {
            for (int i = 0; i < constraints.getLength() - 1; i++) {
                constraintBuffer.append(constraints.item(i));
                constraintBuffer.append(" ");
            }
            constraintBuffer.append(
                constraints.item(constraints.getLength() - 1));
        }
        sendElementEvent("psv:namespaces", constraintBuffer.toString());

        sendUnIndentedElement("psv:namespaceConstraint");
        sendElementEvent(
View Full Code Here


        XSObjectList mvFacets = simpleTypeDefn.getMultiValueFacets();
        for (int mvFacetIdx = 0; mvFacetIdx < mvFacets.getLength();
                                              mvFacetIdx++) {
           XSMultiValueFacet mvFacet = (XSMultiValueFacet)
                                              mvFacets.item(mvFacetIdx);
           StringList facetValues = mvFacet.getLexicalFacetValues();
           for (int facValIdex = 0; facValIdex < facetValues.getLength();
                                                 facValIdex++) {
               String facetValue = (String) facetValues.get(facValIdex);
               Element facetDomNode = null;
               if (mvFacet.getFacetKind() == XSSimpleTypeDefinition.
                                             FACET_ENUMERATION) {
                   facetDomNode = document.createElementNS(
                                             XSD_LANGUAGE_URI,
View Full Code Here

        XSObjectList mvFacets = simpleTypeDefn.getMultiValueFacets();
        for (int mvFacetIdx = 0; mvFacetIdx < mvFacets.getLength();
                                              mvFacetIdx++) {
           XSMultiValueFacet mvFacet = (XSMultiValueFacet)
                                              mvFacets.item(mvFacetIdx);
           StringList facetValues = mvFacet.getLexicalFacetValues();
           for (int facValIdex = 0; facValIdex < facetValues.getLength();
                                                 facValIdex++) {
               String facetValue = (String) facetValues.get(facValIdex);
               Element facetDomNode = null;
               if (mvFacet.getFacetKind() == XSSimpleTypeDefinition.
                                             FACET_ENUMERATION) {
                   facetDomNode = document.createElementNS(
                                             XSD_LANGUAGE_URI,
View Full Code Here

        processPSVISchemaAnnotations(item.getAnnotations());
        sendUnIndentedElement("psv:namespaceSchemaInformation");
    }

    private void processPSVISchemaDocuments(XSNamespaceItem item) {
        StringList locations =
            item == null ? null : item.getDocumentLocations();
        if (locations == null || locations.getLength() == 0) {
            sendEmptyElementEvent("psv:schemaDocuments");
            return;
        }
        sendIndentedElement("psv:schemaDocuments");
        for (int i = 0; i < locations.getLength(); i++) {
            sendIndentedElement("psv:schemaDocument");
            sendElementEvent("psv:documentLocation", locations.item(i));
            // It's supposed to point to a <document> element, and we're not really
            // dealing with those (except for the one at the root)
            sendElementEvent("psv:document");
            sendUnIndentedElement("psv:schemaDocument");
        }
View Full Code Here

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

        sendElementEvent(
            "psv:variety",
            this.translateConstraintType(wildcard.getConstraintType()));

        StringBuffer constraintBuffer = new StringBuffer();
        StringList constraints = wildcard.getNsConstraintList();
        if (constraints != null && constraints.getLength() > 0) {
            for (int i = 0; i < constraints.getLength() - 1; i++) {
                constraintBuffer.append(constraints.item(i));
                constraintBuffer.append(" ");
            }
            constraintBuffer.append(
                constraints.item(constraints.getLength() - 1));
        }
        sendElementEvent("psv:namespaces", constraintBuffer.toString());

        sendUnIndentedElement("psv:namespaceConstraint");
        sendElementEvent(
View Full Code Here

               }
            }
         }
      }

      StringList namespaceList = model.getNamespaces();
      Set namespaces = new LinkedHashSet(namespaceList.getLength());
      for (int i = 0; i < namespaceList.getLength(); ++i)
         namespaces.add(namespaceList.item(i));
      schema.setNamespaces(namespaces);
     
      XSNamedMap groups = model.getComponents(XSConstants.MODEL_GROUP_DEFINITION);
      if (trace)
         log.trace("Model groups: " + groups.getLength());
View Full Code Here

      XSTypeDefinition baseTypeDef = type.getBaseType();
      TypeBinding baseType = baseTypeDef == null ? null : bindType(baseTypeDef);

      binding = baseType == null ? new TypeBinding(typeName) : new TypeBinding(typeName, baseType);

      StringList strList = type.getLexicalPattern();
      if(strList != null && strList.getLength() > 0)
      {
         for(int i = 0; i < strList.getLength(); ++i)
         {
            binding.addLexicalPattern(strList.item(i));
         }
      }

      strList = type.getLexicalEnumeration();
      if(strList != null && strList.getLength() > 0)
      {
         for(int i = 0; i < strList.getLength(); ++i)
         {
            binding.addEnumValue(strList.item(i));
         }
      }

      if(type.getItemType() != null)
      {
View Full Code Here

        updateImportListFor(newGrammar);
        return newGrammar;
    }

    private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
        final StringList locations = srcGrammar.getDocumentLocations();
        final int locSize = locations.size();
        final StringList locations2 = dstGrammar.getDocumentLocations();
       
        for (int i=0; i<locSize; i++) {
            String loc = locations.item(i);
            if (!locations2.contains(loc)) {
                dstGrammar.addDocument(null, loc);
            }
        }
    }
View Full Code Here

               }
            }
         }
      }

      StringList namespaceList = model.getNamespaces();
      Set namespaces = new LinkedHashSet(namespaceList.getLength());
      for (int i = 0; i < namespaceList.getLength(); ++i)
         namespaces.add(namespaceList.item(i));
      schema.setNamespaces(namespaces);
     
      XSNamedMap groups = model.getComponents(XSConstants.MODEL_GROUP_DEFINITION);
      if (ctx.trace)
         log.trace("Model groups: " + groups.getLength());
View Full Code Here

TOP

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

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.