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(org.apache.pdfbox.pdmodel.PDDocumentInformation dico,
org.apache.xmpbox.schema.DublinCoreSchema dc,
List<ValidationResult.ValidationError> ve)
Analyze if Author(s) embedded in Document Information dictionary and in XMP properties are
synchronized
|
protected void |
analyzeCreationDateProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico,
org.apache.xmpbox.schema.XMPBasicSchema xmp,
List<ValidationResult.ValidationError> ve)
Analyze if the CreationDate embedded in Document Information dictionary and in XMP properties
are synchronized
|
protected void |
analyzeCreatorToolProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico,
org.apache.xmpbox.schema.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(org.apache.pdfbox.pdmodel.PDDocumentInformation dico,
org.apache.xmpbox.schema.AdobePDFSchema pdf,
List<ValidationResult.ValidationError> ve)
Analyze if Keyword(s) embedded in Document Information dictionary and in XMP properties are
synchronized
|
protected void |
analyzeModifyDateProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico,
org.apache.xmpbox.schema.XMPBasicSchema xmp,
List<ValidationResult.ValidationError> ve)
Analyze if the ModifyDate embedded in Document Information dictionary and in XMP properties
are synchronized
|
protected void |
analyzeProducerProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico,
org.apache.xmpbox.schema.AdobePDFSchema pdf,
List<ValidationResult.ValidationError> ve)
Analyze if Producer embedded in Document Information dictionary and in XMP properties are
synchronized
|
protected void |
analyzeSubjectProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico,
org.apache.xmpbox.schema.DublinCoreSchema dc,
List<ValidationResult.ValidationError> ve)
Analyze if Subject(s) embedded in Document Information dictionary and in XMP properties are
synchronized
|
protected void |
analyzeTitleProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico,
org.apache.xmpbox.schema.DublinCoreSchema dc,
List<ValidationResult.ValidationError> ve)
Analyze if Title embedded in Document Information dictionary and in XMP properties are synchronized
|
protected ValidationResult.ValidationError |
badFieldXMPPropertyError(String target,
String details)
Return a formatted validation error when a specific XMP property has the wrong type.
|
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(org.apache.pdfbox.pdmodel.PDDocument document,
org.apache.xmpbox.XMPMetadata metadata)
Check if document information entries and XMP information are synchronized
|
protected void analyzeTitleProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico, org.apache.xmpbox.schema.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(org.apache.pdfbox.pdmodel.PDDocumentInformation dico, org.apache.xmpbox.schema.DublinCoreSchema dc, List<ValidationResult.ValidationError> ve)
dico
- Document Information Dictionarydc
- Dublin Core Schemave
- The list of validation errorsprotected void analyzeSubjectProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico, org.apache.xmpbox.schema.DublinCoreSchema dc, List<ValidationResult.ValidationError> ve)
dico
- Document Information Dictionarydc
- Dublin Core Schemave
- The list of validation errorsprotected void analyzeKeywordsProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico, org.apache.xmpbox.schema.AdobePDFSchema pdf, List<ValidationResult.ValidationError> ve)
dico
- Document Information Dictionarypdf
- PDF Schemave
- The list of validation errorsprotected void analyzeProducerProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico, org.apache.xmpbox.schema.AdobePDFSchema pdf, List<ValidationResult.ValidationError> ve)
dico
- Document Information Dictionarypdf
- PDF Schemave
- The list of validation errorsprotected void analyzeCreatorToolProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico, org.apache.xmpbox.schema.XMPBasicSchema xmp, List<ValidationResult.ValidationError> ve)
dico
- Document Information Dictionaryxmp
- XMP Basic Schemave
- The list of validation errorsprotected void analyzeCreationDateProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico, org.apache.xmpbox.schema.XMPBasicSchema xmp, List<ValidationResult.ValidationError> ve) throws ValidationException
dico
- Document Information Dictionaryxmp
- XMP Basic Schemave
- The list of validation errorsValidationException
protected void analyzeModifyDateProperty(org.apache.pdfbox.pdmodel.PDDocumentInformation dico, org.apache.xmpbox.schema.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(org.apache.pdfbox.pdmodel.PDDocument document, org.apache.xmpbox.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 propertyprotected ValidationResult.ValidationError badFieldXMPPropertyError(String target, String details)
target
- the concerned propertydetails
- comments about the XMP propertyCopyright © 2002–2025 The Apache Software Foundation. All rights reserved.