Class AbstractXmlValidator

java.lang.Object
org.cip4.lib.xjdf.xml.internal.AbstractXmlValidator
Direct Known Subclasses:
XJdfValidator

public abstract class AbstractXmlValidator extends Object
Abstract Validation of XML Documents based on XSD schema file.
  • Constructor Details

    • AbstractXmlValidator

      public AbstractXmlValidator(Map<String,byte[]> xsdDependencies)
      Custom constructor.
      Parameters:
      xsdDependencies - Dependencies for the XSD.
  • Method Details

    • validate

      public final void validate(InputStream documentStream) throws javax.xml.bind.ValidationException
      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

      protected final void validate(Source source) throws javax.xml.bind.ValidationException
      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

      protected abstract URL getSchema()
      Get the URL of the schema to validate against.
      Returns:
      Internal URL to of the schema.