本文整理了Java中org.apache.ws.commons.schema.XmlSchemaGroupBase.getItems()
方法的一些代码示例,展示了XmlSchemaGroupBase.getItems()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlSchemaGroupBase.getItems()
方法的具体详情如下:
包路径:org.apache.ws.commons.schema.XmlSchemaGroupBase
类名称: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();
内容来源于网络,如有侵权,请联系作者删除!