|
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.COSDocumentElement
de.intarsys.pdf.cos.COSObject
public abstract class COSObject
Abstract superclass for all COS level object types
| Field Summary | |
|---|---|
static ICOSContainer |
CONSTANT_CONTAINER
This is the container for template objects. |
static ICOSContainer |
NULL_CONTAINER
This is the default container for non - contained objects. |
static Object |
SLOT_CONTAINER
|
| Method Summary | |
|---|---|
abstract void |
addObjectListener(ICOSObjectListener listener)
Add a listener for object changes. |
COSArray |
asArray()
this as a COSArray or null |
COSBoolean |
asBoolean()
|
COSDictionary |
asDictionary()
|
COSFixed |
asFixed()
|
COSInteger |
asInteger()
|
COSName |
asName()
|
COSNull |
asNull()
|
COSNumber |
asNumber()
|
COSStream |
asStream()
|
COSString |
asString()
|
abstract Iterator |
basicIterator()
An iterator over contained objects and references. |
COSObject |
beConstant()
Declare this to be a constant. |
COSIndirectObject |
beIndirect()
Make an indirect object out of a direct one. |
COSDocumentElement |
containable()
The COSDocumentElement suitable for use in an
ICOSContainer. |
abstract COSObject |
copyDeep()
Make a deep copy of the receiver within the same document. |
abstract COSObject |
copyDeep(Map copied)
Make a deep copy of the receiver within the same document. |
COSObject |
copyOptional()
Make a copy of the receiver within the same document. |
COSObject |
copyShallow()
Make a copy of the receiver. |
COSObject |
copySubGraph()
Make a copy of the receiver within the same document. |
COSObject |
dereference()
return the real object. this is needed for polymorphic handling of document elements. at application programming level only COSObject, never COSReference is seen. |
ICOSContainer |
getContainer()
Answer the object that contains this. |
COSDocument |
getDoc()
The document that contains this. |
COSIndirectObject |
getIndirectObject()
return the indirect object for the receiver. application level programmers should not use this method. this is needed for creating a physical representation of the document (serializing) |
boolean |
isDangling()
true if this object is not contained in a document
directly or indirectly. |
boolean |
isIndirect()
Answer true if this object is an indirect one. |
boolean |
isNull()
answer true if receiver is the null object |
boolean |
isNumber()
answer true if receiver is a number |
abstract boolean |
isObjectListenerAvailable()
true if an ICOSObjectListener is registered. |
abstract boolean |
isPrimitive()
Answer true if this object is of a primitive type |
boolean |
isSwapped()
Answer true if this elements content is swapped to a
persistent store. |
abstract Iterator |
iterator()
An iterator over contained objects. |
abstract void |
removeObjectListener(ICOSObjectListener listener)
Remove a listener for object changes. |
void |
restoreState(Object saveState)
|
String |
stringValue()
A string representation for the receiver. |
String |
toString()
|
| Methods inherited from class de.intarsys.pdf.cos.COSDocumentElement |
|---|
accept, handleException, isReference |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.intarsys.tools.component.ISaveStateSupport |
|---|
saveState |
| Field Detail |
|---|
public static final ICOSContainer CONSTANT_CONTAINER
public static final ICOSContainer NULL_CONTAINER
public static final Object SLOT_CONTAINER
| Method Detail |
|---|
public abstract void addObjectListener(ICOSObjectListener listener)
listener - The listener to be informed about changes.public abstract boolean isObjectListenerAvailable()
true if an ICOSObjectListener is registered. This
is for test purposes.
public abstract Iterator basicIterator()
This iterator returns COSDocumentElements, leaving references alone.
public COSObject beConstant()
public COSIndirectObject beIndirect()
It is possible to morph existing objects into indirect ones, the objects in the hierarchy (container/document) are informed and will reflect the change.
public COSDocumentElement containable()
COSDocumentElementCOSDocumentElement suitable for use in an
ICOSContainer. This may be a COSIndirectObject or the
COSObject itself if not indirect.
This method should not be used by the application programmer. This is
called in the COSObject lifecycle to ensure internal consistency.
containable in class COSDocumentElementpublic abstract COSObject copyDeep()
The algorithm copies this along with all outgoing
references (recursively).
Object identity is preserved.
Be careful when copying objects, as there are semantics that may NOT be recognized by this method.
public abstract COSObject copyDeep(Map copied)
The copied map is used to identify objects copied in
earlier runs of this method to avoid duplicating resources used in
different copy targets (for example the pages of a document).
copied is modified while executing copyDeep
and contains a mapping from indirect objects in the original document to
copied objects.
The algorithm copies this along with all outgoing
references (recursively).
Object identity is preserved.
Be careful when copying objects, as there are semantics that may NOT be recognized by this method.
copyDeep()public final COSObject copyOptional()
Be careful when copying objects, as there are semantics that may NOT be recognized by this method.
public COSObject copyShallow()
A copy is made of the receiver and after this recursively of all not indirect objects.
Be careful when copying objects, as there are semantics that may NOT be recognized by this method.
public final COSObject copySubGraph()
The algorithm copies this along with all outgoing
references (recursively) that themselve have a navigation path to
this. The result is a new subgraph extending from the
copy of this where no navigation path leads back to
this.
Object identity is preserved.
Be careful when copying objects, as there are semantics that may NOT be recognized by this method.
public COSObject dereference()
dereference in class COSDocumentElementpublic ICOSContainer getContainer()
public COSDocument getDoc()
This may return null, as COSObject graphs may be created "offline" and add to the document as a whole.
The document is evaluated via the COSObject graph hierarchy that finally must be contained within a document.
getDoc in class COSDocumentElementpublic COSIndirectObject getIndirectObject()
public boolean isDangling()
true if this object is not contained in a document
directly or indirectly. This is especially true when an object is new (or
reset to this state when an undo happend). Remember that an object can
still be garbage, even if it is not dangling.
true if this object is not contained in a document
directly or indirectly.public boolean isIndirect()
true if this object is an indirect one.
true if this object is an indirect one.public boolean isNull()
public boolean isNumber()
public abstract boolean isPrimitive()
public boolean isSwapped()
COSDocumentElementtrue if this elements content is swapped to a
persistent store.
isSwapped in class COSDocumentElementtrue if this elements content is swapped to
a persistent store.public abstract Iterator iterator()
This iterator returns only COSObject instances, references are dereferenced.
public abstract void removeObjectListener(ICOSObjectListener listener)
listener - The listener to be removed.public void restoreState(Object saveState)
restoreState in interface de.intarsys.tools.component.ISaveStateSupportpublic String stringValue()
public String toString()
toString in class Objectpublic COSBoolean asBoolean()
nullpublic COSName asName()
nullpublic COSNull asNull()
nullpublic COSString asString()
nullpublic COSFixed asFixed()
nullpublic COSInteger asInteger()
nullpublic COSNumber asNumber()
nullpublic COSArray asArray()
this as a COSArray or null
nullpublic COSDictionary asDictionary()
nullpublic COSStream asStream()
null
|
intarsys PDF library API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||