Class XmlResultParser
- java.lang.Object
-
- org.apache.pdfbox.preflight.parser.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 voidcreateResponseWithError(org.w3c.dom.Document rdocument, java.lang.String pdfType, ValidationResult result, org.w3c.dom.Element preflight)private org.w3c.dom.ElementgenerateFailureResponse(org.w3c.dom.Document rdocument, java.lang.String name, long duration, java.lang.String pdfType, java.lang.Exception e)protected org.w3c.dom.ElementgenerateResponseSkeleton(org.w3c.dom.Document rdocument, java.lang.String name, long duration)org.w3c.dom.Elementvalidate(java.io.File file)Validate the given file.private org.w3c.dom.Elementvalidate(java.io.File file, java.lang.String name)org.w3c.dom.Elementvalidate(org.w3c.dom.Document rdocument, java.io.File file)Validate the given file.private org.w3c.dom.Elementvalidate(org.w3c.dom.Document rdocument, java.io.File file, java.lang.String name)
-
-
-
Method Detail
-
validate
public org.w3c.dom.Element validate(java.io.File file) throws java.io.IOExceptionValidate 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.IOExceptionValidate the given file. Add the validation results to the given XML tree.- Parameters:
rdocument- XML based validation results of a former runfile- 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)
-
cleanErrorList
private java.util.Map<ValidationResult.ValidationError,java.lang.Integer> cleanErrorList(java.util.List<ValidationResult.ValidationError> errors)
-
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)
-
-