Package org.cip4.lib.xjdf.xml.internal
Class AbstractXmlValidator
java.lang.Object
org.cip4.lib.xjdf.xml.internal.AbstractXmlValidator
- Direct Known Subclasses:
XJdfValidator
Abstract Validation of XML Documents based on XSD schema file.
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractXmlValidator(Map<String, byte[]> xsdDependencies) Custom constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract URLGet the URL of the schema to validate against.final voidvalidate(InputStream documentStream) Validation of XJDF Document based on XJDF Schema.protected final voidValidation of XJDF Document based on XJDF Schema.
-
Constructor Details
-
AbstractXmlValidator
Custom constructor.- Parameters:
xsdDependencies- Dependencies for the XSD.
-
-
Method Details
-
validate
Validation of XJDF Document based on XJDF Schema.- Parameters:
documentStream- Stream to read document from.- Throws:
javax.xml.bind.ValidationException- Is thrown in case the underlying document is invalid.
-
validate
Validation of XJDF Document based on XJDF Schema.- Parameters:
source- XML source to validate- Throws:
javax.xml.bind.ValidationException- Is thrown in case the underlying document is invalid.
-
getSchema
Get the URL of the schema to validate against.- Returns:
- Internal URL to of the schema.
-