public abstract class AnnotationValidator extends Object
Modifier and Type | Field and Description |
---|---|
protected COSDictionary |
annotDictionary
COSDictionary of the annotation
|
protected PreflightContext |
ctx |
protected PDAnnotation |
pdAnnot
Instance of PDAnnotation built using the annotDictionary
|
Constructor and Description |
---|
AnnotationValidator(PreflightContext context,
COSDictionary annotDictionary) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkActions()
Extract a list of ActionManager from the Annotation dictionary and valid them.
|
protected boolean |
checkAP()
This method checks the AP entry of the Annotation Dictionary.
|
protected boolean |
checkCA()
Check if the CA value is 1.0.
|
protected boolean |
checkColors()
Return true if the C field is present in the Annotation dictionary and if the RGB profile is used in the
DestOutputProfile of the OutputIntent dictionary.
|
protected boolean |
checkFlags()
Checks if flags of the annotation are authorized.
|
protected boolean |
checkMandatoryFields()
Checks if all mandatory fields of an annotation are present.
|
protected boolean |
checkPopup()
This method validates the Popup entry.
|
protected boolean |
checkSpecificMandatoryFields()
Override this method to check the presence of specific fields
|
protected boolean |
searchRGBProfile()
Search the RGB Profile in OutputIntents dictionaries
|
void |
setFactory(AnnotationValidatorFactory fact)
Initialize the annotFact attribute of this object.
|
boolean |
validate()
Execute validation of the Annotation dictionary.
|
protected PreflightContext ctx
protected COSDictionary annotDictionary
protected PDAnnotation pdAnnot
public AnnotationValidator(PreflightContext context, COSDictionary annotDictionary)
protected boolean checkFlags()
protected boolean checkCA()
protected boolean checkColors() throws ValidationException
ValidationException
protected boolean searchRGBProfile() throws ValidationException
ValidationException
protected boolean checkAP() throws ValidationException
ValidationException
protected boolean checkActions() throws ValidationException
ValidationException
protected boolean checkPopup() throws ValidationException
ValidationException
public boolean validate() throws ValidationException
ValidationException
protected boolean checkMandatoryFields()
protected boolean checkSpecificMandatoryFields()
public final void setFactory(AnnotationValidatorFactory fact)
fact
- Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.