edu.wpi.cs.dsrg.xmldb.xat.common.dompattern
Interface DOMPatternNode

All Known Subinterfaces:
AttributeNode, ColumnNameNode, FunctionNode, RootNode, StepNode, TagNode, TextNode, UnnestNode
All Known Implementing Classes:
DOMPatternNodeImp

public interface DOMPatternNode
extends Visitable

This Class defines the structure of nodes may appear in DOMPattern. Different combinations of the tagName and tagValue has different meanings: tagName tagValue Attr: name of attribute value of attribute. Element: tag name null Text: #text content of the text node. Column: #col ColumnName. !NOTE! In order to support the variable name as the attribute name, value and tag name, the Attr.tagName, Attr.tagValue and Element.tagName Can be of type ColumnName.

Since:
1.0

Method Summary
 void addChild(DOMPatternNode new_child)
          Add one child to this node.
 void addChild(DOMPatternNode new_child, int position)
          Add a child to the node at a certain position
 int deleteChild(DOMPatternNode child)
          Delete a child from this node.
 DOMPatternNode getChild(int position)
          Get a specific child node of this node by their position.
 DOMPatternNode[] getChildren()
          Get all the children nodes of this node.
 DOMPatternNode getParent()
          Get the parent node of this node.
 java.lang.String getTagName()
          Get the tag name of this DOMPatternNode.
 java.lang.Object getTagValue()
          Get the tag value of this DOMPatternNode.
 boolean isCanceledOut()
          Check if the DOMPattern node has been canceled out.
 void setCanceledOut(boolean newCanceledOut)
          Set the canceledOut property.
 void setChild(int position, DOMPatternNode new_child)
          Set a specific child to be a new child node.
 void setParent(DOMPatternNode new_parent)
          Set the parent node of this node.
 void setTagName(java.lang.String name)
          Set the tag name of this DOMPatternNode.
 void setTagValue(NavigationStep[] param)
          Set the tag value of DOMPatternNode.
 void setTagValue(java.lang.String value)
          Construct a NavigationStep using given value string.
 

Method Detail

addChild

public void addChild(DOMPatternNode new_child)
Add one child to this node.
Parameters:
new_child - The new child node adding to.
Returns:
void
Since:
1.0

addChild

public void addChild(DOMPatternNode new_child,
                     int position)
Add a child to the node at a certain position
Parameters:
new_child - The new child node adding to.
position - The position for this new node.
Returns:
void
Since:
1.0

deleteChild

public int deleteChild(DOMPatternNode child)
Delete a child from this node.
Parameters:
child - The to-be-deleted child.
Returns:
int The number of children.
Since:
1.0

getChild

public DOMPatternNode getChild(int position)
Get a specific child node of this node by their position.
Parameters:
position - The position of the child node.
Returns:
DOMPatternNode The child node specified.
Since:
1.0

getChildren

public DOMPatternNode[] getChildren()
Get all the children nodes of this node.
Returns:
DOMPatternNode[] The array containing all children nodes.
Since:
1.0

getParent

public DOMPatternNode getParent()
Get the parent node of this node.
Parameters:
DOMPatternNode - The parent node.
Since:
1.0

getTagName

public java.lang.String getTagName()
Get the tag name of this DOMPatternNode.
Returns:
String The tag name of this DOMPatternNode.
Since:
1.0

getTagValue

public java.lang.Object getTagValue()
Get the tag value of this DOMPatternNode.
Returns:
Object The tag value of this DOMPatternNode.
Since:
1.0

isCanceledOut

public boolean isCanceledOut()
Check if the DOMPattern node has been canceled out.
Returns:
boolean True: if the DOMPattern node has been canceled out. False: otherwise.
Since:
1.0

setCanceledOut

public void setCanceledOut(boolean newCanceledOut)
Set the canceledOut property.
Parameters:
newCanceledOut - The boolean indicate if the DOMPattern Node is canceled or not.
Returns:
void
Since:
1.0

setChild

public void setChild(int position,
                     DOMPatternNode new_child)
Set a specific child to be a new child node.
Parameters:
position - The position of the child node.
new_child - The new child node.
Returns:
void
Since:
1.0

setParent

public void setParent(DOMPatternNode new_parent)
Set the parent node of this node.
Parameters:
new_parent - The new parent of this node.
Returns:
void
Since:
1.0

setTagName

public void setTagName(java.lang.String name)
Set the tag name of this DOMPatternNode.
Parameters:
name - The name for tag.
Returns:
void
Since:
1.0

setTagValue

public void setTagValue(NavigationStep[] param)
Set the tag value of DOMPatternNode.
Parameters:
param - The tag value of this DOMPatternNode.
Returns:
void
Since:
1.0

setTagValue

public void setTagValue(java.lang.String value)
Construct a NavigationStep using given value string. Then set the tag value of DOMPatternNode as new value.
Parameters:
value - The string of new value.
Returns:
void
Since:
1.0