Search in sources :

Example 6 with XmlSchemaContentModel

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();
}
Also used : XmlSchemaComplexContentExtension(org.apache.ws.commons.schema.XmlSchemaComplexContentExtension) XmlSchemaContent(org.apache.ws.commons.schema.XmlSchemaContent) XmlSchemaContentModel(org.apache.ws.commons.schema.XmlSchemaContentModel)

Example 7 with XmlSchemaContentModel

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;
}
Also used : XmlSchemaComplexContentExtension(org.apache.ws.commons.schema.XmlSchemaComplexContentExtension) XmlSchemaSequence(org.apache.ws.commons.schema.XmlSchemaSequence) XmlSchemaContent(org.apache.ws.commons.schema.XmlSchemaContent) XmlSchemaContentModel(org.apache.ws.commons.schema.XmlSchemaContentModel) XmlSchemaParticle(org.apache.ws.commons.schema.XmlSchemaParticle)

Aggregations

XmlSchemaContent (org.apache.ws.commons.schema.XmlSchemaContent)7 XmlSchemaContentModel (org.apache.ws.commons.schema.XmlSchemaContentModel)7 XmlSchemaComplexContentExtension (org.apache.ws.commons.schema.XmlSchemaComplexContentExtension)6 XmlSchemaComplexContentRestriction (org.apache.ws.commons.schema.XmlSchemaComplexContentRestriction)4 XmlSchemaSimpleContentExtension (org.apache.ws.commons.schema.XmlSchemaSimpleContentExtension)3 XmlSchemaSimpleContentRestriction (org.apache.ws.commons.schema.XmlSchemaSimpleContentRestriction)3 QName (javax.xml.namespace.QName)2 XmlSchemaComplexType (org.apache.ws.commons.schema.XmlSchemaComplexType)2 XmlSchemaParticle (org.apache.ws.commons.schema.XmlSchemaParticle)2 IOMessageImpl (eu.esdihumboldt.hale.common.core.io.report.impl.IOMessageImpl)1 DefaultPropertyDefinition (eu.esdihumboldt.hale.common.schema.model.impl.DefaultPropertyDefinition)1 ComplexContentHasValue (eu.esdihumboldt.hale.io.xsd.model.ComplexContentHasValue)1 AnonymousXmlType (eu.esdihumboldt.hale.io.xsd.reader.internal.AnonymousXmlType)1 SubstitutionGroupProperty (eu.esdihumboldt.hale.io.xsd.reader.internal.SubstitutionGroupProperty)1 XmlElementReferenceProperty (eu.esdihumboldt.hale.io.xsd.reader.internal.XmlElementReferenceProperty)1 XmlTypeDefinition (eu.esdihumboldt.hale.io.xsd.reader.internal.XmlTypeDefinition)1 XmlSchemaObjectCollection (org.apache.ws.commons.schema.XmlSchemaObjectCollection)1 XmlSchemaSequence (org.apache.ws.commons.schema.XmlSchemaSequence)1 XmlSchemaSimpleType (org.apache.ws.commons.schema.XmlSchemaSimpleType)1