Refine search
public static QName getBaseType(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; return ext.getBaseTypeName(); }
XmlSchemaSequence seq = (XmlSchemaSequence)type.getParticle(); if (seq == null && type.getContentModel() != null) { XmlSchemaContent xmlSchemaConent = type.getContentModel().getContent(); if (xmlSchemaConent instanceof XmlSchemaComplexContentExtension) { XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type .getContentModel().getContent(); QName baseTypeName = extension.getBaseTypeName(); XmlSchemaType schemaType = schema.getTypeByQName(baseTypeName); if (schemaType instanceof XmlSchemaComplexType) { if (extension.getParticle() instanceof XmlSchemaSequence) { XmlSchemaSequence xmlSchemaSeq = (XmlSchemaSequence)extension.getParticle(); qnames.addAll(createWrappedElements(xmlSchemaSeq));
return; XmlSchemaContent content = contentModel.getContent(); if (content == null) { return; XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName()); addCrossImportsAttributeList(schema, extension.getAttributes()); XmlSchemaParticle particle = extension.getParticle(); if (particle instanceof XmlSchemaSequence) { addCrossImports(schema, (XmlSchemaSequence)particle);
public static XmlSchemaSequence getContentSequence(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; XmlSchemaParticle particle = ext.getParticle(); if (particle == null) { return null; } XmlSchemaSequence sequence = null; try { sequence = (XmlSchemaSequence) particle; } catch (ClassCastException cce) { unsupportedConstruct("NON_SEQUENCE_PARTICLE", type); } return sequence; }
public static List<XmlSchemaAttributeOrGroupRef> getContentAttributes(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; return ext.getAttributes(); }
private static boolean isSoapArray(final XmlSchemaComplexType complexType) { // Soap arrays are based on complex content restriction final XmlSchemaContentModel contentModel = complexType.getContentModel(); if (contentModel == null) { return false; } final XmlSchemaContent content = contentModel.getContent(); if (!(content instanceof XmlSchemaComplexContentRestriction)) { return false; } final XmlSchemaComplexContentRestriction restriction = (XmlSchemaComplexContentRestriction) content; return SOAP_ARRAY.equals(restriction.getBaseTypeName()); }
public String toString(String prefix, int tab) { String xml = new String(); for (int i = 0; i < tab; i++) xml += "\t"; if (!prefix.equals("") && prefix.indexOf(":") == -1) prefix += ":"; String typeName = name != null ? name : ""; xml += "<" + prefix + "complexType name=\"" + typeName + "\">\n"; if (particle != null) xml += particle.toString(prefix, (tab + 1)); if (contentModel != null) xml += contentModel.toString(prefix, (tab + 1)); for (int i = 0; i < attributes.getCount(); i++) { xml += attributes.getItem(i).toString(prefix, (tab + 1)); } for (int i = 0; i < tab; i++) xml += "\t"; xml += "</" + prefix + "complexType>\n"; return xml; }
private static boolean isWrappableSequence(XmlSchemaComplexType type, String namespaceURI, MessageInfo wrapper, boolean allowRefs) { if (!hasAttributes(type)) { if (type.getParticle() instanceof XmlSchemaSequence) { XmlSchemaSequence seq = (XmlSchemaSequence)type.getParticle(); return buildMessageParts(seq, namespaceURI, wrapper, allowRefs); } else if (type.getParticle() == null) { if (type.getContentModel() == null) { return true; if (type.getContentModel().getContent() instanceof XmlSchemaComplexContentExtension) { XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type .getContentModel().getContent(); QName baseTypeName = extension.getBaseTypeName(); ServiceInfo serviceInfo = wrapper.getOperation().getInterface().getService(); XmlSchemaType schemaType = serviceInfo.getXmlSchemaCollection().getTypeByQName(baseTypeName); if (extension.getParticle() instanceof XmlSchemaSequence) { XmlSchemaSequence seq = (XmlSchemaSequence)extension.getParticle(); return buildMessageParts(seq, namespaceURI, wrapper, allowRefs);
return; XmlSchemaContent content = contentModel.getContent(); if (content == null) { return; XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName()); addCrossImportsAttributeList(schema, extension.getAttributes()); XmlSchemaParticle particle = extension.getParticle(); if (particle instanceof XmlSchemaSequence) { addCrossImports(schema, (XmlSchemaSequence)particle);
public static XmlSchemaSequence getContentSequence(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; XmlSchemaParticle particle = ext.getParticle(); if (particle == null) { return null; } XmlSchemaSequence sequence = null; try { sequence = (XmlSchemaSequence) particle; } catch (ClassCastException cce) { unsupportedConstruct("NON_SEQUENCE_PARTICLE", type); } return sequence; }
public static List<XmlSchemaAttributeOrGroupRef> getContentAttributes(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; return ext.getAttributes(); }
final XmlSchemaComplexContentRestriction restriction = (XmlSchemaComplexContentRestriction) complexType.getContentModel().getContent();
public String toString(String prefix, int tab) { String xml = new String(); for (int i = 0; i < tab; i++) xml += "\t"; if (!prefix.equals("") && prefix.indexOf(":") == -1) prefix += ":"; String typeName = name != null ? name : ""; xml += "<" + prefix + "complexType name=\"" + typeName + "\">\n"; if (particle != null) xml += particle.toString(prefix, (tab + 1)); if (contentModel != null) xml += contentModel.toString(prefix, (tab + 1)); for (int i = 0; i < attributes.getCount(); i++) { xml += attributes.getItem(i).toString(prefix, (tab + 1)); } for (int i = 0; i < tab; i++) xml += "\t"; xml += "</" + prefix + "complexType>\n"; return xml; }
private static boolean isWrappableSequence(XmlSchemaComplexType type, String namespaceURI, MessageInfo wrapper, boolean allowRefs) { if (!hasAttributes(type)) { if (type.getParticle() instanceof XmlSchemaSequence) { XmlSchemaSequence seq = (XmlSchemaSequence)type.getParticle(); return buildMessageParts(seq, namespaceURI, wrapper, allowRefs); } else if (type.getParticle() == null) { if (type.getContentModel() == null) { return true; if (type.getContentModel().getContent() instanceof XmlSchemaComplexContentExtension) { XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type .getContentModel().getContent(); QName baseTypeName = extension.getBaseTypeName(); ServiceInfo serviceInfo = wrapper.getOperation().getInterface().getService(); XmlSchemaType schemaType = serviceInfo.getXmlSchemaCollection().getTypeByQName(baseTypeName); if (extension.getParticle() instanceof XmlSchemaSequence) { XmlSchemaSequence seq = (XmlSchemaSequence)extension.getParticle(); return buildMessageParts(seq, namespaceURI, wrapper, allowRefs);
public static QName getBaseType(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; return ext.getBaseTypeName(); }
return; XmlSchemaContent content = contentModel.getContent(); if (content == null) { return; XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName()); addCrossImportsAttributeList(schema, extension.getAttributes()); XmlSchemaParticle particle = extension.getParticle(); if (particle instanceof XmlSchemaSequence) { addCrossImports(schema, (XmlSchemaSequence)particle);
public static XmlSchemaSequence getContentSequence(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; XmlSchemaParticle particle = ext.getParticle(); if (particle == null) { return null; } XmlSchemaSequence sequence = null; try { sequence = (XmlSchemaSequence) particle; } catch (ClassCastException cce) { unsupportedConstruct("NON_SEQUENCE_PARTICLE", type); } return sequence; }
public static List<XmlSchemaAttributeOrGroupRef> getContentAttributes(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } //TODO: the anyAttribute case. XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; return ext.getAttributes(); }
public String toString(String prefix, int tab) { String xml = new String(); for (int i = 0; i < tab; i++) xml += "\t"; if (!prefix.equals("") && prefix.indexOf(":") == -1) prefix += ":"; String typeName = name != null ? name : ""; xml += "<" + prefix + "complexType name=\"" + typeName + "\">\n"; if (particle != null) xml += particle.toString(prefix, (tab + 1)); if (contentModel != null) xml += contentModel.toString(prefix, (tab + 1)); for (int i = 0; i < attributes.getCount(); i++) { xml += attributes.getItem(i).toString(prefix, (tab + 1)); } for (int i = 0; i < tab; i++) xml += "\t"; xml += "</" + prefix + "complexType>\n"; return xml; } }
private static boolean isWrappableSequence(XmlSchemaComplexType type, String namespaceURI, MessageInfo wrapper, boolean allowRefs) { if (!hasAttributes(type)) { if (type.getParticle() instanceof XmlSchemaSequence) { XmlSchemaSequence seq = (XmlSchemaSequence)type.getParticle(); return buildMessageParts(seq, namespaceURI, wrapper, allowRefs); } else if (type.getParticle() == null) { if (type.getContentModel() == null) { return true; if (type.getContentModel().getContent() instanceof XmlSchemaComplexContentExtension) { XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type .getContentModel().getContent(); QName baseTypeName = extension.getBaseTypeName(); ServiceInfo serviceInfo = wrapper.getOperation().getInterface().getService(); XmlSchemaType schemaType = serviceInfo.getXmlSchemaCollection().getTypeByQName(baseTypeName); if (extension.getParticle() instanceof XmlSchemaSequence) { XmlSchemaSequence seq = (XmlSchemaSequence)extension.getParticle(); return buildMessageParts(seq, namespaceURI, wrapper, allowRefs);