Search in sources :

Example 1 with XmlSchemaContent

use of org.apache.ws.commons.schema.XmlSchemaContent in project tomee by apache.

the class CommonsSchemaInfoBuilder method isSoapArray.

private static boolean isSoapArray(XmlSchemaComplexType complexType) {
    // Soap arrays are based on complex content restriction
    XmlSchemaContentModel contentModel = complexType.getContentModel();
    if (contentModel == null) {
        return false;
    }
    XmlSchemaContent content = contentModel.getContent();
    if (!(content instanceof XmlSchemaComplexContentRestriction)) {
        return false;
    }
    XmlSchemaComplexContentRestriction restriction = (XmlSchemaComplexContentRestriction) content;
    return SOAP_ARRAY.equals(restriction.getBaseTypeName());
}
Also used : XmlSchemaContent(org.apache.ws.commons.schema.XmlSchemaContent) XmlSchemaComplexContentRestriction(org.apache.ws.commons.schema.XmlSchemaComplexContentRestriction) XmlSchemaContentModel(org.apache.ws.commons.schema.XmlSchemaContentModel)

Example 2 with XmlSchemaContent

use of org.apache.ws.commons.schema.XmlSchemaContent in project ddf by codice.

the class FeatureMetacardType method processComplexType.

private void processComplexType(XmlSchemaElement xmlSchemaElement) {
    if (!processGmlType(xmlSchemaElement)) {
        XmlSchemaType schemaType = xmlSchemaElement.getSchemaType();
        if ((schemaType != null) && (schemaType instanceof XmlSchemaComplexType)) {
            XmlSchemaComplexType complexType = (XmlSchemaComplexType) schemaType;
            if (complexType.getParticle() != null) {
                processXmlSchemaParticle(complexType.getParticle());
            } else {
                if (complexType.getContentModel() instanceof XmlSchemaComplexContent) {
                    XmlSchemaContent content = complexType.getContentModel().getContent();
                    if (content instanceof XmlSchemaComplexContentExtension) {
                        XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension) content;
                        processXmlSchemaParticle(extension.getParticle());
                    }
                }
            }
        }
    }
}
Also used : XmlSchemaComplexContentExtension(org.apache.ws.commons.schema.XmlSchemaComplexContentExtension) XmlSchemaContent(org.apache.ws.commons.schema.XmlSchemaContent) XmlSchemaComplexType(org.apache.ws.commons.schema.XmlSchemaComplexType) XmlSchemaType(org.apache.ws.commons.schema.XmlSchemaType) XmlSchemaComplexContent(org.apache.ws.commons.schema.XmlSchemaComplexContent)

Aggregations

XmlSchemaContent (org.apache.ws.commons.schema.XmlSchemaContent)2 XmlSchemaComplexContent (org.apache.ws.commons.schema.XmlSchemaComplexContent)1 XmlSchemaComplexContentExtension (org.apache.ws.commons.schema.XmlSchemaComplexContentExtension)1 XmlSchemaComplexContentRestriction (org.apache.ws.commons.schema.XmlSchemaComplexContentRestriction)1 XmlSchemaComplexType (org.apache.ws.commons.schema.XmlSchemaComplexType)1 XmlSchemaContentModel (org.apache.ws.commons.schema.XmlSchemaContentModel)1 XmlSchemaType (org.apache.ws.commons.schema.XmlSchemaType)1