4 package org.vamsas.client;
6 * Base class for all Vamsas objects extracted
7 * from an IClientDocument.
8 * An object maybe registered or unregistered.
13 public abstract class object {
16 * unique id for all vamsas objects
17 * allows unambiguous referencing
18 * to any object in the vamsas document
20 protected boolean __stored_in_document=false;
21 protected long __last_hash=0;
22 protected VorbaId vorbaId=null;
23 protected IVorbaIdFactory __vorba=null;
26 * @return true if object is registered
28 public boolean isRegistered() {
29 return (vorbaId!=null);
32 * Method to get fixed reference for
33 * the object in the vamsas document.
34 * @returns null if object is neither registered
35 * or not associated with a properly instantiated
38 public String getVorbaId() {
40 // Try to use the associated factory.
42 if ((vorbaId = __vorba.makeVorbaId())==null)
43 return null; // Factory not valid.
47 return vorbaId.getId();
50 * used by the IClient implementation
51 * to generate unique Id based on
52 * client applications current namespace.
54 protected void setVorbaId(VorbaId newid) {
59 * @return true if object is present in Vamsas Document.
61 public boolean is__stored_in_document() {
62 return __stored_in_document;
65 * for use by Vorba agent to reflect state of
66 * vamsas object to client application.
67 * @param __stored_in_document The __stored_in_document to set.
69 protected void set__stored_in_document(boolean __stored_in_document) {
70 this.__stored_in_document = __stored_in_document;
73 * __last_hash is the hash value computed
74 * when the object was last checked against
75 * a IClientDocument generated by the
76 * object's parent IClient instance.
77 * @return Returns the __last_hash.
79 public long get__last_hash() {