Class SchemaReader
java.lang.Object
org.apache.camel.support.processor.validation.SchemaReader
Reads the schema used in the processor
ValidatingProcessor
. A schema re-reading could be forced using
org.apache.camel.component.validator.ValidatorEndpoint#clearCachedSchema()
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Key of the global option to switch either off or on the access to external DTDs in the XML Validator for StreamSources. -
Constructor Summary
ConstructorDescriptionSchemaReader
(org.apache.camel.CamelContext camelContext, String schemaResourceUri) Specify a camel context and a schema resource URI in order to read the schema via the class resolver specified in the Camel context. -
Method Summary
Modifier and TypeMethodDescriptionprotected Schema
protected SchemaFactory
protected Source
byte[]
void
protected byte[]
void
setResourceResolver
(LSResourceResolver resourceResolver) void
void
setSchemaAsByteArray
(byte[] schemaAsByteArray) void
setSchemaFactory
(SchemaFactory schemaFactory) void
setSchemaFile
(File schemaFile) void
setSchemaLanguage
(String schemaLanguage) void
setSchemaSource
(Source schemaSource) void
setSchemaUrl
(URL schemaUrl)
-
Field Details
-
ACCESS_EXTERNAL_DTD
Key of the global option to switch either off or on the access to external DTDs in the XML Validator for StreamSources. Only effective, if not a custom schema factory is used.- See Also:
-
-
Constructor Details
-
SchemaReader
public SchemaReader() -
SchemaReader
Specify a camel context and a schema resource URI in order to read the schema via the class resolver specified in the Camel context.
-
-
Method Details
-
loadSchema
- Throws:
Exception
-
getSchema
- Throws:
IOException
SAXException
-
setSchema
-
getSchemaLanguage
-
setSchemaLanguage
-
getSchemaSource
- Throws:
IOException
-
setSchemaSource
-
getSchemaUrl
-
setSchemaUrl
-
getSchemaFile
-
setSchemaFile
-
getSchemaAsByteArray
public byte[] getSchemaAsByteArray() -
setSchemaAsByteArray
public void setSchemaAsByteArray(byte[] schemaAsByteArray) -
getSchemaFactory
-
setSchemaFactory
-
getResourceResolver
-
setResourceResolver
-
createSchemaFactory
-
createSchemaSource
- Throws:
IOException
-
createSchema
- Throws:
SAXException
IOException
-
readSchemaResource
- Throws:
IOException
-