|
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.COSIndirectObject
public class COSIndirectObject
An object representing an indirect object within a COSDocument.
Actually you should not override equals or hash without really knowing what you do. Portions of the implementation depend on indirect objects being real unique.
Method Summary | |
---|---|
Object |
accept(ICOSObjectVisitor visitor)
Accept a visitor object. |
ICOSContainer |
associate(ICOSContainer newContainer,
COSObject pObject)
It is the responsibility of the current container to create the association with the new one. |
COSDocumentElement |
containable()
The COSDocumentElement suitable for use in an
ICOSContainer . |
COSDocumentElement |
containable(COSObject pObject)
The stand-in to be used when object should be contained in a container. |
static COSIndirectObject |
create(COSObject object)
Create an indirection for object. |
static COSIndirectObject |
create(STDocument stDoc,
COSObjectKey key)
|
COSObject |
dereference()
Return the real object. |
ICOSContainer |
disassociate(ICOSContainer oldContainer,
COSObject pObject)
It is the responsibility of the current container to remove the association from the old one. |
COSDocument |
getDoc()
The document where this is contained or null. |
COSObjectKey |
getKey()
The key for this. |
COSObject |
getObject()
The object represented by this. |
boolean |
isDirty()
true if the object graph referenced by this is changed. |
boolean |
isEncryptOnWrite()
|
boolean |
isReference()
Answer true if this element is a reference (a
COSIndirectObject . |
boolean |
isSwapped()
Answer true if this elements content is swapped to a
persistent store. |
int |
referenceCount()
The number of references to the contained object. |
COSIndirectObject |
referenceIndirect(COSObject pObject)
Switch a contained object to an indirect one. |
void |
register(COSDocumentElement pObject)
It is the responsibility of the active container to register object in its data structures. |
void |
registerWith(STDocument pSTDoc)
|
ICOSContainer |
restoreStateContainer(ICOSContainer container)
Restore the save state for the container. |
ICOSContainer |
saveStateContainer()
Create a save state for the container when saving the COSObject state. |
void |
setDirty(boolean pDirty)
Set the dirty state of the indirect object |
void |
setEncryptOnWrite(boolean encryptOnWrite)
Flag the referenced object to be encrypted, if the document itself is encrypted. |
void |
setKey(COSObjectKey key)
Assign a COSObjectKey to this. |
void |
setObject(COSObject newObject)
Set the object for this reference. |
STDocument |
stGetDoc()
The ST level document. |
String |
toString()
|
void |
willChange(COSObject change)
Propagate a change from a COSObject down in the hierarchy. |
Methods inherited from class de.intarsys.pdf.cos.COSDocumentElement |
---|
handleException |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static COSIndirectObject create(STDocument stDoc, COSObjectKey key)
public static COSIndirectObject create(COSObject object)
object
- The object that should be indirect.
public COSDocument getDoc()
COSDocumentElement
COSDocumentElement
is at most contained in a single
COSDocument
.
getDoc
in interface ICOSContainer
getDoc
in class COSDocumentElement
public COSObjectKey getKey()
public void setObject(COSObject newObject)
newObject
- the new object to setpublic COSObject getObject()
public boolean isReference()
COSDocumentElement
true
if this element is a reference (a
COSIndirectObject
.
isReference
in class COSDocumentElement
true
if this element is a reference.public void willChange(COSObject change)
ICOSContainer
willChange
in interface ICOSContainer
public void setDirty(boolean pDirty)
public boolean isDirty()
true
if the object graph referenced by this is changed.
true
if the object graph referenced by this is
changed.public COSObject dereference()
COSDocumentElement
COSIndirectObject
).
dereference
in class COSDocumentElement
public boolean isSwapped()
COSDocumentElement
true
if this elements content is swapped to a
persistent store.
isSwapped
in class COSDocumentElement
true
if this elements content is swapped to
a persistent store.public String toString()
toString
in class Object
public void register(COSDocumentElement pObject)
ICOSContainer
register
in interface ICOSContainer
pObject
- The new object to be registered in the hierarchy.public void setKey(COSObjectKey key)
COSObjectKey
to this.
key
- The new key.public Object accept(ICOSObjectVisitor visitor) throws COSVisitorException
COSDocumentElement
visitor
by "double dispatching".
accept
in class COSDocumentElement
visitor
- The object visiting the receiver.
COSVisitorException
- An exception depending on the visitor semantics.public boolean isEncryptOnWrite()
true
if the referenced object should be encrypted.
The default is true;public void setEncryptOnWrite(boolean encryptOnWrite)
encryptOnWrite
- public STDocument stGetDoc()
public void registerWith(STDocument pSTDoc)
pSTDoc
- public COSIndirectObject referenceIndirect(COSObject pObject)
ICOSContainer
referenceIndirect
in interface ICOSContainer
pObject
- The object to be indirectpublic ICOSContainer associate(ICOSContainer newContainer, COSObject pObject)
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 ICOSContainer
ICOSContainer
for object
public ICOSContainer disassociate(ICOSContainer oldContainer, COSObject pObject)
ICOSContainer
| composite | indirect | | constant | n.a. | n.a. | null | n.a. | n.a. | composite | ok | n.a. | indirect | ok | n.a. |
disassociate
in interface ICOSContainer
ICOSContainer
for object
public COSDocumentElement containable()
COSDocumentElement
COSDocumentElement
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 COSDocumentElement
public COSDocumentElement containable(COSObject pObject)
ICOSContainer
containable
in interface ICOSContainer
pObject
- THe object whose containable is requested.
public int referenceCount()
ICOSContainer
referenceCount
in interface ICOSContainer
public ICOSContainer saveStateContainer()
ICOSContainer
saveStateContainer
in interface ICOSContainer
public ICOSContainer restoreStateContainer(ICOSContainer container)
ICOSContainer
restoreStateContainer
in interface ICOSContainer
|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |