gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-18 15:10:40 28 4
gpt4 key购买 nike

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

XmlSchemaGroupBase.getItems介绍

暂无

代码示例

代码示例来源:origin: org.apache.openejb/openejb-axis

private static List<XmlSchemaElement> getNestedElements(final XmlSchemaComplexType complexType) {
    final List<XmlSchemaElement> elements = new ArrayList<XmlSchemaElement>();
    final XmlSchemaParticle particle = complexType.getParticle();
    if (particle instanceof XmlSchemaElement) {
      final XmlSchemaElement element = (XmlSchemaElement) particle;
      elements.add(element);
    } else if (particle instanceof XmlSchemaGroupBase && !(particle instanceof XmlSchemaChoice)) {
      final XmlSchemaGroupBase groupBase = (XmlSchemaGroupBase) particle;
      for (final Iterator iterator = groupBase.getItems().getIterator(); iterator.hasNext(); ) {
        final XmlSchemaParticle child = (XmlSchemaParticle) iterator.next();
        if (child instanceof XmlSchemaElement) {
          final XmlSchemaElement element = (XmlSchemaElement) child;
          elements.add(element);
        }
      }
    } else {
      // ignore all other types... you can have these other types, but JAX-RPC doesn't support them
    }
    return elements;
  }
}

代码示例来源:origin: org.apache.axis2.transport/axis2-transport-xmpp

if (particle instanceof XmlSchemaSequence || particle instanceof XmlSchemaAll) {
  XmlSchemaGroupBase xmlSchemaGroupBase = (XmlSchemaGroupBase)particle;
  Iterator iterator = xmlSchemaGroupBase.getItems().getIterator();

代码示例来源: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 processXMLSchemaObject(String toNamespace, XmlSchemaObject obj,  XmlSchemaObject fixUpObj){
  if (obj instanceof XmlSchemaComplexType){
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getParticle(), fixUpObj);
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getContentModel(), fixUpObj);
  } else if (obj instanceof XmlSchemaComplexContent){
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexContent)obj).getContent(), fixUpObj);            
  } else if (obj instanceof XmlSchemaElement){
    XmlSchemaElement element = (XmlSchemaElement)obj;
    if(element.getSchemaType() == fixUpObj){
      QName name = element.getSchemaTypeName();
      QName newName = new QName(toNamespace, name.getLocalPart());
      element.setSchemaTypeName(newName);
    }
    ((XmlSchemaElement)obj).getSchemaType();
  } else if (obj instanceof XmlSchemaGroupBase){
    XmlSchemaObjectCollection items = ((XmlSchemaGroupBase)obj).getItems();
    Iterator<XmlSchemaObject> iter = items.getIterator();
    while(iter.hasNext()){
      processXMLSchemaObject(toNamespace, iter.next(), fixUpObj);
    }
  } else if (obj instanceof XmlSchemaComplexContentExtension){
    XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)obj;
    QName name = extension.getBaseTypeName();
    QName newName = new QName(toNamespace, name.getLocalPart());
    extension.setBaseTypeName(newName);
  }
  // TODO - what other structure items will be generated by JAXB?
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

public void processXMLSchemaObject(String toNamespace, XmlSchemaObject obj,  XmlSchemaObject fixUpObj){
  if (obj instanceof XmlSchemaComplexType){
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getParticle(), fixUpObj);
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getContentModel(), fixUpObj);
  } else if (obj instanceof XmlSchemaComplexContent){
    processXMLSchemaObject(toNamespace, ((XmlSchemaComplexContent)obj).getContent(), fixUpObj);            
  } else if (obj instanceof XmlSchemaElement){
    XmlSchemaElement element = (XmlSchemaElement)obj;
    if(element.getSchemaType() == fixUpObj){
      QName name = element.getSchemaTypeName();
      QName newName = new QName(toNamespace, name.getLocalPart());
      element.setSchemaTypeName(newName);
    }
    ((XmlSchemaElement)obj).getSchemaType();
  } else if (obj instanceof XmlSchemaGroupBase){
    XmlSchemaObjectCollection items = ((XmlSchemaGroupBase)obj).getItems();
    Iterator<XmlSchemaObject> iter = items.getIterator();
    while(iter.hasNext()){
      processXMLSchemaObject(toNamespace, iter.next(), fixUpObj);
    }
  } else if (obj instanceof XmlSchemaComplexContentExtension){
    XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)obj;
    QName name = extension.getBaseTypeName();
    QName newName = new QName(toNamespace, name.getLocalPart());
    extension.setBaseTypeName(newName);
  }
  // TODO - what other structure items will be generated by JAXB?
}

代码示例来源:origin: org.apache.axis2.transport/axis2-transport-sms

if (particle instanceof XmlSchemaSequence || particle instanceof XmlSchemaAll) {
  XmlSchemaGroupBase xmlSchemaGroupBase = (XmlSchemaGroupBase)particle;
  Iterator iterator = xmlSchemaGroupBase.getItems().getIterator();

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