Codota Logo
XmlSchemaObjectCollection.getItem
Code IndexAdd Codota to your IDE (free)

How to use
getItem
method
in
org.apache.ws.commons.schema.XmlSchemaObjectCollection

Best Java code snippets using org.apache.ws.commons.schema.XmlSchemaObjectCollection.getItem (Showing top 20 results out of 315)

  • Common ways to obtain XmlSchemaObjectCollection
private void myMethod () {
XmlSchemaObjectCollection x =
  • Codota Iconnew XmlSchemaObjectCollection()
  • Codota IconXmlSchema xmlSchema;xmlSchema.getItems()
  • Codota IconXmlSchema xmlSchema;xmlSchema.getIncludes()
  • Smart code suggestions by Codota
}
origin: org.apache.ws.commons.schema/XmlSchema

  public String toString(String prefix, int tab) {
    String xml = new String();

    for (int i = 0; i < getCount(); i++) {
      xml += getItem(i).toString(prefix, tab);
    }


    return xml;

  }
}
origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

  public String toString(String prefix, int tab) {
    String xml = new String();

    for (int i = 0; i < getCount(); i++) {
      xml += getItem(i).toString(prefix, tab);
    }


    return xml;

  }
}
origin: org.apache.ws.schema/XmlSchema

  public String toString(String prefix, int tab) {
    String xml = new String();

    for (int i = 0; i < getCount(); i++) {
      xml += getItem(i).toString(prefix, tab);
    }


    return xml;

  }
}
origin: org.apache.ws.schema/XmlSchema

  public String toString(String prefix, int tab) {
    String xml = new String();
    for (int i = 0; i < tab; i++)
      xml += "\t";
    if (!prefix.equals("") && prefix.indexOf(":") == -1)
      prefix += ":";

    xml += "<" + prefix + "sequence>\n";
    for (int i = 0; i < items.getCount(); i++) {
      xml += items.getItem(i).toString(prefix, (tab + 1));
    }

    for (int i = 0; i < tab; i++)
      xml += "\t";

    xml += "</" + prefix + "sequence>\n";
    return xml;
  }
}
origin: org.apache.ws.commons.schema/XmlSchema

  public String toString(String prefix, int tab) {
    String xml = new String();
    for (int i = 0; i < tab; i++)
      xml += "\t";
    if (!prefix.equals("") && prefix.indexOf(":") == -1)
      prefix += ":";

    xml += "<" + prefix + "sequence>\n";
    for (int i = 0; i < items.getCount(); i++) {
      xml += items.getItem(i).toString(prefix, (tab + 1));
    }

    for (int i = 0; i < tab; i++)
      xml += "\t";

    xml += "</" + prefix + "sequence>\n";
    return xml;
  }
}
origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

  public String toString(String prefix, int tab) {
    String xml = new String();
    for (int i = 0; i < tab; i++)
      xml += "\t";
    if (!prefix.equals("") && prefix.indexOf(":") == -1)
      prefix += ":";

    xml += "<" + prefix + "sequence>\n";
    for (int i = 0; i < items.getCount(); i++) {
      xml += items.getItem(i).toString(prefix, (tab + 1));
    }

    for (int i = 0; i < tab; i++)
      xml += "\t";

    xml += "</" + prefix + "sequence>\n";
    return xml;
  }
}
origin: org.apache.ws.schema/XmlSchema

void setupAttr(Document doc, XmlSchemaObjectCollection collectionObj,
        XmlSchema schema, Element container) throws XmlSchemaSerializerException {
  int collectionLength = collectionObj.getCount();
  for (int i = 0; i < collectionLength; i++) {
    XmlSchemaObject obj = collectionObj.getItem(i);
    if (obj instanceof XmlSchemaAttribute) {
      XmlSchemaAttribute attr = (XmlSchemaAttribute) obj;
      Element attrEl = serializeAttribute(doc, attr, schema);
      container.appendChild(attrEl);
    } else if (obj instanceof XmlSchemaAttributeGroupRef) {
      XmlSchemaAttributeGroupRef attr = (XmlSchemaAttributeGroupRef) obj;
      Element attrEl = serializeAttributeGroupRef(doc, attr, schema);
      container.appendChild(attrEl);
    }
  }
}
origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

void setupAttr(Document doc, XmlSchemaObjectCollection collectionObj,
        XmlSchema schema, Element container) throws XmlSchemaSerializerException {
  int collectionLength = collectionObj.getCount();
  for (int i = 0; i < collectionLength; i++) {
    XmlSchemaObject obj = collectionObj.getItem(i);
    if (obj instanceof XmlSchemaAttribute) {
      XmlSchemaAttribute attr = (XmlSchemaAttribute) obj;
      Element attrEl = serializeAttribute(doc, attr, schema);
      container.appendChild(attrEl);
    } else if (obj instanceof XmlSchemaAttributeGroupRef) {
      XmlSchemaAttributeGroupRef attr = (XmlSchemaAttributeGroupRef) obj;
      Element attrEl = serializeAttributeGroupRef(doc, attr, schema);
      container.appendChild(attrEl);
    }
  }
}
origin: org.apache.ws.commons.schema/XmlSchema

