Package org.cip4.lib.xjdf.xml.internal
Class AbstractXmlValidator
- java.lang.Object
-
- org.cip4.lib.xjdf.xml.internal.AbstractXmlValidator
-
- Direct Known Subclasses:
XJdfValidator
public abstract class AbstractXmlValidator extends java.lang.ObjectAbstract Validation of XML Documents based on XSD schema file.
-
-
Constructor Summary
Constructors Constructor Description AbstractXmlValidator(java.util.Map<java.lang.String,byte[]> xsdDependencies)Custom constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.net.URLgetSchema()Get the URL of the schema to validate against.voidvalidate(java.io.InputStream documentStream)Validation of XJDF Document based on XJDF Schema.protected voidvalidate(javax.xml.transform.Source source)Validation of XJDF Document based on XJDF Schema.
-
-
-
Method Detail
-
validate
public final void validate(java.io.InputStream documentStream) throws jakarta.xml.bind.ValidationExceptionValidation of XJDF Document based on XJDF Schema.- Parameters:
documentStream- Stream to read document from.- Throws:
jakarta.xml.bind.ValidationException- Is thrown in case the underlying document is invalid.
-
validate
protected final void validate(javax.xml.transform.Source source) throws jakarta.xml.bind.ValidationExceptionValidation of XJDF Document based on XJDF Schema.- Parameters:
source- XML source to validate- Throws:
jakarta.xml.bind.ValidationException- Is thrown in case the underlying document is invalid.
-
getSchema
protected abstract java.net.URL getSchema()
Get the URL of the schema to validate against.- Returns:
- Internal URL to of the schema.
-
-