|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.data.TransientDataAdaptor
A volatile implementation of the DataAdaptor interface.
TransientDataAdaptor is intended as a convenience class
for passing data using the DataAdaptor interface. Note,
however, class supports no persistence. Once an object of class
TransientDataAdaptor is destroyed all internal data is lost.
| Constructor Summary | |
TransientDataAdaptor(java.lang.String strLabel)
Create a new instance of VolatileDataAdaptor |
|
| Method Summary | |
java.lang.String[] |
attributes()
Get all the attribute names in the data node. |
boolean |
booleanValue(java.lang.String strAttrName)
Get the value of an attribute. |
DataAdaptor |
childAdaptor(java.lang.String strLabel)
Convenience method to get a single child adaptor when only one is expected. |
java.util.Iterator |
childAdaptorIterator()
Get an iterator containing all child adaptors of this node. |
java.util.Iterator |
childAdaptorIterator(java.lang.String strLabel)
Get an iterator for all child data nodes having a given data label. |
java.util.List |
childAdaptors()
Get all the child data nodes of this adaptor. |
java.util.List |
childAdaptors(java.lang.String strLabel)
Get all the child data nodes of a particular data label. |
DataAdaptor |
createChild(java.lang.String strLabel)
Create a new empty child adaptor with the specified label. |
double |
doubleValue(java.lang.String strAttrName)
Get the value of an attribute. |
boolean |
hasAttribute(java.lang.String strAttrName)
Test whether or not an attribute is present in the data node. |
int |
intValue(java.lang.String strAttrName)
Get the value of an attribute. |
long |
longValue(java.lang.String strAttrName)
Get the value of an attribute. |
java.lang.String |
name()
Get the label for this data node. |
int |
nodeCount()
Get the number of child data nodes. |
void |
print(java.io.PrintStream os)
|
void |
setValue(java.lang.String strAttrName,
boolean bolAttrVal)
Set the value of the specified attribute |
void |
setValue(java.lang.String strAttrName,
double dblAttrVal)
Set the value of the specified attribute |
void |
setValue(java.lang.String strAttrName,
int intAttrVal)
Set the value of the specified attribute |
void |
setValue(java.lang.String strAttrName,
long longAttrVal)
Set the value of the specified attribute |
void |
setValue(java.lang.String strAttrName,
java.lang.Object objAttrVal)
Set the value of the specified attribute |
void |
setValue(java.lang.String strAttrName,
java.lang.String strAttrVal)
Set the value of the specified attribute as a string. |
java.lang.String |
stringValue(java.lang.String strAttrName)
Get the value of an attribute. |
void |
writeNode(DataListener ifcSrc)
Write out the listener data as a new node then append it as a child node in the data tree. |
void |
writeNodes(java.util.Collection colSrcs)
write the collection of listeners to new nodes and append them to the data tree. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TransientDataAdaptor(java.lang.String strLabel)
strLabel - label for new data node| Method Detail |
public java.lang.String name()
name in interface DataAdaptorpublic java.lang.String[] attributes()
attributes in interface DataAdaptorpublic boolean hasAttribute(java.lang.String strAttrName)
hasAttribute in interface DataAdaptorstrAttrName - attribute name
public java.lang.String stringValue(java.lang.String strAttrName)
stringValue in interface DataAdaptorstrAttrName - name of attribute
public boolean booleanValue(java.lang.String strAttrName)
throws java.lang.NumberFormatException
booleanValue in interface DataAdaptorstrAttrName - name of attribute
java.lang.NumberFormatException - unable to parse value as booleanpublic int intValue(java.lang.String strAttrName)
intValue in interface DataAdaptorstrAttrName - name of attribute
java.lang.NumberFormatException - unable to parse value as intpublic long longValue(java.lang.String strAttrName)
longValue in interface DataAdaptorstrAttrName - name of attribute
java.lang.NumberFormatException - unable to parse value as longpublic double doubleValue(java.lang.String strAttrName)
doubleValue in interface DataAdaptorstrAttrName - name of attribute
java.lang.NumberFormatException - unable to parse value as double
public void setValue(java.lang.String strAttrName,
java.lang.String strAttrVal)
setValue in interface DataAdaptorstrAttrName - attribute namestrAttrVal - attribute value
public void setValue(java.lang.String strAttrName,
java.lang.Object objAttrVal)
setValue in interface DataAdaptorstrAttrName - attribute nameobjAttrVal - new attribute value
public void setValue(java.lang.String strAttrName,
boolean bolAttrVal)
setValue in interface DataAdaptorstrAttrName - attribute namebolAttrVal - new attribute value
public void setValue(java.lang.String strAttrName,
int intAttrVal)
setValue in interface DataAdaptorstrAttrName - attribute nameintAttrVal - new attribute value
public void setValue(java.lang.String strAttrName,
long longAttrVal)
setValue in interface DataAdaptorstrAttrName - attribute namelongAttrVal - new attribute value
public void setValue(java.lang.String strAttrName,
double dblAttrVal)
setValue in interface DataAdaptorstrAttrName - attribute namedblAttrVal - new attribute valuepublic int nodeCount()
nodeCount in interface DataAdaptorpublic DataAdaptor childAdaptor(java.lang.String strLabel)
childAdaptor in interface DataAdaptorstrLabel - data label of child node
public java.util.List childAdaptors()
childAdaptors in interface DataAdaptorpublic java.util.List childAdaptors(java.lang.String strLabel)
childAdaptors in interface DataAdaptorstrLabel - data label for child nodes
public java.util.Iterator childAdaptorIterator()
childAdaptorIterator in interface DataAdaptorpublic java.util.Iterator childAdaptorIterator(java.lang.String strLabel)
childAdaptorIterator in interface DataAdaptorstrLabel - data label for child nodes
public DataAdaptor createChild(java.lang.String strLabel)
createChild in interface DataAdaptorstrLabel - data label for the child node
public void writeNode(DataListener ifcSrc)
writeNode in interface DataAdaptorifcSrc - public void writeNodes(java.util.Collection colSrcs)
writeNodes in interface DataAdaptorpublic void print(java.io.PrintStream os)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||