void setupAttr(Document doc, XmlSchemaObjectCollection collectionObj,
        XmlSchema schema, Element container) throws XmlSchemaSerializerException {
  int collectionLength = collectionObj.getCount();
  for (int i = 0; i < collectionLength; i++) {
    XmlSchemaObject obj = collectionObj.getItem(i);
    if (obj instanceof XmlSchemaAttribute) {
      XmlSchemaAttribute attr = (XmlSchemaAttribute) obj;
      Element attrEl = serializeAttribute(doc, attr, schema);
      container.appendChild(attrEl);
    } else if (obj instanceof XmlSchemaAttributeGroupRef) {
      XmlSchemaAttributeGroupRef attr = (XmlSchemaAttributeGroupRef) obj;
      Element attrEl = serializeAttributeGroupRef(doc, attr, schema);
      container.appendChild(attrEl);
    }
  }
}
origin: org.apache.ws.schema/XmlSchema

public String toString(String prefix, int tab) {
  String xml = new String();
  for (int i = 0; i < tab; i++)
    xml += "\t";
  if (!prefix.equals("") && prefix.indexOf(":") == -1)
    prefix += ":";
  String typeName = name != null ? name : "";
  xml += "<" + prefix + "complexType name=\"" + typeName + "\">\n";
  if (particle != null)
    xml += particle.toString(prefix, (tab + 1));
  if (contentModel != null)
    xml += contentModel.toString(prefix, (tab + 1));
  for (int i = 0; i < attributes.getCount(); i++) {
    xml += attributes.getItem(i).toString(prefix, (tab + 1));
  }
  for (int i = 0; i < tab; i++)
    xml += "\t";
  xml += "</" + prefix + "complexType>\n";
  return xml;
}
origin: org.apache.ws.commons.schema/XmlSchema

public String toString(String prefix, int tab) {
  String xml = new String();
  for (int i = 0; i < tab; i++)
    xml += "\t";
  if (!prefix.equals("") && prefix.indexOf(":") == -1)
    prefix += ":";
  String typeName = name != null ? name : "";
  xml += "<" + prefix + "complexType name=\"" + typeName + "\">\n";
  if (particle != null)
    xml += particle.toString(prefix, (tab + 1));
  if (contentModel != null)
    xml += contentModel.toString(prefix, (tab + 1));
  for (int i = 0; i < attributes.getCount(); i++) {
    xml += attributes.getItem(i).toString(prefix, (tab + 1));
  }
  for (int i = 0; i < tab; i++)
    xml += "\t";
  xml += "</" + prefix + "complexType>\n";
  return xml;
}
origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

private static String getResultRowName(XmlSchemaComplexType wrapperSchemaComplexType) {
  return ((XmlSchemaElement) ((XmlSchemaSequence) wrapperSchemaComplexType
      .getParticle()).getItems().getItem(0)).getName();
}
 
origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

private static XmlSchemaComplexType getRowNameBasedSchemaComplexType(
    XmlSchemaComplexType wrapperSchemaComplexType) {
  return (((XmlSchemaComplexType) ((XmlSchemaElement) ((XmlSchemaSequence) wrapperSchemaComplexType
      .getParticle()).getItems().getItem(0)).getSchemaType()));
}
 
origin: com.legsem.legstar/legstar-xsd2cob

/** {@inheritDoc} */
public void processElement(final XmlSchema schema,
    final XmlSchemaElement xsdElement, final int level)
    throws XsdMappingException {
  XmlSchemaAnnotation annotation = xsdElement.getAnnotation();
  if (annotation != null && annotation.getItems().getCount() > 0) {
    XmlSchemaAppInfo appinfo = (XmlSchemaAppInfo) annotation.getItems()
        .getItem(0);
    if (appinfo.getMarkup() != null) {
      for (int i = 0; i < appinfo.getMarkup().getLength(); i++) {
        Node node = appinfo.getMarkup().item(i);
        if (node instanceof Element
            && node.getLocalName().equals(CobolMarkup.ELEMENT)
            && node.getNamespaceURI().equals(CobolMarkup.NS)) {
          writeElement(schema, xsdElement, _writer,
              (Element) node, level);
        }
      }
    }
  }
}
origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

/**
 * Checks if the specified schema import is existent.
 * @param schema The target schema to be checked
 * @param schemaImport The schema import
 * @return true if the schema import is there in the given schema
 */
private static boolean containsSchemaImport(XmlSchema schema, XmlSchemaImport schemaImport) {
  XmlSchemaObjectCollection list = schema.getItems();
  int c = list.getCount();
  XmlSchemaObject obj;
  for (int i = 0; i < c; i++) {
    obj = list.getItem(i);
    if (obj instanceof XmlSchemaImport) {
      if (((XmlSchemaImport) obj).getNamespace().equals(schemaImport.getNamespace())) {
        return true;
      }
    }
  }
  return false;
}
 
origin: org.springframework.ws/org.springframework.xml

