com.ricebridge.xmlman.in
Class OutNode

java.lang.Object
  extended bycom.ricebridge.xmlman.in.OutNode

public class OutNode
extends Object

Node representing an XML element in the document output tree.


Constructor Summary
OutNode()
          Creates root node.
OutNode(String pName, int pPosition)
          Create a node.
 
Method Summary
 void addChange(OutData pOutData, OutState pOutState)
          Add a data field that this node is dependent on.
 void addChanges(List pOutDataList, OutState pOutState)
          Add a list of data fields that this node is dependent on.
 void addChild(OutNode pChild)
          Add a child node to this node, and order children of the same name according to their positions.
 void addOutData(OutData pOutData)
          Add a data field value to this node.
 String debugString()
          Debugging description of this node and its children.
 String debugString(String pIndent)
          Debugging description of this node and its children, with specified indent.
 List getChildren()
          Return a list of the children of this node.
 String getName()
          Get the element name that this node represents.
 List getOutDataList()
          Get the data field values associated with this node.
 OutNode getParent()
          Get the parent node of this node.
 int getPosition()
          Get the preferred position of this node in a list of nodes with the same name.
 void handleChanges(OutState pOutState)
          Review previous values of data fields and see of they have changed.
 boolean hasAnyChange(OutState pOutState)
          Indicate that data fields on which this node depends have changed.
 boolean hasChildren()
          Indicate that this node has children.
 boolean hasSelfChange(OutState pOutState)
          Indicate that data fields associated with this node have changed.
 boolean isRecord()
          Indicate that this node represents the data record element.
 boolean isRoot()
          Indicate that this node is the root node.
 OutNode nextChild(OutState pOutState)
          Get the next child - loops continuously, but returns null at each restart.
 void resetChildren(OutState pOutState)
          Reset the current child index to the first child.
 void setIsRecord(boolean pIsRecord)
          Set this node to be be the node representing the record node.
 String toString()
          Debugging description of this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OutNode

public OutNode()
Creates root node.


OutNode

public OutNode(String pName,
               int pPosition)
Create a node.

Nodes can have the same name, but different positions. In this case, they create additional elements. The position is matched as closely as possible.

Method Detail

addChild

public void addChild(OutNode pChild)
Add a child node to this node, and order children of the same name according to their positions.


hasChildren

public boolean hasChildren()
Indicate that this node has children.


getChildren

public List getChildren()
Return a list of the children of this node.


resetChildren

public void resetChildren(OutState pOutState)
Reset the current child index to the first child.


nextChild

public OutNode nextChild(OutState pOutState)
Get the next child - loops continuously, but returns null at each restart.


getParent

public OutNode getParent()
Get the parent node of this node.


isRoot

public boolean isRoot()
Indicate that this node is the root node.


getName

public String getName()
Get the element name that this node represents.


isRecord

public boolean isRecord()
Indicate that this node represents the data record element.


getPosition

public int getPosition()
Get the preferred position of this node in a list of nodes with the same name.


getOutDataList

public List getOutDataList()
Get the data field values associated with this node.


addOutData

public void addOutData(OutData pOutData)
Add a data field value to this node.


setIsRecord

public void setIsRecord(boolean pIsRecord)
Set this node to be be the node representing the record node.


addChanges

public void addChanges(List pOutDataList,
                       OutState pOutState)
Add a list of data fields that this node is dependent on.


addChange

public void addChange(OutData pOutData,
                      OutState pOutState)
Add a data field that this node is dependent on.


handleChanges

public void handleChanges(OutState pOutState)
Review previous values of data fields and see of they have changed.


hasAnyChange

public boolean hasAnyChange(OutState pOutState)
Indicate that data fields on which this node depends have changed.


hasSelfChange

public boolean hasSelfChange(OutState pOutState)
Indicate that data fields associated with this node have changed.


toString

public String toString()
Debugging description of this node.


debugString

public String debugString()
Debugging description of this node and its children.


debugString

public String debugString(String pIndent)
Debugging description of this node and its children, with specified indent.



Copyright © 2004-2005 Ricebridge