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 VorbaId vorbaId=null;
22 protected IVorbaIdFactory __vorba=null;
25 * @return true if object is registered
27 public boolean isRegistered() {
28 return (vorbaId!=null);
31 * Method to get fixed reference for
32 * the object in the vamsas document.
33 * @returns null if object is neither registered
34 * or not associated with a properly instantiated
37 public String getVorbaId() {
39 // Try to use the associated factory.
41 if ((vorbaId = __vorba.makeVorbaId())==null)
42 return null; // Factory not valid.
46 return vorbaId.getId();
49 * used by the IClient implementation
50 * to generate unique Id based on
51 * client applications current namespace.
53 protected void setVorbaId(VorbaId newid) {
58 * @return true if object is present in Vamsas Document.
60 public boolean is__stored_in_document() {
61 return __stored_in_document;
64 * for use by Vorba agent to reflect state of
65 * vamsas object to client application.
66 * @param __stored_in_document The __stored_in_document to set.
68 protected void set__stored_in_document(boolean __stored_in_document) {
69 this.__stored_in_document = __stored_in_document;