use of org.apache.ws.commons.schema.XmlSchemaContentModel in project cxf by apache.
the class XmlSchemaUtils method getBaseType.
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();
}
use of org.apache.ws.commons.schema.XmlSchemaContentModel in project cxf by apache.
the class JavascriptUtils method getContentSequence.
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;
}
final XmlSchemaSequence sequence;
try {
sequence = (XmlSchemaSequence) particle;
} catch (ClassCastException cce) {
throw unsupportedConstruct("NON_SEQUENCE_PARTICLE", type);
}
return sequence;
}
Aggregations