public class SynchronizedMetaDataValidation extends Object
Constructor and Description |
---|
SynchronizedMetaDataValidation() |
Modifier and Type | Method and Description |
---|---|
protected ValidationResult.ValidationError |
absentSchemaMetaDataError(String target,
String schema)
Return a formatted validation error when a specific metadata schema can't be found
|
protected ValidationResult.ValidationError |
absentXMPPropertyError(String target,
String details)
Return a formatted validation error when a specific XMP property can't be found
|
protected void |
analyzeAuthorProperty(PDDocumentInformation dico,
DublinCoreSchema dc,
List<ValidationResult.ValidationError> ve)
Analyze if Author(s) embedded in Document Information dictionary and in XMP properties are
synchronized
|
protected void |
analyzeCreationDateProperty(PDDocumentInformation dico,
XMPBasicSchema xmp,
List<ValidationResult.ValidationError> ve)
Analyze if the CreationDate embedded in Document Information dictionary and in XMP properties
are synchronized
|
protected void |
analyzeCreatorToolProperty(PDDocumentInformation dico,
XMPBasicSchema xmp,
List<ValidationResult.ValidationError> ve)
Analyze if the creator tool embedded in Document Information dictionary and in XMP properties
are synchronized
|
protected void |
analyzeKeywordsProperty(PDDocumentInformation dico,
AdobePDFSchema pdf,
List<ValidationResult.ValidationError> ve)
Analyze if Keyword(s) embedded in Document Information dictionary and in XMP properties are
synchronized
|
protected void |
analyzeModifyDateProperty(PDDocumentInformation dico,
XMPBasicSchema xmp,
List<ValidationResult.ValidationError> ve)
Analyze if the ModifyDate embedded in Document Information dictionary and in XMP properties
are synchronized
|
protected void |
analyzeProducerProperty(PDDocumentInformation dico,
AdobePDFSchema pdf,
List<ValidationResult.ValidationError> ve)
Analyze if Producer embedded in Document Information dictionary and in XMP properties are
synchronized
|
protected void |
analyzeSubjectProperty(PDDocumentInformation dico,
DublinCoreSchema dc,
List<ValidationResult.ValidationError> ve)
Analyze if Subject(s) embedded in Document Information dictionary and in XMP properties are
synchronized
|
protected void |
analyzeTitleProperty(PDDocumentInformation dico,
DublinCoreSchema dc,
List<ValidationResult.ValidationError> ve)
Analyze if Title embedded in Document Information dictionary and in XMP properties are synchronized
|
protected ValidationException |
schemaAccessException(String target,
Throwable cause)
Return an exception formatted on IOException when accessing on metadata schema
|
protected ValidationResult.ValidationError |
unexpectedPrefixFoundError(String prefFound,
String prefExpected,
String schema)
Return a validationError formatted when a schema has not the expected prefix
|
protected ValidationResult.ValidationError |
unsynchronizedMetaDataError(String target)
Return a formatted validation error when metadata are not synchronized
|
List<ValidationResult.ValidationError> |
validateMetadataSynchronization(PDDocument document,
XMPMetadata metadata)
Check if document information entries and XMP information are synchronized
|
protected void analyzeTitleProperty(PDDocumentInformation dico, DublinCoreSchema dc, List<ValidationResult.ValidationError> ve)
dico
- the Document Information Dictionary.dc
- the Dublin Core Schema.ve
- the list of validation errors.protected void analyzeAuthorProperty(PDDocumentInformation dico, DublinCoreSchema dc, List<ValidationResult.ValidationError> ve)
dico
- Document Information Dictionarydc
- Dublin Core Schemave
- The list of validation errorsprotected void analyzeSubjectProperty(PDDocumentInformation dico, DublinCoreSchema dc, List<ValidationResult.ValidationError> ve)
dico
- Document Information Dictionarydc
- Dublin Core Schemave
- The list of validation errorsprotected void analyzeKeywordsProperty(PDDocumentInformation dico, AdobePDFSchema pdf, List<ValidationResult.ValidationError> ve)
dico
- Document Information Dictionarypdf
- PDF Schemave
- The list of validation errorsprotected void analyzeProducerProperty(PDDocumentInformation dico, AdobePDFSchema pdf, List<ValidationResult.ValidationError> ve)
dico
- Document Information Dictionarypdf
- PDF Schemave
- The list of validation errorsprotected void analyzeCreatorToolProperty(PDDocumentInformation dico, XMPBasicSchema xmp, List<ValidationResult.ValidationError> ve)
dico
- Document Information Dictionaryxmp
- XMP Basic Schemave
- The list of validation errorsprotected void analyzeCreationDateProperty(PDDocumentInformation dico, XMPBasicSchema xmp, List<ValidationResult.ValidationError> ve) throws ValidationException
dico
- Document Information Dictionaryxmp
- XMP Basic Schemave
- The list of validation errorsValidationException
protected void analyzeModifyDateProperty(PDDocumentInformation dico, XMPBasicSchema xmp, List<ValidationResult.ValidationError> ve) throws ValidationException
dico
- Document Information Dictionaryxmp
- XMP Basic Schemave
- The list of validation errorsValidationException
public List<ValidationResult.ValidationError> validateMetadataSynchronization(PDDocument document, XMPMetadata metadata) throws ValidationException
document
- the PDF Documentmetadata
- the XMP MetaDataValidationException
protected ValidationResult.ValidationError unexpectedPrefixFoundError(String prefFound, String prefExpected, String schema)
prefFound
- prefExpected
- schema
- protected ValidationException schemaAccessException(String target, Throwable cause)
target
- the name of the schemacause
- the raised IOExceptionprotected ValidationResult.ValidationError unsynchronizedMetaDataError(String target)
target
- the concerned propertyprotected ValidationResult.ValidationError absentSchemaMetaDataError(String target, String schema)
target
- the concerned propertyschema
- the XMP schema which can't be foundprotected ValidationResult.ValidationError absentXMPPropertyError(String target, String details)
target
- the concerned propertydetails
- comments about the XMP propertyCopyright © 2002–2018 The Apache Software Foundation. All rights reserved.