|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object context.arch.comm.DataObject
This class implements the DataObject class. It stores the data used for sending messages between components.
Field Summary | |
static boolean |
DEBUG
Debug flag. |
Constructor Summary | |
DataObject()
Basic constructor. |
|
DataObject(java.lang.String name)
Constructor that sets the name of the DataObject element |
|
DataObject(java.lang.String name,
java.util.Hashtable atts,
java.util.Vector value)
Constructor that sets the name of the DataObject element, a vector of values for the element, and a list of attributes |
|
DataObject(java.lang.String name,
java.lang.String value)
Constructor that sets the name of the DataObject element and a single value for the element |
|
DataObject(java.lang.String name,
java.util.Vector value)
Constructor that sets the name of the DataObject element and a vector of values for the element |
Method Summary | |
void |
addElement(java.lang.String name)
This method adds an element to this DataObject |
void |
addElement(java.lang.String name,
java.util.Hashtable atts)
This method adds an element and list of attributes to this DataObject |
void |
addValue(java.lang.String value)
Adds a value to the current element |
void |
closeElement(java.lang.String name)
This method closes the currently open/added element in order to do some internal housecleaning. |
int |
countChildren()
Counts the children of the current DataObject |
boolean |
existsElement(java.lang.String name)
This method looks for an element in this DataObject. |
java.util.Hashtable |
getAttributes()
Returns the list of attributes for the DataObject element |
java.util.Vector |
getChild(int i)
Returns the specified child of the current DataObject |
DataObject |
getChild(java.lang.String name)
|
java.util.Vector |
getChildren()
Returns the children of the current DataObject |
DataObject |
getDataObject(java.lang.String string)
Returns the DataObject element/sub-element with the specified name |
java.lang.Object |
getDataObjectFirstValue(java.lang.String string)
Returns the first value of the DataObject element/sub-element with the specified name, if it exists. |
java.lang.String |
getName()
Returns the name of the DataObject element |
DataObject |
getNthDataObject(java.lang.String string,
int n)
Returns the Nth DataObject element/sub-element with the specified name NB: we assume the current DataObject has 1 level of children. |
java.util.Vector |
getValue()
Returns the values for the DataObject element |
void |
setAttributes(java.util.Hashtable atts)
Sets the list of attributes for the DataObject element |
void |
setName(java.lang.String name)
Sets the name of the DataObject element |
void |
setValue(java.lang.String value)
Sets a value for the DataObject element |
void |
setValue(java.util.Vector value)
Sets the values for the DataObject element |
java.lang.String |
toString()
This method creates a string version of the recursive DataObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static boolean DEBUG
Constructor Detail |
public DataObject()
public DataObject(java.lang.String name)
name
- Name of the DataObject elementpublic DataObject(java.lang.String name, java.lang.String value)
name
- Name of the DataObject elementvalue
- Value of the DataObject elementpublic DataObject(java.lang.String name, java.util.Vector value)
name
- Name of the DataObject elementvalue
- Vector of values for the DataObject elementpublic DataObject(java.lang.String name, java.util.Hashtable atts, java.util.Vector value)
name
- Name of the DataObject elementatts
- Hashtable of attributes for the DataObject elementvalue
- Vector of values for the DataObject elementMethod Detail |
public java.lang.String getName()
public java.util.Hashtable getAttributes()
public java.util.Vector getValue()
public void setName(java.lang.String name)
name
- Name of the DataObject elementpublic void setAttributes(java.util.Hashtable atts)
atts
- Hashtable of attributes for the DataObject elementpublic void setValue(java.lang.String value)
value
- Value for the DataObject elementpublic void setValue(java.util.Vector value)
value
- Vector of values for the DataObject elementpublic int countChildren()
public java.util.Vector getChild(int i)
public DataObject getChild(java.lang.String name)
public java.util.Vector getChildren()
public DataObject getDataObject(java.lang.String string)
string
- Name of the element to return
public DataObject getNthDataObject(java.lang.String string, int n)
string
- Name of the element to return
public boolean existsElement(java.lang.String name)
name
- Name of an element
public void addElement(java.lang.String name)
name
- Name of an elementpublic void addElement(java.lang.String name, java.util.Hashtable atts)
name
- Name of an elementatts
- Hashtable list of attributespublic void closeElement(java.lang.String name)
name
- Name of the element being closedpublic void addValue(java.lang.String value)
value
- Value being added to the current elementpublic java.lang.Object getDataObjectFirstValue(java.lang.String string)
string
- Name of the element to return
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |