|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.intarsys.pdf.cos.COSBasedObject
de.intarsys.pdf.pd.PDObject
public abstract class PDObject
This is the abstract superclass for all complex PD level objects.
PD Level objects provide the PDF semantics on top of the basic datatypes of COS Level objects. PDObject provides generic methods used along all subtypes.
PDObjects should be created only using the factory methods of their meta
classes to ensure the semantics implemented in the PD layer, as for example
PD object identity, subclass selection or proper initialization.
Example:
PDPage page = (PDPage)PDPage.META.createNew();
Nested Class Summary | |
---|---|
static class |
PDObject.MetaClass
The meta class implementation |
Field Summary | |
---|---|
static COSName |
DK_Subtype
|
static COSName |
DK_Type
|
static PDObject.MetaClass |
META
The meta class instance |
Method Summary | |
---|---|
COSObject |
cosGetFieldDescendant(COSName name)
Convenience method to access fields in COSDictionary based
PDObject instances. |
COSObject |
cosGetFieldInheritable(COSName name)
Convenience method to access fields in COSDictionary based
PDObject instances. |
COSObject |
cosGetFieldInherited(COSName name)
Convenience method to access inherited fields in COSDictionary
based PDObject instances. |
COSName |
cosGetSubtype()
The /Subtype field of this PDObject or null. |
COSName |
cosGetType()
The /Type field of this PDObject or null. |
COSObject |
cosRemoveFieldInheritable(COSName name)
Convenience method to access fields in COSDictionary based
PDObject instances. |
COSObject |
cosSetFieldInheritable(COSName name,
COSObject cosObj)
Convenience method to access fields in COSDictionary based
PDObject instances. |
COSName |
cosSetSubtype(COSName newType)
Set the /Subtype field of this PDObject . |
COSName |
cosSetType(COSName newType)
Set the /Type field of this PDObject . |
PDDocument |
getDoc()
Try the best in finding the PDDocument for this PDObject. |
List |
getGenericChildren()
Get a collection of PDObject children if the receiver is a node
in a hierarchical structure (like page nodes or form fields). |
PDObject |
getGenericParent()
The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields). |
void |
setGenericParent(PDObject parent)
Set the parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields). |
String |
toString()
|
Methods inherited from class de.intarsys.pdf.cos.COSBasedObject |
---|
changed, cosGetArray, cosGetDict, cosGetDoc, cosGetField, cosGetObject, cosGetStream, cosHasField, cosRemoveField, cosSetField, getAttribute, getFieldBoolean, getFieldDate, getFieldFixed, getFieldFixedArray, getFieldInt, getFieldMLString, getFieldString, invalidateCaches, removeAttribute, setAttribute, setFieldBoolean, setFieldFixed, setFieldInt, setFieldMLString, setFieldName, setFieldObject, setFieldString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PDObject.MetaClass META
public static final COSName DK_Type
public static final COSName DK_Subtype
Method Detail |
---|
public COSObject cosGetFieldDescendant(COSName name)
COSDictionary
based
PDObject
instances. This method supports "inheritance" on
hierarchical structured PDObject
instances. It returns the field
either from the receiver or one of the known descendants.
name
- the field to read
public COSObject cosGetFieldInheritable(COSName name)
COSDictionary
based
PDObject
instances.
This method supports "inheritance" on hierarchical structured
PDObject
instances. It returns the field either from the receiver
or one of its parents.
name
- the field to read
public COSObject cosGetFieldInherited(COSName name)
COSDictionary
based PDObject
instances.
This method supports "inheritance" on hierarchical structured
PDObject
instances. It returns the inherited field value from one
of the receiver's parents or COSNull
.
name
- the field to read
public final COSName cosGetSubtype()
PDObject
or null. This method is not
supported on PDObject
instances that are not based on a
COSDictionary
public final COSName cosGetType()
PDObject
or null. This method is not
supported on PDObject
instances that are not based on a
COSDictionary
public COSObject cosRemoveFieldInheritable(COSName name)
COSDictionary
based
PDObject
instances. This method supports "inheritance" on
hierarchical structured PDObject
instances. It removes a field in
the receiver and all its descendants.
name
- the field to remove from the receiver
name
in thispublic COSObject cosSetFieldInheritable(COSName name, COSObject cosObj)
COSDictionary
based
PDObject
instances. This method supports "inheritance" on
hierarchical structured PDObject
instances. It sets a field value
in the receiver when the field is inheritable. This method removes the
field from every child to make sure it uses the inherited value.
name
- the field to setcosObj
- the object to set in the field
name
in thispublic final COSName cosSetSubtype(COSName newType)
PDObject
. This method is not
supported on PDObject
instances that are not based on a
COSDictionary
public final COSName cosSetType(COSName newType)
PDObject
. This method is not
supported on PDObject
instances that are not based on a
COSDictionary
public PDDocument getDoc()
public List getGenericChildren()
PDObject
children if the receiver is a node
in a hierarchical structure (like page nodes or form fields).
This enables the generic implementation of inherited field values and so on.
A concrete PDObject implementation supporting inheritance should implement this method.
PDObject
children if the receiver is a
node in a hierarchical structure .public PDObject getGenericParent()
A concrete PDObject implementation supporting inheritance should implement this method.
public void setGenericParent(PDObject parent)
A concrete PDObject implementation supporting inheritance should implement this method.
parent
- The new parent object.public String toString()
toString
in class COSBasedObject
|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |