Class XmlResultParser


  • public class XmlResultParser
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      XmlResultParser()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.util.Map<ValidationResult.ValidationError,​java.lang.Integer> cleanErrorList​(java.util.List<ValidationResult.ValidationError> errors)  
      protected void createResponseWithError​(org.w3c.dom.Document rdocument, java.lang.String pdfType, ValidationResult result, org.w3c.dom.Element preflight)  
      private org.w3c.dom.Element generateFailureResponse​(org.w3c.dom.Document rdocument, java.lang.String name, long duration, java.lang.String pdfType, java.lang.Exception e)  
      protected org.w3c.dom.Element generateResponseSkeleton​(org.w3c.dom.Document rdocument, java.lang.String name, long duration)  
      org.w3c.dom.Element validate​(java.io.File file)
      Validate the given file.
      private org.w3c.dom.Element validate​(java.io.File file, java.lang.String name)  
      org.w3c.dom.Element validate​(org.w3c.dom.Document rdocument, java.io.File file)
      Validate the given file.
      private org.w3c.dom.Element validate​(org.w3c.dom.Document rdocument, java.io.File file, java.lang.String name)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XmlResultParser

        public XmlResultParser()
    • Method Detail

      • validate

        public org.w3c.dom.Element validate​(java.io.File file)
                                     throws java.io.IOException
        Validate the given file.
        Parameters:
        file - the file to be validated
        Returns:
        the validation results as XML
        Throws:
        java.io.IOException - if something went wrong
      • validate

        public org.w3c.dom.Element validate​(org.w3c.dom.Document rdocument,
                                            java.io.File file)
                                     throws java.io.IOException
        Validate the given file. Add the validation results to the given XML tree.
        Parameters:
        rdocument - XML based validation results of a former run
        file - the file to be validated
        Returns:
        the validation results as XML
        Throws:
        java.io.IOException - if something went wrong
      • validate

        private org.w3c.dom.Element validate​(java.io.File file,
                                             java.lang.String name)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • validate

        private org.w3c.dom.Element validate​(org.w3c.dom.Document rdocument,
                                             java.io.File file,
                                             java.lang.String name)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • createResponseWithError

        protected void createResponseWithError​(org.w3c.dom.Document rdocument,
                                               java.lang.String pdfType,
                                               ValidationResult result,
                                               org.w3c.dom.Element preflight)
      • generateFailureResponse

        private org.w3c.dom.Element generateFailureResponse​(org.w3c.dom.Document rdocument,
                                                            java.lang.String name,
                                                            long duration,
                                                            java.lang.String pdfType,
                                                            java.lang.Exception e)
      • generateResponseSkeleton

        protected org.w3c.dom.Element generateResponseSkeleton​(org.w3c.dom.Document rdocument,
                                                               java.lang.String name,
                                                               long duration)