Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.StringList


      XSTypeDefinition baseTypeDef = type.getBaseType();
      TypeBinding baseType = baseTypeDef == null ? null : bindType(ctx, 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


               }
            }
         }
      }

      StringList namespaceList = model.getNamespaces();
      Set<String> namespaces = new LinkedHashSet<String>(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

               }
            }
         }
      }

      StringList namespaceList = model.getNamespaces();
      Set<String> namespaces = new LinkedHashSet<String>(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

      map.put(typeNS,getResourceURL("/tools/wsdlfixture/customtype/CustomTypeObj.xsd"));
      map.put(arrTypeNS,getResourceURL("/tools/wsdlfixture/customtype/CustomTypeArrays.xsd"));

      ((XMLSchemaLoader)xsloader).setEntityResolver(new JBossXSEntityResolver(new JBossWSEntityResolver(), map));
      //Construct a StringList
      StringList slist = new StringListImpl(arr, 2);
      XSModel xsmodel = xsloader.loadURIList(slist);
      assertNotNull("XSModel is null?", xsmodel);

      XSNamedMap xsnamedmap = getXSNamedMap(xsmodel, typeNS);
      assertNotNull("XSNamedMap is null?", xsnamedmap);
View Full Code Here

   public static String getTargetNamespace(XSModel xsmodel)
   {
      if (xsmodel == null)
         throw new IllegalArgumentException("Illegal Null Argument: xsmodel");
      String targetNS = null;
      StringList slist = xsmodel.getNamespaces();
      int len = slist != null ? slist.getLength() : 0;
      for (int i = 0; i < len; i++)
      {
         String ns = slist.item(i);
         if (Constants.NS_SCHEMA_XSD.equals(ns))
            continue;
         targetNS = ns;
         break;
      }
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

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.