org.apache.ws.commons.schema.XmlSchemaObjectTable.getItem()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(145)

本文整理了Java中org.apache.ws.commons.schema.XmlSchemaObjectTable.getItem()方法的一些代码示例,展示了XmlSchemaObjectTable.getItem()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlSchemaObjectTable.getItem()方法的具体详情如下:
包路径:org.apache.ws.commons.schema.XmlSchemaObjectTable
类名称:XmlSchemaObjectTable
方法名:getItem

XmlSchemaObjectTable.getItem介绍

暂无

代码示例

代码示例来源:origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

public XmlSchemaElement getElementByName(QName name) {
  return (XmlSchemaElement)elements.getItem(name);
}

代码示例来源:origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

public XmlSchemaType getTypeByName(QName name) {
  return (XmlSchemaType)schemaTypes.getItem(name);
}

代码示例来源:origin: com.legsem.legstar/legstar-xsd2cob

/**
 * Get name for item from another schema.
 * 
 * @param table the other schema table
 * @param xsdObject the object for which we seek a name
 * @return the name
 */
protected static QName getName(final XmlSchemaObjectTable table,
    final XmlSchemaObject xsdObject) {
  for (Iterator < ? > it = table.getNames(); it.hasNext();) {
    QName name = (QName) it.next();
    if (xsdObject == table.getItem(name)) {
      return name;
    }
  }
  return null;
}

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

} else {
    XmlSchemaAttribute attribute = (XmlSchemaAttribute) attributes
            .getItem(name);
    if (deep) {
        if (attribute == null) {

代码示例来源:origin: org.apache.ws.schema/XmlSchema

XmlSchemaType type = (XmlSchemaType) schemaTypes.getItem(name);

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

} else {
  XmlSchemaElement element = (XmlSchemaElement) elements
      .getItem(name);
  if (deep) {
    if (element == null) {

代码示例来源:origin: org.apache.ws.schema/XmlSchema

} else {
    XmlSchemaAttribute attribute = (XmlSchemaAttribute) attributes
            .getItem(name);
    if (deep) {
        if (attribute == null) {

代码示例来源:origin: org.apache.ws.schema/XmlSchema

} else {
  XmlSchemaElement element = (XmlSchemaElement) elements
      .getItem(name);
  if (deep) {
    if (element == null) {

代码示例来源:origin: org.apache.ws.commons.schema/XmlSchema

XmlSchemaType type = (XmlSchemaType) schemaTypes.getItem(name);

代码示例来源:origin: org.apache.woden/woden-impl-commons

ed.setSystem(typeSystemURI);
ed.setContentModel(Constants.API_APACHE_WS_XS);
ed.setContent(elementTable.getItem(xseQN));
fDesc.addElementDeclaration(ed);

代码示例来源:origin: org.apache.woden/woden-impl-commons

td.setSystem(typeSystemURI);
td.setContentModel(Constants.API_APACHE_WS_XS);
td.setContent(typeTable.getItem(xstQN));
fDesc.addTypeDefinition(td);

代码示例来源:origin: com.legsem.legstar/legstar-xsd2cob

/**
 * Take all elements from a collection and process them.
 * 
 * @param items the parent collection
 * @param level the current level in the elements hierarchy.
 * @throws XsdMappingException if processing fails
 */
protected void processCollectionElements(
    final XmlSchemaObjectCollection items, final int level)
    throws XsdMappingException {
  /* Process each element in the collection */
  for (int i = 0; i < items.getCount(); i++) {
    XmlSchemaObject element = items.getItem(i);
    if (element instanceof XmlSchemaElement) {
      processElement((XmlSchemaElement) element, level);
    } else if (element instanceof XmlSchemaGroupRef) {
      /* This is a reference to a group so we fetch the group */
      XmlSchemaGroupRef groupRef = (XmlSchemaGroupRef) element;
      XmlSchemaGroup group = (XmlSchemaGroup) _schema.getGroups()
          .getItem(groupRef.getRefName());
      processParticle(group.getName(), group.getParticle(), level);
    }
  }
}

代码示例来源:origin: com.legsem.legstar/legstar-jaxbgen

/**
 * Take all elements from a collection and process them.
 * 
 * @param schema the XML Schema
 * @param jaxbNamespace the JAXB namespace
 * @param jaxbNamespacePrefix the JAXB namespace prefix
 * @param items the parent collection
 */
protected void processCollectionElements(final XmlSchema schema,
    final String jaxbNamespace, final String jaxbNamespacePrefix,
    final XmlSchemaObjectCollection items) {
  for (int i = 0; i < items.getCount(); i++) {
    XmlSchemaObject element = items.getItem(i);
    if (element instanceof XmlSchemaElement) {
      processElement(schema, jaxbNamespace, jaxbNamespacePrefix,
          (XmlSchemaElement) element);
    } else if (element instanceof XmlSchemaGroupRef) {
      XmlSchemaGroupRef groupRef = (XmlSchemaGroupRef) element;
      XmlSchemaGroup group = (XmlSchemaGroup) schema.getGroups()
          .getItem(groupRef.getRefName());
      processParticle(schema, jaxbNamespace, jaxbNamespacePrefix,
          group.getName(), group.getParticle());
    }
  }
}

相关文章