Java Code Examples for org.apache.ws.commons.schema.XmlSchema#getElementFormDefault()
The following examples show how to use
org.apache.ws.commons.schema.XmlSchema#getElementFormDefault() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WSDLUtils.java From cxf with Apache License 2.0 | 5 votes |
public static boolean isElementFormQualified(SchemaCollection schemas, QName type) { if (type != null) { XmlSchema sch = schemas.getSchemaByTargetNamespace(type.getNamespaceURI()); if (sch != null) { return sch.getElementFormDefault() == XmlSchemaForm.QUALIFIED; } } return false; }
Example 2
Source File: WSDLUtils.java From cxf with Apache License 2.0 | 5 votes |
public static boolean isElementFormQualified(XmlSchema schema, QName type) { if (type != null) { String uri = type.getNamespaceURI(); if (uri.equals(schema.getTargetNamespace())) { return schema.getElementFormDefault() == XmlSchemaForm.QUALIFIED; } for (XmlSchemaExternal extSchema : schema.getExternals()) { return isElementFormQualified(extSchema.getSchema(), type); } } return false; }
Example 3
Source File: ProcessorUtil.java From cxf with Apache License 2.0 | 5 votes |
public static boolean isSchemaFormQualified(ToolContext context, QName partElement) { ServiceInfo serviceInfo = context.get(ServiceInfo.class); SchemaCollection schemaCol = serviceInfo.getXmlSchemaCollection(); XmlSchema schema = schemaCol.getSchemaForElement(partElement); if (schema != null) { return schema.getElementFormDefault() == XmlSchemaForm.QUALIFIED; } return false; }
Example 4
Source File: CorbaUtils.java From cxf with Apache License 2.0 | 5 votes |
private static boolean isElementFormQualified(XmlSchema schema, String uri) { if (uri.equals(schema.getTargetNamespace())) { return schema.getElementFormDefault() == XmlSchemaForm.QUALIFIED; } for (XmlSchemaExternal extSchema : schema.getExternals()) { return isElementFormQualified(extSchema.getSchema(), uri); } return false; }