|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.archie.AbstractNode
public abstract class AbstractNode
Abstract implementation of the Node interface.
| Field Summary | |
|---|---|
protected java.util.Map |
_children
|
protected NodeFactory |
_fac
|
| Constructor Summary | |
|---|---|
protected |
AbstractNode(java.util.Map children,
NodeFactory fac)
|
protected |
AbstractNode(NameParser parser,
java.util.Map children,
NodeFactory fac)
|
| Method Summary | |
|---|---|
Node |
createChild(NamePart name)
Creates the node corresponding to the given name and returns it. |
Name |
getAbsolutePath()
Returns the full path to this node, starting from the root. |
Node |
getChild(NamePart name)
Returns the node with the given name. |
java.util.Iterator |
getChildren()
Returns this instance's child nodes. |
int |
getChildrenCount()
Returns the number of children that this instance contains. |
java.util.Iterator |
getChildrenNames()
Returns the names of this instance's nodes. |
NamePart |
getName()
Return this instance's name. |
NameParser |
getNameParser()
Returns this implementation's name parser. |
Node |
getParent()
Returns this instance's parent. |
Node |
removeChild(NamePart name)
Removes the node with the given name. |
void |
setUp(Node parent,
NamePart name)
Sets this node's name and parent node. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.sapia.archie.Node |
|---|
getEntries, getValue, getValueCount, getValueNames, putValue, removeValue |
| Field Detail |
|---|
protected java.util.Map _children
protected NodeFactory _fac
| Constructor Detail |
|---|
protected AbstractNode(NameParser parser,
java.util.Map children,
NodeFactory fac)
throws ProcessingException
ProcessingException
protected AbstractNode(java.util.Map children,
NodeFactory fac)
throws ProcessingException
ProcessingException| Method Detail |
|---|
public Node createChild(NamePart name)
throws DuplicateException,
ProcessingException
Node
createChild in interface Nodename - a NamePart
Node.
DuplicateException - if a node exists for the given name.
ProcessingExceptionNode.createChild(NamePart)public Node getChild(NamePart name)
Node
getChild in interface Nodename - a NamePart corresponding to the name of an
existing child node.
Node or null if not child exists
for the given name.Node.getChild(NamePart)public Node removeChild(NamePart name)
Node
removeChild in interface Nodename - a NamePart corresponding to the name of an
existing child node.
Node or null if not child exists
for the given name.Node.removeChild(org.sapia.archie.NamePart)public java.util.Iterator getChildren()
Node
getChildren in interface NodeIterator of Nodes.Node.getChildren()public NamePart getName()
Node
getName in interface NodeNamePart.Node.getName()public Name getAbsolutePath()
Node
getAbsolutePath in interface NodeName.Node.getAbsolutePath()public int getChildrenCount()
Node
getChildrenCount in interface NodeNode.getChildrenCount()public java.util.Iterator getChildrenNames()
Node
getChildrenNames in interface NodeIterator of NameParts.Node.getChildrenNames()public Node getParent()
Node
getParent in interface NodeNode.Node.getParent()public NameParser getNameParser()
Node
getNameParser in interface NodeNameParser.Node.getNameParser()
public void setUp(Node parent,
NamePart name)
Node
setUp in interface Nodeparent - this instance's parent Nodename - a NamePart.Node.setUp(Node, NamePart)public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||