Class MetadataImpl

  • All Implemented Interfaces:
    Metadata

    public class MetadataImpl
    extends Object
    implements Metadata
    Author:
    Maksim Bezrukov
    • 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: Metadata
        Add required fields to stream dictionary and add FlateDecode Filter for part 2 and 3 flavours or remove filters for part 1 flavour
        Specified by:
        checkMetadataStream in interface Metadata
        Parameters:
        resultBuilder - report applied changes
      • addPDFIdentificationSchema

        public void addPDFIdentificationSchema​(MetadataFixerResultImpl.Builder resultBuilder,
                                               PDFAFlavour flavour)
        Description copied from interface: Metadata
        Add PDF/A identification schema if MetadataFixerImpl be able to repair document to valid PDF/A document.
        Specified by:
        addPDFIdentificationSchema in interface Metadata
        Parameters:
        resultBuilder - report applied changes
        flavour - the checked flavour
      • getDublinCoreSchema

        public DublinCore getDublinCoreSchema​(InfoDictionary info)
        Description copied from interface: Metadata
        Get DublinCore representation. If current schema not presented in metadata but Information dictionary consist corresponding values than must return empty dublin core schema.
        Specified by:
        getDublinCoreSchema in interface Metadata
        Parameters:
        info - information dictionary representation of current document
        Returns:
        DublinCore schema or null
      • getAdobePDFSchema

        public AdobePDF getAdobePDFSchema​(InfoDictionary info)
        Description copied from interface: Metadata
        Get AdobePDF representation. If current schema not presented in metadata but Information dictionary consist corresponding values than must return empty dublin core schema.
        Specified by:
        getAdobePDFSchema in interface Metadata
        Parameters:
        info - information dictionary representation of current document
        Returns:
        AdobePDF schema or null
      • getXMPBasicSchema

        public XMPBasic getXMPBasicSchema​(InfoDictionary info)
        Description copied from interface: Metadata
        Get XMPBasic representation. If current schema not presented in metadata but Information dictionary consist corresponding values than must return empty dublin core schema.
        Specified by:
        getXMPBasicSchema in interface Metadata
        Parameters:
        info - information dictionary representation of current document
        Returns:
        XMPBasic schema or null
      • setNeedToBeUpdated

        public void setNeedToBeUpdated​(boolean needToBeUpdated)
        Specified by:
        setNeedToBeUpdated in interface Metadata