|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.processor.validation.ValidatingProcessor
public class ValidatingProcessor
A processor which validates the XML version of the inbound message body against some schema either in XSD or RelaxNG
Constructor Summary | |
---|---|
ValidatingProcessor()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValidatingProcessor()
Method Detail |
---|
public void process(Exchange exchange) throws Exception
Processor
process
in interface Processor
exchange
- the message exchange
Exception
- if an internal processing error has occurred.public void loadSchema() throws Exception
Exception
public Schema getSchema() throws IOException, SAXException
IOException
SAXException
public void setSchema(Schema schema)
public String getSchemaLanguage()
public void setSchemaLanguage(String schemaLanguage)
public Source getSchemaSource() throws IOException
IOException
public void setSchemaSource(Source schemaSource)
public URL getSchemaUrl()
public void setSchemaUrl(URL schemaUrl)
public File getSchemaFile()
public void setSchemaFile(File schemaFile)
public SchemaFactory getSchemaFactory()
public void setSchemaFactory(SchemaFactory schemaFactory)
public ValidatorErrorHandler getErrorHandler()
public void setErrorHandler(ValidatorErrorHandler errorHandler)
@Deprecated public boolean isUseDom()
@Deprecated public void setUseDom(boolean useDom)
useDom
- true to use DOM otherwisepublic boolean isUseSharedSchema()
public void setUseSharedSchema(boolean useSharedSchema)
public LSResourceResolver getResourceResolver()
public void setResourceResolver(LSResourceResolver resourceResolver)
public boolean isFailOnNullBody()
public void setFailOnNullBody(boolean failOnNullBody)
protected SchemaFactory createSchemaFactory()
protected Source createSchemaSource() throws IOException
IOException
protected Schema createSchema() throws SAXException, IOException
SAXException
IOException
protected boolean isInputStreamNeeded(Exchange exchange)
InputStream
to access the message body.
Depending on the content in the message body, we may not need to convert
to InputStream
.
exchange
- the current exchange
InputStream
beforehand converting to Source
afterwards.protected Source getSource(Exchange exchange, Object body)
Source
, if the body is not already a Source
.
This implementation will prefer to source in the following order:
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |