|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ibm.tspaces.xtuples.TupleTree
TupleTree is the class that represents the entirety of the XML document that has been converted to the TupleTree. Every single tuple in the tuple tree has a pointer reference to this object, which represents the entire tree structure. Every Tuple includes as one of its fields a XTuple object which embeds the XML related data and the child and parent Tuple references.
This class is used to create and initialize the Tuple Tree.
***MISSING FUNCTIONALITY***
Here's a Key Divergence from the XQL support that's possibly planned
for the future. I'm making a decision to not support mixed content
(i.e. a single element which has both simple text children and element
children mixed together. That's usually used for presentation, a la
conversion from HTML to XML or vice versa.) To make version 1 easier,
I will assume that DOM nodes/tags which contain text contain no children,
and that all the text is together in one string. This string gets put
into a known field of the Tuple, and will be very useful in supporting
XQL path expression queries, by using TSpaces to find those tuples
easily using structural/template matches.
***KEY ASSUMPTION***
We assume that by the time this code is run from the TSDB.java code,
the clientID is established, as is the current transaction.
XTuple,
Field,
XMLField,
TSDB,
XTupleException, Serialized Form| Constructor Summary | |
TupleTree(java.lang.String xmlString,
com.ibm.tspaces.server.TSDB dbPtr,
java.lang.String cID,
long timestamp,
long expire,
TupleID origTID)
TupleTree (String, TSDB, String, long, long, TupleID) ** Constructor |
|
| Method Summary | |
static java.util.Vector |
getChildren(org.w3c.dom.Element e)
Methods that takes an XML4J/DOM element and returns its children, ignoring whitespaces between tags |
java.lang.String |
getDTDName()
This method returns as a string the DTD name that was referenced in the XML document version of the Tuple Tree. |
XMLTuple |
getRoot()
This is the standard mechanism by which a client with a reference on a Tuple Tree manages to start traversing the tree. |
static int |
numChildren(org.w3c.dom.Element e)
Method to take an XML4J DOM element and count its number of children Whitespaces here are not ignored. |
void |
setRoot(XMLTuple newRoot)
Method for authorized users to "set" the root tuple of the Tuple Tree I'm still a little unclear on what the qualifier should be, maybe protected? |
java.lang.String |
toString()
Prints out the value of the tuple and then dumps the contents of the XTuple object |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public TupleTree(java.lang.String xmlString,
com.ibm.tspaces.server.TSDB dbPtr,
java.lang.String cID,
long timestamp,
long expire,
TupleID origTID)
throws TupleSpaceServerException
xmlString - Self explanatorydbPtr - The pointer to the current TSDBcID - The current ClientIDtimestamp - The timestamp for the entire tupletreeexpire - The expiration time for the whole tupletreeorigTID - The tupleID ref to the original XMLField tuple| Method Detail |
public XMLTuple getRoot()
public void setRoot(XMLTuple newRoot)
throws XTupleException
public java.lang.String getDTDName()
public static int numChildren(org.w3c.dom.Element e)
e - The DOM element in questionpublic static java.util.Vector getChildren(org.w3c.dom.Element e)
e - The DOM element that we find nonwhitespace children forpublic java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||