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? }
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? }
complexExtension.setBaseTypeName(basetype); complexExtension.setParticle(sequence); XmlSchemaComplexContent contentModel = new XmlSchemaComplexContent();
complexExtension.setBaseTypeName(basetype); complexExtension.setParticle(sequence); XmlSchemaComplexContent contentModel = new XmlSchemaComplexContent();
complexExtension.setBaseTypeName(basetype); complexExtension.setParticle(sequence); XmlSchemaComplexContent contentModel = new XmlSchemaComplexContent();
complexExtension.setBaseTypeName(basetype); complexExtension.setParticle(sequence); XmlSchemaComplexContent contentModel = new XmlSchemaComplexContent();
XmlSchemaComplexContentExtension extension = new XmlSchemaComplexContentExtension(); content.setContent(extension); extension.setBaseTypeName(sooperType.getSchemaType()); extension.setParticle(sequence); } else {
XmlSchemaComplexContentExtension extension = new XmlSchemaComplexContentExtension(); content.setContent(extension); extension.setBaseTypeName(sooperType.getSchemaType()); extension.setParticle(sequence); } else {