| Modifier and Type | Field and Description |
|---|---|
| protected COSDictionary | annotDictionary
COSDictionary of the annotation |
| private AnnotationValidatorFactory | |
| protected PreflightContext | |
| protected PDAnnotation | pdAnnot
Instance of PDAnnotation built using the annotDictionary |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | Returns: the validation state of the annotations actions.Extract a list of ActionManager from the Annotation dictionary and valid them. |
| protected boolean | Returns: the validation state of the AP content.This method checks the AP entry of the Annotation Dictionary. |
| protected boolean | Returns: true if the CA element is missing or if the value is 1.0.Check if the CA value is 1.0. |
| protected boolean | Returns: true if the C field is present and the RGB profile is used.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 | Returns: false if a flag is invalid, true otherwise.Checks if flags of the annotation are authorized. |
| protected boolean | Returns: true if validation succeed, false otherwise.Checks if all mandatory fields of an annotation are present. |
| protected boolean | Returns: true if the popup entry is valid, false if not.This method validates the Popup entry. |
| protected boolean | Returns: the presence of specific fields.Override this method to check the presence of specific fields |
| private COSBase | |
| protected boolean | Returns: true if a rgb profile is found, false otherwise.Search the RGB Profile in OutputIntents dictionaries |
| public final void | |
| public boolean | Returns: true if validation succeed, false otherwise.Execute validation of the Annotation dictionary. |
| annotDictionary | back to summary |
|---|---|
| protected COSDictionary annotDictionary COSDictionary of the annotation | |
| annotFact | back to summary |
|---|---|
| private AnnotationValidatorFactory annotFact | |
| ctx | back to summary |
|---|---|
| protected PreflightContext ctx | |
| pdAnnot | back to summary |
|---|---|
| protected PDAnnotation pdAnnot Instance of PDAnnotation built using the annotDictionary | |
| AnnotationValidator | back to summary |
|---|---|
| public AnnotationValidator(PreflightContext context, COSDictionary annotDictionary) | |
| checkActions | back to summary |
|---|---|
| protected boolean checkActions() throws ValidationException Extract a list of ActionManager from the Annotation dictionary and valid them. If an action is invalid, the errors list is updated and the method returns false. Otherwise, the method returns true and the errors list doesn't change.
| |
| checkAP | back to summary |
|---|---|
| protected boolean checkAP() throws ValidationException This method checks the AP entry of the Annotation Dictionary. If the AP key is missing, this method returns true. If the AP key exists, only the N entry is authorized and must be a Stream which define the appearance of the annotation. (Currently, only the type of the N entry is checked because of the Appearance stream is a Form XObject, so it will be checked by the Graphics Helper) If the AP content isn't valid, this method return false and updates the errors list.
| |
| checkCA | back to summary |
|---|---|
| protected boolean checkCA() Check if the CA value is 1.0. Return true if the CA element is missing or if the value is 1.0. Return false otherwise and update the list of errors present in the DocumentHandler.
| |
| checkColors | back to summary |
|---|---|
| protected boolean checkColors() throws ValidationException 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.
| |
| checkFlags | back to summary |
|---|---|
| protected boolean checkFlags() Checks if flags of the annotation are authorized.
| |
| checkMandatoryFields | back to summary |
|---|---|
| protected boolean checkMandatoryFields() Checks if all mandatory fields of an annotation are present. If some fields are missing, the method returns false and the errors list is updated.
| |
| checkPopup | back to summary |
|---|---|
| protected boolean checkPopup() throws ValidationException This method validates the Popup entry. This entry shall contain an other Annotation. This annotation is validated with the right AnnotationValidator.
| |
| checkSpecificMandatoryFields | back to summary |
|---|---|
| protected boolean checkSpecificMandatoryFields() Override this method to check the presence of specific fields
| |
| getFieldType | back to summary |
|---|---|
| private COSBase getFieldType() | |
| searchRGBProfile | back to summary |
|---|---|
| protected boolean searchRGBProfile() throws ValidationException Search the RGB Profile in OutputIntents dictionaries
| |
| setFactory | back to summary |
|---|---|
| public final void setFactory(AnnotationValidatorFactory fact) Initialize the annotFact attribute of this object. This method must be called by the Factory at the creation of this object. Only the Factory should call this method. | |
| validate | back to summary |
|---|---|
| public boolean validate() throws ValidationException Execute validation of the Annotation dictionary.
| |