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 String
COS_DOCUMENT_TYPE
Type 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 Boolean
getcontainsEmbeddedFiles()
true, if the document contains the EmbeddedFiles entry in the names dictionaryBoolean
getcontainsInfo()
true if the trailer dictionary contains Info keyBoolean
getcontainsPieceInfo()
true if the document catalog dictionary contains PieceInfo entryBoolean
getDisplayDocTitle()
value of the /DisplayDocTitle key in the ViewerPreferences dictionaryBoolean
getdoesInfoMatchXMP()
true if Info dictionary is present and synchronized with the document metadataString
getfirstPageID()
id of the first page trailer, if the document is linearized.String
getheader()
the content of the PDF headerLong
getheaderByte1()
first four bytes in the comment that follows the PDF headerLong
getheaderByte2()
Long
getheaderByte3()
Long
getheaderByte4()
Long
getheaderOffset()
offset of the PDF document headerDouble
getheaderVersion()
version of the documentBoolean
getisLinearized()
true if the document is linearizedBoolean
getisOptionalContentPresent()
true if catalog contain OCProperties keyString
getlastID()
id of the last trailer in the documentList<? extends Object>
getLinkedObjects(String link)
Boolean
getMarked()
the value of the /Marked entry in the MarkInfo dictionary (false, if this entry is missing)String
getMarkInfo()
string representation of the MarkInfo dictionaryBoolean
getNeedsRendering()
NeedsRendering entry in the document's Catalog (false by default)Long
getnrIndirects()
Number of indirect objects in the documentLong
getpostEOFDataSize()
EOF must complies PDF/A standardString
getRequirements()
- null, if the /Requirements key is not present in the document CatalogBoolean
getSuspects()
value of the /Suspects entry in the MarkInfo dictionaryString
getViewerPreferences()
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:
getnrIndirects
in interfaceCosDocument
-
getheaderVersion
public Double getheaderVersion()
Description copied from interface:CosDocument
version of the document- Specified by:
getheaderVersion
in interfaceCosDocument
- Returns:
- version of pdf document
-
getheaderOffset
public Long getheaderOffset()
Description copied from interface:CosDocument
offset of the PDF document header- Specified by:
getheaderOffset
in interfaceCosDocument
-
getheader
public String getheader()
Description copied from interface:CosDocument
the content of the PDF header- Specified by:
getheader
in interfaceCosDocument
-
getheaderByte1
public Long getheaderByte1()
Description copied from interface:CosDocument
first four bytes in the comment that follows the PDF header- Specified by:
getheaderByte1
in interfaceCosDocument
-
getheaderByte2
public Long getheaderByte2()
- Specified by:
getheaderByte2
in interfaceCosDocument
-
getheaderByte3
public Long getheaderByte3()
- Specified by:
getheaderByte3
in interfaceCosDocument
-
getheaderByte4
public Long getheaderByte4()
- Specified by:
getheaderByte4
in interfaceCosDocument
-
getisOptionalContentPresent
public Boolean getisOptionalContentPresent()
true if catalog contain OCProperties key- Specified by:
getisOptionalContentPresent
in interfaceCosDocument
-
getpostEOFDataSize
public Long getpostEOFDataSize()
EOF must complies PDF/A standard- Specified by:
getpostEOFDataSize
in interfaceCosDocument
-
getfirstPageID
public String getfirstPageID()
Description copied from interface:CosDocument
id of the first page trailer, if the document is linearized. Null, if the document is not linearized- Specified by:
getfirstPageID
in interfaceCosDocument
- Returns:
- ID of first page trailer
-
getlastID
public String getlastID()
Description copied from interface:CosDocument
id of the last trailer in the document- Specified by:
getlastID
in interfaceCosDocument
- Returns:
- ID of last document trailer
-
getisLinearized
public Boolean getisLinearized()
Description copied from interface:CosDocument
true if the document is linearized- Specified by:
getisLinearized
in interfaceCosDocument
- Returns:
- true if the current document is linearized
-
getdoesInfoMatchXMP
public Boolean getdoesInfoMatchXMP()
Description copied from interface:CosDocument
true if Info dictionary is present and synchronized with the document metadata- Specified by:
getdoesInfoMatchXMP
in interfaceCosDocument
- Returns:
- true if XMP content matches Info dictionary content
-
getMarked
public Boolean getMarked()
Description copied from interface:CosDocument
the value of the /Marked entry in the MarkInfo dictionary (false, if this entry is missing)- Specified by:
getMarked
in interfaceCosDocument
-
getDisplayDocTitle
public Boolean getDisplayDocTitle()
Description copied from interface:CosDocument
value of the /DisplayDocTitle key in the ViewerPreferences dictionary- Specified by:
getDisplayDocTitle
in interfaceCosDocument
-
getcontainsPieceInfo
public Boolean getcontainsPieceInfo()
Description copied from interface:CosDocument
true if the document catalog dictionary contains PieceInfo entry- Specified by:
getcontainsPieceInfo
in interfaceCosDocument
-
getMarkInfo
public String getMarkInfo()
Description copied from interface:CosDocument
string representation of the MarkInfo dictionary- Specified by:
getMarkInfo
in interfaceCosDocument
-
getViewerPreferences
public String getViewerPreferences()
Description copied from interface:CosDocument
string representation of the ViewerPreferences dictionary- Specified by:
getViewerPreferences
in interfaceCosDocument
-
getcontainsInfo
public Boolean getcontainsInfo()
Description copied from interface:CosDocument
true if the trailer dictionary contains Info key- Specified by:
getcontainsInfo
in interfaceCosDocument
-
getSuspects
public Boolean getSuspects()
Description copied from interface:CosDocument
value of the /Suspects entry in the MarkInfo dictionary- Specified by:
getSuspects
in interfaceCosDocument
-
getRequirements
public String getRequirements()
Description copied from interface:CosDocument
- null, if the /Requirements key is not present in the document Catalog- Specified by:
getRequirements
in interfaceCosDocument
-
getNeedsRendering
public Boolean getNeedsRendering()
Description copied from interface:CosDocument
NeedsRendering entry in the document's Catalog (false by default)- Specified by:
getNeedsRendering
in interfaceCosDocument
- Returns:
- true if
NeedsRendering
entry in catalog containstrue
value.
-
getcontainsEmbeddedFiles
public Boolean getcontainsEmbeddedFiles()
Description copied from interface:CosDocument
true, if the document contains the EmbeddedFiles entry in the names dictionary- Specified by:
getcontainsEmbeddedFiles
in interfaceCosDocument
-
getLinkedObjects
public List<? extends Object> getLinkedObjects(String link)
- Specified by:
getLinkedObjects
in interfaceObject
- Overrides:
getLinkedObjects
in classGenericModelObject
- Parameters:
link
- - the name of a link- Returns:
- List of objects with the given link
-
-