|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class defines an order un-sensitive XML algebra tree.
Method Summary | |
void |
addNode(XATNode child,
XATNode newparent)
Add a new parent node for a given DOMPatternNode node. |
void |
addXATTree(XATTree childTree)
For all the leaves, add the subtree to it. |
void |
appendXATNode(XATNode leave)
Append a XAT Node to the leaves of the XATTree. |
java.lang.Object |
clone()
Clone the XATTree. |
XATNode[] |
convertToArray()
Get all the leaves of this XATTree. |
void |
deleteNode(XATNode Node)
Delete node. |
java.util.Vector |
getAllLeafNodes(XATNode root)
Get all the leaf node of given XATTree, which is rooted at given root node. |
BindingTable |
getBindingTable()
Get the binding table of this Tree. |
XATNode[] |
getLeaves()
Get all the leaves of this XATTree. |
XATLeaf[] |
getLeavesWithDepth()
Get all the leaves of this XATTree along with their depth. |
XATNode |
getRoot()
Get the root node of this XATTree. |
java.util.Iterator |
getRoots()
Assuming the XATTree is a forest sometime, this method get all the roots of XAT. |
void |
insertRoot(XATNode root)
Insert a new node as the root of this tree. |
void |
moveNode(XATNode child,
XATNode new_parent)
Move node. |
void |
moveNode(XATNode child,
XATNode new_parent,
int position)
Move node. |
void |
replaceNode(XATNode oldNode,
XATNode newNode)
Replace oldNode in Tree with newNode. |
void |
setBindingTable(BindingTable bind)
Set the binding table of this Tree. |
XATNode |
setRoot(XATNode new_root)
Set root node. |
int |
size()
Give number of nodes in this tree. |
boolean |
validate()
This going to validate the parent-child relationship. |
Methods inherited from interface edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObject |
getStatistics,
isValidStatistic |
Methods inherited from interface edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATProperties |
getProperties,
getProperty,
isValidPropertyName,
setProperty |
Method Detail |
public void addNode(XATNode child, XATNode newparent)
parent
- The parent node it attached to.child
- The child node attached.public void addXATTree(XATTree childTree)
childTree
- The XATTree attached.public void appendXATNode(XATNode leave)
XATNode
- The XATNode append as leaf of XATTree.public java.lang.Object clone()
public XATNode[] convertToArray()
public void deleteNode(XATNode Node) throws XATTreeNodeHasNoParentException
node
- the to-be-deleted child node.public java.util.Vector getAllLeafNodes(XATNode root)
This method is used to find all of the Source operators in an XATTree Looks at all of the root's children and adds them to the vector if that nodes' operator is an XML source . The function is then recurvsively called on each of root's children until there are no more nodes to look at.
root
- The root of a tree to iterate overpublic BindingTable getBindingTable()
public XATNode[] getLeaves()
public XATLeaf[] getLeavesWithDepth()
public XATNode getRoot()
public java.util.Iterator getRoots()
public void insertRoot(XATNode root)
root
- The root will be inserted in.public void moveNode(XATNode child, XATNode new_parent)
The child node will always move to the end of the children of the parent node.
child
- The to-be-moved child node.new_parent
- The new parent node.public void moveNode(XATNode child, XATNode new_parent, int position)
The child node will move to the specific position in the parent node.
child
- The to-be-moved child node.new_parent
- The new parent node.position
- The new position in the parent node.public void replaceNode(XATNode oldNode, XATNode newNode)
oldNode
- The old XATNode will be replaced.newNode
- The new XATNode used to replace the old one.public void setBindingTable(BindingTable bind)
bind
- The new binding table for this tree.public XATNode setRoot(XATNode new_root)
new_root
- The new root node.public int size()
public boolean validate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |