gpt4 book ai didi

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

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

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

XmlSchemaGroup.getParticle介绍

暂无

代码示例

代码示例来源:origin: apache/cxf

XmlSchemaParticle groupParticle = group.getParticle();

代码示例来源:origin: com.legsem.legstar/legstar.avro.translator

/**
 * Visit a base XSD element.
 * <p/>
 * Could be any of:
 * <ul>
 * <li>A regular element</li>
 * <li>A reference to a group</li>
 * <li>A choice</li>
 * </ul>
 * 
 * @param xmlSchema the input XML schema
 * @param element the base element
 * @param level the current level in the hierarchy
 * @param avroFields an array of avro fields being populated
 */
private void visit(XmlSchema xmlSchema, XmlSchemaObjectBase element,
    final int level, final ArrayNode avroFields) {
  if (element instanceof XmlSchemaElement) {
    visit(xmlSchema, (XmlSchemaElement) element, level, avroFields);
  } else if (element instanceof XmlSchemaGroupRef) {
    XmlSchemaGroupRef groupRef = (XmlSchemaGroupRef) element;
    XmlSchemaGroup group = xmlSchema.getGroups().get(
        groupRef.getRefName());
    visit(xmlSchema, group.getParticle(), level, avroFields);
  } else if (element instanceof XmlSchemaChoice) {
    visit(xmlSchema, (XmlSchemaChoice) element, level, avroFields);
  }
}

代码示例来源:origin: org.apache.axis2/axis2-adb-codegen

XmlSchemaGroupParticle xmlSchemaGroupParticle = xmlSchemaGroup.getParticle();
if (xmlSchemaGroupParticle != null) {
  if (xmlSchemaGroupParticle instanceof XmlSchemaSequence) {

代码示例来源:origin: apache/axis2-java

XmlSchemaGroupParticle xmlSchemaGroupParticle = xmlSchemaGroup.getParticle();
if (xmlSchemaGroupParticle != null) {
  if (xmlSchemaGroupParticle instanceof XmlSchemaSequence) {

代码示例来源: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