gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-26 01:07:05 27 4
gpt4 key购买 nike

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

XmlSchemaGroup.getName介绍

暂无

代码示例

代码示例来源: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());
    }
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com