edu.wpi.cs.dsrg.xmldb.xat.common.dompattern
Class DOMPatternNodeImp

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.common.dompattern.DOMPatternNodeImp
Direct Known Subclasses:
AttributeNodeImp, ColumnNameNodeImp, FunctionNodeImp, RootNodeImp, StepNodeImp, TagNodeImp, TextNodeImp, UnnestNodeImp

public abstract class DOMPatternNodeImp
extends java.lang.Object
implements DOMPatternNode

This Class implement the DOMPatternNode interface.

Since:
1.0
See Also:
Serialized Form

Field Summary
protected  boolean canceledOut
          Indicate if this DOMpatternNode is canceled out or not.
protected  java.util.Vector children
          The children of this DOMPatternNode.
protected  DOMPatternNode parent
          The parent of this DOMPatternNode.
protected  java.lang.String tagName
          The tag name of this DOMPatternNode.
protected  java.lang.Object tagValue
          The tag value of this DOMPatternNode.
 
Constructor Summary
DOMPatternNodeImp()
           
DOMPatternNodeImp(NavigationStep[] value)
           
DOMPatternNodeImp(java.lang.String name)
           
DOMPatternNodeImp(java.lang.String name, NavigationStep[] value)
           
DOMPatternNodeImp(java.lang.String name, java.lang.String value)
           
 
Method Summary
 void addChild(DOMPatternNode new_node)
          Add one child to this node.
 void addChild(DOMPatternNode new_node, int position)
          Add a child to the node at a certain position
 int deleteChild(DOMPatternNode node)
          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_node)
          Set a specific child to be a new child node.
 void setParent(DOMPatternNode parentNode)
          Set the parent node of this node.
 void setTagName(java.lang.String newTagName)
          Set the tag name of this DOMPatternNode.
 void setTagValue(NavigationStep[] newTagValue)
          Set the tag value of DOMPatternNode.
 void setTagValue(java.lang.String newTagValue)
          Construct a NavigationStep using given value string.
 java.lang.String toString()
          Convert the tagValue of the node as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

protected DOMPatternNode parent
The parent of this DOMPatternNode.
Since:
1.0

children

protected java.util.Vector children
The children of this DOMPatternNode.
Since:
1.0

tagValue

protected java.lang.Object tagValue
The tag value of this DOMPatternNode.
Since:
1.0

tagName

protected java.lang.String tagName
The tag name of this DOMPatternNode.
Since:
1.0

canceledOut

protected boolean canceledOut
Indicate if this DOMpatternNode is canceled out or not.
Since:
1.0
Constructor Detail

DOMPatternNodeImp

public DOMPatternNodeImp()

DOMPatternNodeImp

public DOMPatternNodeImp(NavigationStep[] value)

DOMPatternNodeImp

public DOMPatternNodeImp(java.lang.String name)

DOMPatternNodeImp

public DOMPatternNodeImp(java.lang.String name,
                         java.lang.String value)

DOMPatternNodeImp

public DOMPatternNodeImp(java.lang.String name,
                         NavigationStep[] value)
Method Detail

addChild

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

addChild

public void addChild(DOMPatternNode new_node,
                     int position)
Add a child to the node at a certain position
Specified by:
addChild in interface DOMPatternNode
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 node)
Delete a child from this node.
Specified by:
deleteChild in interface DOMPatternNode
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.
Specified by:
getChild in interface DOMPatternNode
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.
Specified by:
getChildren in interface DOMPatternNode
Returns:
DOMPatternNode[] The array containing all children nodes.
Since:
1.0

getParent

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

getTagName

public java.lang.String getTagName()
Get the tag name of this DOMPatternNode.
Specified by:
getTagName in interface 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.
Specified by:
getTagValue in interface 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.
Specified by:
isCanceledOut in interface DOMPatternNode
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.
Specified by:
setCanceledOut in interface DOMPatternNode
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_node)
Set a specific child to be a new child node.
Specified by:
setChild in interface DOMPatternNode
Parameters:
position - The position of the child node.
new_child - The new child node.
Returns:
void
Since:
1.0

setParent

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

setTagName

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

setTagValue

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

setTagValue

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

toString

public java.lang.String toString()
Convert the tagValue of the node as a String.
Overrides:
toString in class java.lang.Object
Returns:
String The result string.
Since:
1.0