| java.lang.Object jsx3.xml.Node
All known Subclasses: jsx3.xml.CdfDocument, jsx3.xml.Record,
Node | abstract public class Node implements Iterable<Record>(Code) | | A Node is a container of Records.
In use, Node has a parent Node and is part of a CdfDocument.
author: Joe Walker [joe at getahead dot ltd dot uk] |
parentNode | protected Node parentNode(Code) | | Our parent record
|
Node | protected Node(String id)(Code) | | You should not be directly creating Nodes
|
Node | protected Node()(Code) | | You should not be directly creating Nodes
|
appendRecord | public void appendRecord(Record newRecord)(Code) | | Adds the Record newRecord to the end of the list of children
of this Record. If the newRecord is already in the tree, it
is first removed.
Parameters: newRecord - The Record to add. |
clear | public void clear()(Code) | | Remove all the nodes from this node
|
getParentNode | public Node getParentNode()(Code) | | The parent of this node. The
If a node has just been created and not yet added to the
tree, or if it has been removed from the tree, this is
null .
|
hashCode | public int hashCode()(Code) | | |
indent | final protected static String indent(int depth)(Code) | | Local utility to create an indentation string
Parameters: depth - the number of indents that have been done A string of depth depth * 2 |
insertRecord | public void insertRecord(int position, Record newRecord)(Code) | | Inserts the node newChild at the given position
Parameters: position - The position at which to insert the new Record Parameters: newRecord - The node to insert. |
iterator | public Iterator<Record> iterator()(Code) | | A NodeList that contains all children of this node. If
there are no children, this is a NodeList containing no
nodes.
|
joinDocument | protected void joinDocument(Node parent)(Code) | | Internal setter for the parent node.
Parameters: parent - The new parent Node |
leaveDocument | protected void leaveDocument()(Code) | | Internal way to disconnect a Node from a Document
|
removeRecord | public void removeRecord(Record oldRecord)(Code) | | Removes the child Record indicated by oldRecord from the list
of children, and returns it.
Parameters: oldRecord - The Record being removed. |
replaceRecord | public void replaceRecord(Record newRecord, Record oldRecord)(Code) | | Replaces the child Record oldRecord with newRecord
in the list of children, and returns the oldRecord Record.
If the newRecord is already in the tree, it is first removed.
Parameters: newRecord - The new Record to put in the child list. Parameters: oldRecord - The Record being replaced in the list. |
setId | public void setId(String id)(Code) | | Parameters: id - the id to set |
|
|