ist.palcom.hgraph
Class HgraphManager

java.lang.Object
  extended by ist.palcom.hgraph.HgraphManager
All Implemented Interfaces:
IHgraphNode

public class HgraphManager
extends java.lang.Object
implements IHgraphNode


Field Summary
protected  HgraphNode _node
          hgraph impl
 
Fields inherited from interface ist.palcom.hgraph.IHgraphNode
CHILD_NAME_CLASH, CIRCULARITY_CLASH, COMMAND_OR_NODE_MISSING, ERROR, HANDLER_MISSING, LISTENER_MISSING, NODE_NOT_CHILD, PATH_MISSING, SIBLING_ALREADY_EXISTS, SIBLING_NONEXISTENT, SIBLING_REFERENCE_ALREADY_EXISTS, SIBLING_REFERENCE_NONEXISTENT, STATUS_OK, VALUE_ALREADY_EXISTS, VALUE_NOT_PRESENT
 
Constructor Summary
HgraphManager(PalcomScheduler scheduler)
           
 
Method Summary
 int addNodeChild(IHgraphNode node)
           
 boolean cd(java.lang.String path)
          Checks whether a given path exists
 java.lang.String dir(java.lang.String path)
          Returns the info for some given dir
 java.lang.String dirFull(java.lang.String path)
          Returns the full info for some given dir
 java.lang.String dirRecursively(java.lang.String path)
          Returns the recursive account of some given dir and its subdirs
 java.util.Iterator getChildIterator()
           
 FuncFunc getFuncFunc()
           
 java.lang.String getNodeName()
          hgraph impl below
 IHgraphNode getNodeParent()
           
 Path getPath()
           
 SiblingFunc getSiblingFunc()
           
 ValueFunc getValueFunc()
           
 boolean hasChildNamed(java.lang.String name)
           
 boolean isAncestorOf(IHgraphNode node)
           
 int newNode(java.lang.String path, java.lang.String name)
          Creates a new node
 void queryEvent(HgraphEvent event)
          Callback function for use by HgraphManager QueryHandler.
 int removeNode(java.lang.String path, java.lang.String name)
          Removes a given node
 int removeNodeChild(java.lang.String name)
           
 void returnEvent(HgraphEvent event)
          Callback function for use by HgraphManager ReturnHandler Used for either returning reposts to the original recipient through hgraphs or for returning regular blocking calls
 int setNodeName(java.lang.String name)
           
 int setNodeName(java.lang.String path, java.lang.String oldName, java.lang.String newName)
          Sets the name of a node
 int setNodeParent(IHgraphNode newParent)
           
 java.lang.String toString()
           
 java.lang.String toStringFull()
           
 java.lang.String toStringFullRecursively(int indent)
           
 java.lang.String toStringRecursively(int indent)
           
 java.lang.String toStringSimple()
           
 void updatePath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_node

protected HgraphNode _node
hgraph impl

Constructor Detail

HgraphManager

public HgraphManager(PalcomScheduler scheduler)
Method Detail

cd

public boolean cd(java.lang.String path)
Checks whether a given path exists

Parameters:
path - the path
Returns:
true if it does, false if not.

dir

public java.lang.String dir(java.lang.String path)
Returns the info for some given dir

Parameters:
path - the path of the node to dir
Returns:
A string giving the dir

dirRecursively

public java.lang.String dirRecursively(java.lang.String path)
Returns the recursive account of some given dir and its subdirs

Parameters:
path - the path of the node to dir
Returns:
A string giving the recuesive account

dirFull

public java.lang.String dirFull(java.lang.String path)
Returns the full info for some given dir

Parameters:
path - the path of the node to dir
Returns:
A string giving the full dir

newNode

public int newNode(java.lang.String path,
                   java.lang.String name)
Creates a new node

Parameters:
path - the path on which to install the node
name - the name of the new node
Returns:
status indicating the status of the command

removeNode

public int removeNode(java.lang.String path,
                      java.lang.String name)
Removes a given node

Parameters:
path - parent the path of the node
name - the name of the node to be removed
Returns:
status indicating the status of the command

setNodeName

public int setNodeName(java.lang.String path,
                       java.lang.String oldName,
                       java.lang.String newName)
Sets the name of a node

Parameters:
path - The path of the node whose name is to be set
name - the new name
Returns:
status indicating the status of the command

returnEvent

public void returnEvent(HgraphEvent event)
Callback function for use by HgraphManager ReturnHandler Used for either returning reposts to the original recipient through hgraphs or for returning regular blocking calls

Parameters:
event - The event holding the return information

queryEvent

public void queryEvent(HgraphEvent event)
Callback function for use by HgraphManager QueryHandler. Used for reposting hgraph queries onto the overall hgraph

Parameters:
event - The caught event holding reposting information

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getNodeName

public java.lang.String getNodeName()
hgraph impl below

Specified by:
getNodeName in interface IHgraphNode

setNodeName

public int setNodeName(java.lang.String name)
Specified by:
setNodeName in interface IHgraphNode

getPath

public Path getPath()
Specified by:
getPath in interface IHgraphNode

updatePath

public void updatePath()
Specified by:
updatePath in interface IHgraphNode

hasChildNamed

public boolean hasChildNamed(java.lang.String name)
Specified by:
hasChildNamed in interface IHgraphNode

isAncestorOf

public boolean isAncestorOf(IHgraphNode node)
Specified by:
isAncestorOf in interface IHgraphNode

removeNodeChild

public int removeNodeChild(java.lang.String name)
Specified by:
removeNodeChild in interface IHgraphNode

toStringSimple

public java.lang.String toStringSimple()
Specified by:
toStringSimple in interface IHgraphNode

toStringFull

public java.lang.String toStringFull()
Specified by:
toStringFull in interface IHgraphNode

toStringRecursively

public java.lang.String toStringRecursively(int indent)
Specified by:
toStringRecursively in interface IHgraphNode

toStringFullRecursively

public java.lang.String toStringFullRecursively(int indent)
Specified by:
toStringFullRecursively in interface IHgraphNode

setNodeParent

public int setNodeParent(IHgraphNode newParent)
Specified by:
setNodeParent in interface IHgraphNode

addNodeChild

public int addNodeChild(IHgraphNode node)
Specified by:
addNodeChild in interface IHgraphNode

getSiblingFunc

public SiblingFunc getSiblingFunc()
Specified by:
getSiblingFunc in interface IHgraphNode

getValueFunc

public ValueFunc getValueFunc()
Specified by:
getValueFunc in interface IHgraphNode

getFuncFunc

public FuncFunc getFuncFunc()
Specified by:
getFuncFunc in interface IHgraphNode

getNodeParent

public IHgraphNode getNodeParent()
Specified by:
getNodeParent in interface IHgraphNode

getChildIterator

public java.util.Iterator getChildIterator()
Specified by:
getChildIterator in interface IHgraphNode