|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.osesb.configuration.XMLConfiguration
org.osesb.configuration.DataSetConfiguration
org.osesb.messagepipeline.configuration.StandardPipelineStageConfiguration
org.osesb.messagepipeline.configuration.XMLValidationPipelineStageConfiguration
public class XMLValidationPipelineStageConfiguration
XMLValidationPipelineStageConfiguration configures a XMLValidationPipelineStage, which is a PipelineStage that uses SAX to check that XML is well-formed or valid against one or more schemas.
XMLValidationPipelineStage expects a stage configuration that is a XMLValidationPipelineStageConfiguration, which extends StandardPipelineStageConfiguration to include a<xml-validation-configuration>
element that configures validation properties and an optional XMLArtifactListConfiguration, which
configures schema files as File URLs or as entries in the configured instance of
the XMLRepository.
Validation properties are:
<stage-configuration>
element of a PipelineStageConfiguration looks like:
<stage-configuration>
<standard-pipelinestage-configuration name="">
<!-- validation configuration -->
<xml-validation-configuration>
<!-- true/false, if true the XML is checked as being well-formed.-->
<checkWellFormed>true</checkWellFormed>
<!--
schema validation levels are:
- off, no schema validation.
- warn, XML is validated against schema(s). runStage() logs a warning
for invalid XML; runStage() does not throw a PipelineStageException.
- reject, XML is validated against schema(s). If the XML is invalid,
runStage() throws a PipelineStageException with a nested Exception
for the specific error.
Finally, if schemaDoesNotExistIsError is true and a schema does not exist,
and if the schema validation level is 'reject', then runStage() throws a
PipelineStageException.
-->
<xmlSchemaValidationLevel schemaDoesNotExistIsError="true">reject</xmlSchemaValidationLevel>
</xml-validation-configuration>
<!-- XMLArtifactListConfiguration of schema files -->
<xmlArtifacts name="">
</xmlArtifacts>
</standard-pipelinestage-configuration>
</stage-configuration>
| Field Summary | |
|---|---|
static java.lang.String |
XML_VALIDATION_CONFIG_CONTENTMODEL
xmlValidationConfiguration content model tag. |
protected XMLConfiguration |
xmlValidationConfiguration
An XMLConfiguration for the <xml-validation-configuration>. |
| Fields inherited from class org.osesb.messagepipeline.configuration.StandardPipelineStageConfiguration |
|---|
STANDARD_PIPELINE_STAGE_CONFIG_CONTENTMODEL, xmlArtifactListConfiguration, xpathExpressionListConfiguration |
| Fields inherited from class org.osesb.configuration.DataSetConfiguration |
|---|
sqlStatementListConfiguration |
| Fields inherited from class org.osesb.configuration.XMLConfiguration |
|---|
configFilePath, configurationProperties, constructedFromConfigFile, contentModelElement, ftpClientConfiguration, jaxrpcClientConfiguration, jdbcConfiguration, jmsClientConfiguration, log, rootConfigurationAttributes, smtpClientConfiguration, systemProperties, thisClassName |
| Constructor Summary | |
|---|---|
XMLValidationPipelineStageConfiguration(org.w3c.dom.Element contentModelElement)
Creates a new instance of XMLValidationPipelineStageConfiguration given the content model Element. |
|
XMLValidationPipelineStageConfiguration(java.lang.String configFile)
Creates a new instance of XMLValidationPipelineStageConfiguration given a XML configuration file. |
|
XMLValidationPipelineStageConfiguration(java.lang.String configFile,
java.lang.String xpathExpression)
Creates a new instance of XMLValidationPipelineStageConfiguration given a XML configuration file and a XPath expression that evaluates to the element that marks the beginning of the configuration. |
|
| Method Summary | |
|---|---|
boolean |
getCheckWellFormed()
Returns the checkWellFormed property, which determines whether or not XMLValidationPipelineStageConfiguration#runStage() checks if XML is well-formed. |
boolean |
getSchemaDoesNotExistIsError()
Returns the schemaDoesNotExistIsError property. |
java.lang.String |
getXMLSchemaValidationLevel()
Returns the xmlSchemaValidationLevel property. |
XMLConfiguration |
getXMLValidationConfiguration()
Returns the XMLValidationConfiguration within this XMLValidationPipelineStageConfiguration. |
protected void |
loadxmlValidationConfiguration()
Loads the xmlValidationConfiguration. |
static void |
main(java.lang.String[] args)
main() For testing and sandboxing. |
void |
setCheckWellFormed(boolean checkWellFormed)
Sets the checkWellFormed property, which determines whether or not XMLValidationPipelineStageConfiguration#runStage() checks if XML is well-formed. |
void |
setConfigFilePath(java.lang.String configFile)
Set the configuration file name. |
void |
setSchemaDoesNotExistIsError(boolean schemaDoesNotExistIsError)
Sets the schemaDoesNotExistIsError property. |
void |
setXMLSchemaValidationLevel(java.lang.String xmlSchemaValidationLevel)
Sets the xmlSchemaValidationLevel property. |
java.lang.String |
toString()
Returns the String representation of this StandardPipelineStageConfiguration. |
| Methods inherited from class org.osesb.messagepipeline.configuration.StandardPipelineStageConfiguration |
|---|
getSchema, getXMLArtifactAsFile, getXMLArtifactListConfiguration, getXPathExpression, getXPathExpressionListConfiguration, getXPathExpressionProperties, getXPathExpressionProperty, getXSLTemplate, loadEnclosedXMLConfigurations, loadXMLArtifactListConfiguration, loadXPathExpressions, setDebugFlag, setXMLArtifactListConfiguration, setXPathExpressionListConfiguration |
| Methods inherited from class org.osesb.configuration.DataSetConfiguration |
|---|
getSQLStatement, getSQLStatementListConfiguration, loadSQLStatements, setSQLStatementListConfiguration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected XMLConfiguration xmlValidationConfiguration
<xml-validation-configuration>.
public static final java.lang.String XML_VALIDATION_CONFIG_CONTENTMODEL
| Constructor Detail |
|---|
public XMLValidationPipelineStageConfiguration(java.lang.String configFile)
throws java.lang.Exception
configFile - The XML configuration document to parse.
java.lang.Exception - if there is a problem reading or parsing the
configuration file.
public XMLValidationPipelineStageConfiguration(java.lang.String configFile,
java.lang.String xpathExpression)
throws java.lang.Exception
configFile - The XML configuration document to parse.xpathExpression - A XPath expression that evaluates to the
element that marks the beginning of the
configuration.
java.lang.Exception - if there is a problem reading or parsing the
configuration file.
public XMLValidationPipelineStageConfiguration(org.w3c.dom.Element contentModelElement)
throws java.lang.Exception
contentModelElement - The top level Element for the
for the configuration.
java.lang.Exception - if there is a fatal error transversing the
configuration content model enclosed by contentModelElement.| Method Detail |
|---|
protected final void loadxmlValidationConfiguration()
throws java.lang.Exception
java.lang.Exception - if there is a fatal error transversing the DOM
that contains the configuration content model.public XMLConfiguration getXMLValidationConfiguration()
public boolean getCheckWellFormed()
public void setCheckWellFormed(boolean checkWellFormed)
checkWellFormed - the checkWellFormed property.public java.lang.String getXMLSchemaValidationLevel()
public void setXMLSchemaValidationLevel(java.lang.String xmlSchemaValidationLevel)
xmlSchemaValidationLevel - the xmlSchemaValidationLevel property.public boolean getSchemaDoesNotExistIsError()
public void setSchemaDoesNotExistIsError(boolean schemaDoesNotExistIsError)
schemaDoesNotExistIsError - the schemaDoesNotExistIsError property.public void setConfigFilePath(java.lang.String configFile)
setConfigFilePath in class StandardPipelineStageConfigurationconfigFile - the configuration file name.public java.lang.String toString()
toString in class StandardPipelineStageConfigurationpublic static void main(java.lang.String[] args)
args - commandline arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||