Package org.verapdf.gf.model.impl.cos
Class GFCosDocument
- java.lang.Object
-
- org.verapdf.model.GenericModelObject
-
- org.verapdf.gf.model.impl.cos.GFCosObject
-
- org.verapdf.gf.model.impl.cos.GFCosDocument
-
- All Implemented Interfaces:
Object,CosDocument,CosObject
public class GFCosDocument extends GFCosObject implements CosDocument
- Author:
- Timur Kamalov
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOS_DOCUMENT_TYPEType name for GFCosDocument-
Fields inherited from class org.verapdf.gf.model.impl.cos.GFCosObject
baseObject, cosDocument, MAX_NUMBER_OF_ELEMENTS
-
Fields inherited from class org.verapdf.model.GenericModelObject
contextDependent
-
-
Constructor Summary
Constructors Constructor Description GFCosDocument(COSDocument cosDocument)Constructor using greenfield COSDocument
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleangetcontainsEmbeddedFiles()true, if the document contains the EmbeddedFiles entry in the names dictionaryBooleangetcontainsInfo()true if the trailer dictionary contains Info keyBooleangetcontainsPieceInfo()true if the document catalog dictionary contains PieceInfo entryBooleangetDisplayDocTitle()value of the /DisplayDocTitle key in the ViewerPreferences dictionaryBooleangetdoesInfoMatchXMP()true if Info dictionary is present and synchronized with the document metadataStringgetfirstPageID()id of the first page trailer, if the document is linearized.Stringgetheader()the content of the PDF headerLonggetheaderByte1()first four bytes in the comment that follows the PDF headerLonggetheaderByte2()LonggetheaderByte3()LonggetheaderByte4()LonggetheaderOffset()offset of the PDF document headerDoublegetheaderVersion()version of the documentBooleangetisLinearized()true if the document is linearizedBooleangetisOptionalContentPresent()true if catalog contain OCProperties keyStringgetlastID()id of the last trailer in the documentList<? extends Object>getLinkedObjects(String link)BooleangetMarked()the value of the /Marked entry in the MarkInfo dictionary (false, if this entry is missing)StringgetMarkInfo()string representation of the MarkInfo dictionaryBooleangetNeedsRendering()NeedsRendering entry in the document's Catalog (false by default)LonggetnrIndirects()Number of indirect objects in the documentLonggetpostEOFDataSize()EOF must complies PDF/A standardStringgetRequirements()- null, if the /Requirements key is not present in the document CatalogBooleangetSuspects()value of the /Suspects entry in the MarkInfo dictionaryStringgetViewerPreferences()string representation of the ViewerPreferences dictionary-
Methods inherited from class org.verapdf.gf.model.impl.cos.GFCosObject
getFromValue
-
Methods inherited from class org.verapdf.model.GenericModelObject
getContext, getExtraContext, getID, getLinks, getObjectType, getProperties, getSuperTypes, isContextDependent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.verapdf.model.baselayer.Object
getContext, getExtraContext, getID, getLinks, getObjectType, getProperties, getSuperTypes, isContextDependent
-
-
-
-
Field Detail
-
COS_DOCUMENT_TYPE
public static final String COS_DOCUMENT_TYPE
Type name for GFCosDocument- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GFCosDocument
public GFCosDocument(COSDocument cosDocument)
Constructor using greenfield COSDocument- Parameters:
cosDocument- greenfield COSDocument
-
-
Method Detail
-
getnrIndirects
public Long getnrIndirects()
Number of indirect objects in the document- Specified by:
getnrIndirectsin interfaceCosDocument
-
getheaderVersion
public Double getheaderVersion()
Description copied from interface:CosDocumentversion of the document- Specified by:
getheaderVersionin interfaceCosDocument- Returns:
- version of pdf document
-
getheaderOffset
public Long getheaderOffset()
Description copied from interface:CosDocumentoffset of the PDF document header- Specified by:
getheaderOffsetin interfaceCosDocument
-
getheader
public String getheader()
Description copied from interface:CosDocumentthe content of the PDF header- Specified by:
getheaderin interfaceCosDocument
-
getheaderByte1
public Long getheaderByte1()
Description copied from interface:CosDocumentfirst four bytes in the comment that follows the PDF header- Specified by:
getheaderByte1in interfaceCosDocument
-
getheaderByte2
public Long getheaderByte2()
- Specified by:
getheaderByte2in interfaceCosDocument
-
getheaderByte3
public Long getheaderByte3()
- Specified by:
getheaderByte3in interfaceCosDocument
-
getheaderByte4
public Long getheaderByte4()
- Specified by:
getheaderByte4in interfaceCosDocument
-
getisOptionalContentPresent
public Boolean getisOptionalContentPresent()
true if catalog contain OCProperties key- Specified by:
getisOptionalContentPresentin interfaceCosDocument
-
getpostEOFDataSize
public Long getpostEOFDataSize()
EOF must complies PDF/A standard- Specified by:
getpostEOFDataSizein interfaceCosDocument
-
getfirstPageID
public String getfirstPageID()
Description copied from interface:CosDocumentid of the first page trailer, if the document is linearized. Null, if the document is not linearized- Specified by:
getfirstPageIDin interfaceCosDocument- Returns:
- ID of first page trailer
-
getlastID
public String getlastID()
Description copied from interface:CosDocumentid of the last trailer in the document- Specified by:
getlastIDin interfaceCosDocument- Returns:
- ID of last document trailer
-
getisLinearized
public Boolean getisLinearized()
Description copied from interface:CosDocumenttrue if the document is linearized- Specified by:
getisLinearizedin interfaceCosDocument- Returns:
- true if the current document is linearized
-
getdoesInfoMatchXMP
public Boolean getdoesInfoMatchXMP()
Description copied from interface:CosDocumenttrue if Info dictionary is present and synchronized with the document metadata- Specified by:
getdoesInfoMatchXMPin interfaceCosDocument- Returns:
- true if XMP content matches Info dictionary content
-
getMarked
public Boolean getMarked()
Description copied from interface:CosDocumentthe value of the /Marked entry in the MarkInfo dictionary (false, if this entry is missing)- Specified by:
getMarkedin interfaceCosDocument
-
getDisplayDocTitle
public Boolean getDisplayDocTitle()
Description copied from interface:CosDocumentvalue of the /DisplayDocTitle key in the ViewerPreferences dictionary- Specified by:
getDisplayDocTitlein interfaceCosDocument
-
getcontainsPieceInfo
public Boolean getcontainsPieceInfo()
Description copied from interface:CosDocumenttrue if the document catalog dictionary contains PieceInfo entry- Specified by:
getcontainsPieceInfoin interfaceCosDocument
-
getMarkInfo
public String getMarkInfo()
Description copied from interface:CosDocumentstring representation of the MarkInfo dictionary- Specified by:
getMarkInfoin interfaceCosDocument
-
getViewerPreferences
public String getViewerPreferences()
Description copied from interface:CosDocumentstring representation of the ViewerPreferences dictionary- Specified by:
getViewerPreferencesin interfaceCosDocument
-
getcontainsInfo
public Boolean getcontainsInfo()
Description copied from interface:CosDocumenttrue if the trailer dictionary contains Info key- Specified by:
getcontainsInfoin interfaceCosDocument
-
getSuspects
public Boolean getSuspects()
Description copied from interface:CosDocumentvalue of the /Suspects entry in the MarkInfo dictionary- Specified by:
getSuspectsin interfaceCosDocument
-
getRequirements
public String getRequirements()
Description copied from interface:CosDocument- null, if the /Requirements key is not present in the document Catalog- Specified by:
getRequirementsin interfaceCosDocument
-
getNeedsRendering
public Boolean getNeedsRendering()
Description copied from interface:CosDocumentNeedsRendering entry in the document's Catalog (false by default)- Specified by:
getNeedsRenderingin interfaceCosDocument- Returns:
- true if
NeedsRenderingentry in catalog containstruevalue.
-
getcontainsEmbeddedFiles
public Boolean getcontainsEmbeddedFiles()
Description copied from interface:CosDocumenttrue, if the document contains the EmbeddedFiles entry in the names dictionary- Specified by:
getcontainsEmbeddedFilesin interfaceCosDocument
-
getLinkedObjects
public List<? extends Object> getLinkedObjects(String link)
- Specified by:
getLinkedObjectsin interfaceObject- Overrides:
getLinkedObjectsin classGenericModelObject- Parameters:
link- - the name of a link- Returns:
- List of objects with the given link
-
-