|
jPod PDF library | |||||||||
| 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
de.intarsys.pdf.cos.COSCompositeObject
public abstract class COSCompositeObject
A superclass implementation for all containers of other COSObject
instances.
| Field Summary |
|---|
| Fields inherited from class de.intarsys.pdf.cos.COSObject |
|---|
CONSTANT_CONTAINER, NULL_CONTAINER, SLOT_CONTAINER |
| Method Summary | |
|---|---|
void |
addObjectListener(ICOSObjectListener listener)
Add a listener for object changes. |
ICOSContainer |
associate(ICOSContainer newContainer,
COSObject object)
It is the responsibility of the current container to create the association with the new one. |
COSDocumentElement |
containable(COSObject object)
The stand-in to be used when object should be contained in a container. |
COSObject |
copyDeep()
Make a deep copy of the receiver within the same document. |
COSObject |
copyDeep(Map copied)
Make a deep copy of the receiver within the same document. |
ICOSContainer |
disassociate(ICOSContainer oldContainer,
COSObject object)
It is the responsibility of the current container to remove the association from the old one. |
Object |
getAttribute(Object key)
|
void |
harden(COSObject object)
Propagate up the containment hierarchy |
boolean |
isObjectListenerAvailable()
true if an ICOSObjectListener is registered. |
boolean |
isPrimitive()
Answer true if this object is of a primitive type |
boolean |
mayBeSwapped()
true if this object may be swapped from memory by the
garbage collector. |
int |
referenceCount()
The number of references to the contained object. |
COSIndirectObject |
referenceIndirect(COSObject object)
Change the reference to the object contained in this to an indirect one via reference. |
void |
register(COSDocumentElement object)
It is the responsibility of the active container to register object in its data structures. |
Object |
removeAttribute(Object key)
|
void |
removeObjectListener(ICOSObjectListener listener)
Remove a listener for object changes. |
ICOSContainer |
restoreStateContainer(ICOSContainer pContainer)
Restore the save state for the container. |
ICOSContainer |
saveStateContainer()
Create a save state for the container when saving the COSObject state. |
Object |
setAttribute(Object key,
Object value)
|
void |
soften(COSObject object)
Propagate up the containment hierarchy |
void |
willChange(COSObject change)
Propagate a change from a COSObject down in the hierarchy. |
| Methods inherited from class de.intarsys.pdf.cos.COSObject |
|---|
asArray, asBoolean, asDictionary, asFixed, asInteger, asName, asNull, asNumber, asStream, asString, basicIterator, beConstant, beIndirect, containable, copyOptional, copyShallow, copySubGraph, dereference, getContainer, getDoc, getIndirectObject, getValueBoolean, getValueBytes, getValueFloat, getValueInteger, getValueString, harden, isDangling, isIndirect, isNull, isNumber, isSwapped, iterator, restoreState, soften, stringValue, 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.pdf.cos.ICOSContainer |
|---|
getDoc |
| Methods inherited from interface de.intarsys.tools.component.ISaveStateSupport |
|---|
saveState |
| Method Detail |
|---|
public void addObjectListener(ICOSObjectListener listener)
COSObject
addObjectListener in class COSObjectlistener - The listener to be informed about changes.
public ICOSContainer associate(ICOSContainer newContainer,
COSObject object)
ICOSContainer
| composite | indirect |
|
constant | n.a. | n.a. | (always copied before by "containable")
null | ok | ok |
composite | error | ok |
indirect | ok | ok |
associate in interface ICOSContainerICOSContainer for objectpublic COSDocumentElement containable(COSObject object)
ICOSContainer
containable in interface ICOSContainerobject - THe object whose containable is requested.
public final COSObject copyDeep()
COSObject
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 in class COSObjectpublic COSObject copyDeep(Map copied)
COSObject
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 in class COSObjectCOSObject.copyDeep()
public ICOSContainer disassociate(ICOSContainer oldContainer,
COSObject object)
ICOSContainer
| composite | indirect |
|
constant | n.a. | n.a. |
null | n.a. | n.a. |
composite | ok | n.a. |
indirect | ok | n.a. |
disassociate in interface ICOSContainerICOSContainer for objectpublic Object getAttribute(Object key)
getAttribute in interface de.intarsys.tools.attribute.IAttributeSupportpublic void harden(COSObject object)
harden in interface ICOSContainerobject - The object that should be kept in memory.ICOSContainer.harden(de.intarsys.pdf.cos.COSObject)public boolean isObjectListenerAvailable()
COSObjecttrue if an ICOSObjectListener is registered. This
is for test purposes.
isObjectListenerAvailable in class COSObjectpublic boolean isPrimitive()
COSObject
isPrimitive in class COSObjectpublic boolean mayBeSwapped()
COSObjecttrue if this object may be swapped from memory by the
garbage collector.
mayBeSwapped in class COSObjecttrue if this object may be swapped from memory by
the garbage collector.public int referenceCount()
ICOSContainer
referenceCount in interface ICOSContainerpublic COSIndirectObject referenceIndirect(COSObject object)
This method must be redefined by all containers to reflect the new reference type in their child references.
This event is delegated to the document to create the correct state for a new indirect object. If a document is not yet present, the state is changed when the COSObject (s) are added to the document finally. This can happen when constructing a COSObject graph "offline" and later add it to the document.
From the COS invariants you can be sure that the object referenced by ref is contained in this at most once
referenceIndirect in interface ICOSContainerobject - public void register(COSDocumentElement object)
ICOSContainer
register in interface ICOSContainerobject - The new object to be registered in the hierarchy.public Object removeAttribute(Object key)
removeAttribute in interface de.intarsys.tools.attribute.IAttributeSupportpublic void removeObjectListener(ICOSObjectListener listener)
COSObject
removeObjectListener in class COSObjectlistener - The listener to be removed.public ICOSContainer restoreStateContainer(ICOSContainer pContainer)
ICOSContainer
restoreStateContainer in interface ICOSContainerpublic ICOSContainer saveStateContainer()
ICOSContainer
saveStateContainer in interface ICOSContainer
public Object setAttribute(Object key,
Object value)
setAttribute in interface de.intarsys.tools.attribute.IAttributeSupportpublic void soften(COSObject object)
soften in interface ICOSContainerobject - The object that should be kept in memory.ICOSContainer.soften(de.intarsys.pdf.cos.COSObject)public void willChange(COSObject change)
ICOSContainer
willChange in interface ICOSContainer
|
jPod PDF library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||