Package org.verapdf.gf.model.impl.pd
Class GFPDAnnot
- java.lang.Object
-
- org.verapdf.model.GenericModelObject
-
- org.verapdf.gf.model.impl.pd.GFPDObject
-
- org.verapdf.gf.model.impl.pd.GFPDAnnot
-
- Direct Known Subclasses:
GFPD3DAnnot,GFPDLinkAnnot,GFPDPrinterMarkAnnot,GFPDTrapNetAnnot,GFPDWidgetAnnot
public class GFPDAnnot extends GFPDObject implements PDAnnot
- Author:
- Maksim Bezrukov
-
-
Field Summary
Fields Modifier and Type Field Description static StringAstatic StringADDITIONAL_ACTIONstatic StringANNOTATION_TYPEstatic StringAPPEARANCEstatic StringBMstatic StringCstatic StringDICTstatic StringICstatic StringLANGstatic StringLINKstatic StringPRINTER_MARKprotected PDResourcesHandlerresourcesstatic StringSTREAMstatic StringTRAP_NETstatic StringTYPE_3Dstatic StringWIDGETstatic intX_AXISstatic intY_AXIS-
Fields inherited from class org.verapdf.gf.model.impl.pd.GFPDObject
contentStream, document, id, MAX_NUMBER_OF_ELEMENTS, pdcMap, pdFont, simpleCOSObject, simplePDObject
-
Fields inherited from class org.verapdf.model.GenericModelObject
contextDependent
-
-
Constructor Summary
Constructors Constructor Description GFPDAnnot(PDAnnotation annot, PDResourcesHandler pageResources, PDPage page)GFPDAnnot(PDAnnotation annot, PDResourcesHandler pageResources, PDPage page, String type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GFPDAnnotcreateAnnot(PDAnnotation annot, PDResourcesHandler pageResources, PDPage page)StringgetAlt()the Alt entry of parent structure elementStringgetAP()ampersand-separated list of all keys in the annotation's appearance dictionary (AP key)DoublegetCA()annotation opacity (CA key)BooleangetcontainsA()true if the annotation dictionary contains the A entryBooleangetcontainsAA()true if the annotation dictionary contains the AA entryStringgetContents()the value of the /Contents entryLonggetF()annotation flagsStringgetFT()the value of the /FT entry (Field type), in case this is the widget annotation representing the form field, or null, if this entry is not presentDoublegetheight()the height of the annotation computed as an absolute value of the difference of value 2 and value 4 of the Rect entryBooleangetisOutsideCropBox()true, if annotation rectangle is outside page CropBoxList<? extends Object>getLinkedObjects(String link)StringgetN_type()the type of the normal appearance entry (/N key) in the annotation appearance dictionary (/AP key) or null, if the normal appearance is not presentStringgetstructParentType()struct parent element typeStringgetSubtype()annotation subtypeDoublegetwidth()the width of the annotation computed as an absolute value of the difference of value 1 and value 3 of the Rect entry-
Methods inherited from class org.verapdf.gf.model.impl.pd.GFPDObject
getentries, getID
-
Methods inherited from class org.verapdf.model.GenericModelObject
getContext, getExtraContext, 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
-
Methods inherited from interface org.verapdf.model.pdlayer.PDObject
getentries
-
-
-
-
Field Detail
-
ANNOTATION_TYPE
public static final String ANNOTATION_TYPE
- See Also:
- Constant Field Values
-
DICT
public static final String DICT
- See Also:
- Constant Field Values
-
STREAM
public static final String STREAM
- See Also:
- Constant Field Values
-
APPEARANCE
public static final String APPEARANCE
- See Also:
- Constant Field Values
-
C
public static final String C
- See Also:
- Constant Field Values
-
IC
public static final String IC
- See Also:
- Constant Field Values
-
A
public static final String A
- See Also:
- Constant Field Values
-
ADDITIONAL_ACTION
public static final String ADDITIONAL_ACTION
- See Also:
- Constant Field Values
-
LANG
public static final String LANG
- See Also:
- Constant Field Values
-
BM
public static final String BM
- See Also:
- Constant Field Values
-
LINK
public static final String LINK
- See Also:
- Constant Field Values
-
PRINTER_MARK
public static final String PRINTER_MARK
- See Also:
- Constant Field Values
-
WIDGET
public static final String WIDGET
- See Also:
- Constant Field Values
-
TRAP_NET
public static final String TRAP_NET
- See Also:
- Constant Field Values
-
TYPE_3D
public static final String TYPE_3D
- See Also:
- Constant Field Values
-
X_AXIS
public static final int X_AXIS
- See Also:
- Constant Field Values
-
Y_AXIS
public static final int Y_AXIS
- See Also:
- Constant Field Values
-
resources
protected final PDResourcesHandler resources
-
-
Constructor Detail
-
GFPDAnnot
public GFPDAnnot(PDAnnotation annot, PDResourcesHandler pageResources, PDPage page)
-
GFPDAnnot
public GFPDAnnot(PDAnnotation annot, PDResourcesHandler pageResources, PDPage page, String type)
-
-
Method Detail
-
getSubtype
public String getSubtype()
Description copied from interface:PDAnnotannotation subtype- Specified by:
getSubtypein interfacePDAnnot
-
getAP
public String getAP()
Description copied from interface:PDAnnotampersand-separated list of all keys in the annotation's appearance dictionary (AP key)
-
getN_type
public String getN_type()
Description copied from interface:PDAnnotthe type of the normal appearance entry (/N key) in the annotation appearance dictionary (/AP key) or null, if the normal appearance is not present
-
getFT
public String getFT()
Description copied from interface:PDAnnotthe value of the /FT entry (Field type), in case this is the widget annotation representing the form field, or null, if this entry is not present
-
getwidth
public Double getwidth()
Description copied from interface:PDAnnotthe width of the annotation computed as an absolute value of the difference of value 1 and value 3 of the Rect entry
-
getheight
public Double getheight()
Description copied from interface:PDAnnotthe height of the annotation computed as an absolute value of the difference of value 2 and value 4 of the Rect entry
-
getcontainsAA
public Boolean getcontainsAA()
Description copied from interface:PDAnnottrue if the annotation dictionary contains the AA entry- Specified by:
getcontainsAAin interfacePDAnnot
-
getstructParentType
public String getstructParentType()
Description copied from interface:PDAnnotstruct parent element type- Specified by:
getstructParentTypein interfacePDAnnot
-
getContents
public String getContents()
Description copied from interface:PDAnnotthe value of the /Contents entry- Specified by:
getContentsin interfacePDAnnot
-
getAlt
public String getAlt()
Description copied from interface:PDAnnotthe Alt entry of parent structure element
-
getisOutsideCropBox
public Boolean getisOutsideCropBox()
Description copied from interface:PDAnnottrue, if annotation rectangle is outside page CropBox- Specified by:
getisOutsideCropBoxin interfacePDAnnot
-
getcontainsA
public Boolean getcontainsA()
Description copied from interface:PDAnnottrue if the annotation dictionary contains the A entry- Specified by:
getcontainsAin interfacePDAnnot
-
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
-
createAnnot
public static GFPDAnnot createAnnot(PDAnnotation annot, PDResourcesHandler pageResources, PDPage page)
-
-