Package com.consol.citrus.xml.schema
Class AbstractSchemaCollection
- java.lang.Object
-
- org.springframework.xml.xsd.SimpleXsdSchema
-
- com.consol.citrus.xml.schema.AbstractSchemaCollection
-
- All Implemented Interfaces:
com.consol.citrus.common.InitializingPhase,org.springframework.beans.factory.InitializingBean,org.springframework.xml.xsd.XsdSchema
- Direct Known Subclasses:
WsdlXsdSchema,XsdSchemaCollection
public abstract class AbstractSchemaCollection extends org.springframework.xml.xsd.SimpleXsdSchema implements com.consol.citrus.common.InitializingPhase- Since:
- 2.4
- Author:
- Christoph Deppisch
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>importedSchemasImported schemasprotected List<org.springframework.core.io.Resource>schemaResourcesList of schema resourcesstatic StringW3C_XML_SCHEMA_NS_URIstatic StringWWW_W3_ORG_2000_XMLNSOfficial xmlns namespace
-
Constructor Summary
Constructors Constructor Description AbstractSchemaCollection()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddImportedSchemas(javax.wsdl.extensions.schema.Schema schema)Recursively add all imported schemas as schema resource.protected voidaddIncludedSchemas(javax.wsdl.extensions.schema.Schema schema)Recursively add all included schemas as schema resource.org.springframework.xml.validation.XmlValidatorcreateValidator()List<org.springframework.core.io.Resource>getSchemaResources()Gets the schema resources.voidinitialize()protected abstract org.springframework.core.io.ResourceloadSchemaResources()Loads all schema resource files from schema locations.
-
-
-
Field Detail
-
schemaResources
protected List<org.springframework.core.io.Resource> schemaResources
List of schema resources
-
WWW_W3_ORG_2000_XMLNS
public static final String WWW_W3_ORG_2000_XMLNS
Official xmlns namespace- See Also:
- Constant Field Values
-
W3C_XML_SCHEMA_NS_URI
public static final String W3C_XML_SCHEMA_NS_URI
- See Also:
- Constant Field Values
-
-
Method Detail
-
createValidator
public org.springframework.xml.validation.XmlValidator createValidator()
- Specified by:
createValidatorin interfaceorg.springframework.xml.xsd.XsdSchema- Overrides:
createValidatorin classorg.springframework.xml.xsd.SimpleXsdSchema
-
addImportedSchemas
protected void addImportedSchemas(javax.wsdl.extensions.schema.Schema schema) throws javax.wsdl.WSDLException, IOException, TransformerException, TransformerFactoryConfigurationErrorRecursively add all imported schemas as schema resource. This is necessary when schema import are located in jar files. If they are not added immediately the reference to them is lost.- Parameters:
schema-- Throws:
javax.wsdl.WSDLExceptionIOExceptionTransformerExceptionTransformerFactoryConfigurationError
-
addIncludedSchemas
protected void addIncludedSchemas(javax.wsdl.extensions.schema.Schema schema) throws javax.wsdl.WSDLException, IOException, TransformerException, TransformerFactoryConfigurationErrorRecursively add all included schemas as schema resource.- Throws:
javax.wsdl.WSDLExceptionIOExceptionTransformerExceptionTransformerFactoryConfigurationError
-
initialize
public void initialize()
- Specified by:
initializein interfacecom.consol.citrus.common.InitializingPhase
-
loadSchemaResources
protected abstract org.springframework.core.io.Resource loadSchemaResources()
Loads all schema resource files from schema locations.
-
getSchemaResources
public List<org.springframework.core.io.Resource> getSchemaResources()
Gets the schema resources.- Returns:
-
-