private void findImports(XmlSchema schema, Set<XmlSchema> processedImports, Set<XmlSchema> processedIncludes) {
  processedImports.add(schema);
  XmlSchemaObjectCollection includes = schema.getIncludes();
  for (int i = 0; i < includes.getCount(); i++) {
    XmlSchemaExternal external = (XmlSchemaExternal) includes.getItem(i);
    if (external instanceof XmlSchemaImport) {
      XmlSchemaImport schemaImport = (XmlSchemaImport) external;
      XmlSchema importedSchema = schemaImport.getSchema();
      if (!"http://www.w3.org/XML/1998/namespace".equals(schemaImport.getNamespace()) &&
          importedSchema != null && !processedImports.contains(importedSchema)) {
        inlineIncludes(importedSchema, processedIncludes, processedImports);
        findImports(importedSchema, processedImports, processedIncludes);
        xmlSchemas.add(importedSchema);
      }
      // remove the schemaLocation
      external.setSchemaLocation(null);
    }
  }
}
origin: org.springframework.ws/org.springframework.xml

private void inlineIncludes(XmlSchema schema, Set<XmlSchema> processedIncludes, Set<XmlSchema> processedImports) {
  processedIncludes.add(schema);
  XmlSchemaObjectCollection schemaItems = schema.getItems();
  for (int i = 0; i < schemaItems.getCount(); i++) {
    XmlSchemaObject schemaObject = schemaItems.getItem(i);
    if (schemaObject instanceof XmlSchemaInclude) {
      XmlSchema includedSchema = ((XmlSchemaInclude) schemaObject).getSchema();
      if (!processedIncludes.contains(includedSchema)) {
        inlineIncludes(includedSchema, processedIncludes, processedImports);
        findImports(includedSchema, processedImports, processedIncludes);
        XmlSchemaObjectCollection includeItems = includedSchema.getItems();
        for (int j = 0; j < includeItems.getCount(); j++) {
          XmlSchemaObject includedItem = includeItems.getItem(j);
          schemaItems.add(includedItem);
        }
      }
      // remove the <include/>
      schemaItems.removeAt(i);
      i--;
    }
  }
}
origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

private static XmlSchemaObjectCollection getSchemaObjectsFromComplexType(XmlSchemaComplexType schemaComplexType) {
  XmlSchemaObjectCollection collection = new XmlSchemaObjectCollection();
  XmlSchemaSequence sequence = (XmlSchemaSequence) schemaComplexType.getParticle();
  if (sequence != null) {
    XmlSchemaObjectCollection seqItems = sequence.getItems();
    int c = seqItems.getCount();
    for (int i = 0; i < c; i++) {
      // add elements
      collection.add(seqItems.getItem(i));
    }
  }
  XmlSchemaObjectCollection attrItems = schemaComplexType.getAttributes();
  int c = attrItems.getCount();
  for (int i = 0; i < c; i++) {
    // add attributes
    collection.add(attrItems.getItem(i));
  }
  return collection;
}
 
origin: org.codehaus.xfire/xfire-core

private static boolean containsAnonymousTypes(XmlSchemaComplexType ct) {
  XmlSchemaGroupBase particle = (XmlSchemaGroupBase)ct.getParticle();
  if (particle == null) {
    return false;
  }
  
  XmlSchemaObjectCollection items = particle.getItems();
  for (int i = 0; i < items.getCount(); i++) {
    XmlSchemaObject item = items.getItem(i);
    if (item instanceof XmlSchemaElement) {
      XmlSchemaElement el = (XmlSchemaElement) item;
      
      if (el.getSchemaTypeName() == null) return true;
    } else if (item instanceof XmlSchemaElement) {
      XmlSchemaComplexType el = (XmlSchemaComplexType) item;
      
      if (el.getParticle() != null) return true;
    }
  }
  return false;
}
 
origin: org.apache.tuscany.sca/tuscany-binding-ws-wsdlgen

public void fixUpMovedTypeReferences(String fromNamespace, String toNamespace, XmlSchemaObject fixUpObj, List<XmlSchema> relatedSchema){
  
  if (!(fixUpObj instanceof XmlSchemaComplexType)){
    return;
  }
  
  for (XmlSchema schema : relatedSchema){
    int importRemoveIndex = -1;
    for (int i = 0; i < schema.getItems().getCount(); i++){
      XmlSchemaObject obj = schema.getItems().getItem(i);
      
      processXMLSchemaObject(toNamespace, obj, fixUpObj);
      
      // remove FROM imports
      if (obj instanceof XmlSchemaImport &&
        ((XmlSchemaImport)obj).getNamespace().equals(fromNamespace)){
        importRemoveIndex = i;
      }
    }
    if (importRemoveIndex >= 0){
      schema.getItems().removeAt(importRemoveIndex);
    }
  }
}

org.apache.ws.commons.schemaXmlSchemaObjectCollectiongetItem

Popular methods of XmlSchemaObjectCollection

  • getIterator
  • getCount
  • add
  • <init>
    Creates new XmlSchemaObjectCollection
  • removeAt
  • toString

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • getContentResolver (Context)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now