Class MetadataImpl
- java.lang.Object
-
- org.verapdf.metadata.fixer.gf.impl.model.MetadataImpl
-
-
Constructor Summary
Constructors Constructor Description MetadataImpl(VeraPDFMeta metadata, COSObject stream, COSDocument doc, boolean isStreamCreated)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPDFIdentificationSchema(MetadataFixerResultImpl.Builder resultBuilder, PDFAFlavour flavour)Add PDF/A identification schema ifMetadataFixerImplbe able to repair document to valid PDF/A document.voidcheckMetadataStream(MetadataFixerResultImpl.Builder resultBuilder, PDFAFlavour flavour)Add required fields to stream dictionary and add FlateDecode Filter for part 2 and 3 flavours or remove filters for part 1 flavourAdobePDFgetAdobePDFSchema(InfoDictionary info)GetAdobePDFrepresentation.DublinCoregetDublinCoreSchema(InfoDictionary info)GetDublinCorerepresentation.XMPBasicgetXMPBasicSchema(InfoDictionary info)GetXMPBasicrepresentation.booleanisNeedToBeUpdated()voidremovePDFIdentificationSchema(MetadataFixerResultImpl.Builder resultBuilder, PDFAFlavour flavour)Remove identification schema ifMetadataFixerImplcan not repair document to valid PDF/A Document.voidsetNeedToBeUpdated(boolean needToBeUpdated)voidupdateMetadataStream()Update metadata stream from applied changes.
-
-
-
Constructor Detail
-
MetadataImpl
public MetadataImpl(VeraPDFMeta metadata, COSObject stream, COSDocument doc, boolean isStreamCreated)
- Parameters:
metadata-stream-
-
-
Method Detail
-
checkMetadataStream
public void checkMetadataStream(MetadataFixerResultImpl.Builder resultBuilder, PDFAFlavour flavour)
Description copied from interface:MetadataAdd required fields to stream dictionary and add FlateDecode Filter for part 2 and 3 flavours or remove filters for part 1 flavour- Specified by:
checkMetadataStreamin interfaceMetadata- Parameters:
resultBuilder- report applied changes
-
removePDFIdentificationSchema
public void removePDFIdentificationSchema(MetadataFixerResultImpl.Builder resultBuilder, PDFAFlavour flavour)
Description copied from interface:MetadataRemove identification schema ifMetadataFixerImplcan not repair document to valid PDF/A Document.- Specified by:
removePDFIdentificationSchemain interfaceMetadata- Parameters:
resultBuilder- report applied changes
-
addPDFIdentificationSchema
public void addPDFIdentificationSchema(MetadataFixerResultImpl.Builder resultBuilder, PDFAFlavour flavour)
Description copied from interface:MetadataAdd PDF/A identification schema ifMetadataFixerImplbe able to repair document to valid PDF/A document.- Specified by:
addPDFIdentificationSchemain interfaceMetadata- Parameters:
resultBuilder- report applied changesflavour- the checked flavour
-
getDublinCoreSchema
public DublinCore getDublinCoreSchema(InfoDictionary info)
Description copied from interface:MetadataGetDublinCorerepresentation. If current schema not presented in metadata but Information dictionary consist corresponding values than must return empty dublin core schema.- Specified by:
getDublinCoreSchemain interfaceMetadata- Parameters:
info- information dictionary representation of current document- Returns:
DublinCoreschema or null
-
getAdobePDFSchema
public AdobePDF getAdobePDFSchema(InfoDictionary info)
Description copied from interface:MetadataGetAdobePDFrepresentation. If current schema not presented in metadata but Information dictionary consist corresponding values than must return empty dublin core schema.- Specified by:
getAdobePDFSchemain interfaceMetadata- Parameters:
info- information dictionary representation of current document- Returns:
AdobePDFschema or null
-
getXMPBasicSchema
public XMPBasic getXMPBasicSchema(InfoDictionary info)
Description copied from interface:MetadataGetXMPBasicrepresentation. If current schema not presented in metadata but Information dictionary consist corresponding values than must return empty dublin core schema.- Specified by:
getXMPBasicSchemain interfaceMetadata- Parameters:
info- information dictionary representation of current document- Returns:
XMPBasicschema or null
-
isNeedToBeUpdated
public boolean isNeedToBeUpdated()
- Specified by:
isNeedToBeUpdatedin interfaceMetadata- Returns:
-
setNeedToBeUpdated
public void setNeedToBeUpdated(boolean needToBeUpdated)
- Specified by:
setNeedToBeUpdatedin interfaceMetadata
-
updateMetadataStream
public void updateMetadataStream() throws IOException, XMPExceptionDescription copied from interface:MetadataUpdate metadata stream from applied changes. If metadata was not changed than no updates applied- Specified by:
updateMetadataStreamin interfaceMetadata- Throws:
IOExceptionXMPException
-
-