|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectist.palcom.hmap.HmapNode
public abstract class HmapNode
HmapNode is the abstract superclass for all hmap directories and leaves
| Nested Class Summary | |
|---|---|
class |
HmapNode.NameHandler
The handler class for HmapNode names. |
| Field Summary | |
|---|---|
static int |
HET_DIR
|
static int |
HET_LEAF
|
static int |
HET_UNKNOWN
|
static String |
HMAPNODE_COMMAND_GETNAME
|
static String |
HMAPNODE_COMMAND_SETNAME
|
NameInvokator |
nameInvokator
|
NodeInvokator |
nodeInvokator
|
protected HmapDir |
parent
parent of the node |
protected HmapPath |
path
Path of the node. |
ValueInvokator |
valueInvokator
|
| Constructor Summary | |
|---|---|
protected |
HmapNode(int treeNodeType,
String name,
String typeName,
String typeVersion,
String typeFullyQualifiedName)
|
| Method Summary | |
|---|---|
void |
addHandler(Handler handler)
Add a handler to this node |
void |
addInvokator(Invokator invocator)
Add an invocator to this node |
void |
addListener(Listener listener)
Add a listener to this node |
HmapDir |
asDir()
|
HmapLeaf |
asLeaf()
|
void |
callback(Listener listener,
HmapPath path,
String command,
HmapNode parameters)
Invokes a handler somewhere in the hmap --:: CAN ONLY BE CALLED FROM LISTENERS ASSOCIATED WITH THIS NODE!!! |
String |
getFullyQualifiedType()
|
int |
getHmapEntryType()
|
HmapKey |
getKey()
|
String |
getName()
|
HmapDir |
getParent()
|
HmapPath |
getPath()
|
String |
getType()
|
String |
getTypeVersion()
|
protected void |
handle(HmapEvent event)
The actual handler invocation |
Iterator |
handlerIterator()
|
boolean |
hasHandlers()
|
boolean |
hasInvokators()
|
boolean |
hasListeners()
|
boolean |
hasName()
|
boolean |
hasType()
|
void |
invokation(Invokator invocator,
HmapPath path,
String command,
HmapNode parameters)
Invokes a handler somewhere in the hmap --:: CAN ONLY BE CALLED FROM INVOCATORS ASSOCIATED WITH THIS NODE!!! |
Iterator |
invokatorIterator()
|
protected abstract void |
invokeHandlers(HmapEvent event)
Resovles and invokes handlers specified in the event |
protected void |
invokeListeners(HmapEvent event)
Triggers all listeners listening on this node with an event. |
protected abstract boolean |
isAncestorOf(HmapNode node)
Returns true if this node is a direct ancestor of |
boolean |
isDir()
|
boolean |
isLeaf()
|
Iterator |
listenerIterator()
|
String |
printHandlers(int indent)
|
String |
printInvokators(int indent)
|
String |
printListeners(int indent)
|
protected void |
recalculatePath()
Sets up a new path with this node as root |
protected abstract void |
recalculatePath(HmapPath parentPath)
Recalculates the path on the basis of the path of ones ancestors |
void |
removeHandler(Handler handler)
Remove a handler from this node |
void |
removeInvocator(Invokator invocator)
Remove an invocator from this node |
void |
removeListener(Listener listener)
Remove a listener from this node |
HmapNode |
resolve(HmapPath path)
|
abstract HmapNode |
resolve(HmapPath path,
int type)
Resolves a node in the current h-map |
HmapNode |
resolve(String path)
|
HmapDir |
resolveDir(HmapPath path)
|
HmapDir |
resolveDir(String path)
|
HmapDir |
resolveDirLocally(HmapKey key)
|
HmapDir |
resolveDirLocally(String name)
|
HmapLeaf |
resolveLeaf(HmapPath path)
|
HmapLeaf |
resolveLeaf(String path)
|
HmapLeaf |
resolveLeafLocally(HmapKey key)
|
HmapLeaf |
resolveLeafLocally(String name)
|
HmapNode |
resolveLocally(HmapKey key)
|
abstract HmapNode |
resolveLocally(HmapKey key,
int type)
Resolves a child of the current node |
HmapNode |
resolveLocally(String name)
|
void |
setName(HmapEvent event)
|
void |
setName(String name)
Sets the name of the node |
void |
setParent(HmapDir parent)
Sets the parent of this node |
abstract String |
toString(int indent)
|
abstract String |
toStringAll(int indent)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, println, toString |
| Field Detail |
|---|
public static final String HMAPNODE_COMMAND_GETNAME
public static final String HMAPNODE_COMMAND_SETNAME
protected HmapPath path
protected HmapDir parent
public static final int HET_UNKNOWN
public static final int HET_DIR
public static final int HET_LEAF
public NameInvokator nameInvokator
public ValueInvokator valueInvokator
public NodeInvokator nodeInvokator
| Constructor Detail |
|---|
protected HmapNode(int treeNodeType,
String name,
String typeName,
String typeVersion,
String typeFullyQualifiedName)
treeNodeType - the type of the treenodename - the name of the treenode| Method Detail |
|---|
public String getType()
public String getFullyQualifiedType()
public String getTypeVersion()
public HmapNode resolve(HmapPath path)
path - the path to resolve
public boolean isDir()
public boolean isLeaf()
public boolean hasName()
public boolean hasType()
public HmapDir asDir()
public HmapLeaf asLeaf()
public HmapPath getPath()
public void setName(String name)
name - new namepublic void setName(HmapEvent event)
public String getName()
public HmapKey getKey()
public void setParent(HmapDir parent)
parent - new parentpublic HmapDir getParent()
protected void recalculatePath()
public void invokation(Invokator invocator,
HmapPath path,
String command,
HmapNode parameters)
invocator - The invocator callerpath - The path on which to invoka the handlercommand - The command to invoke the handler withparameters - The parameters with which the handler is invoked
public void callback(Listener listener,
HmapPath path,
String command,
HmapNode parameters)
listener - The listener callerpath - The path on which to invoka the handlercommand - The command to invoke the handler withparameters - The parameters with which the handler is invokedprotected void handle(HmapEvent event)
event - The event to invoke the handlers withpublic HmapDir resolveDir(String path)
path - the path to resolve
public HmapDir resolveDir(HmapPath path)
path - the path to resolve
public HmapDir resolveDirLocally(HmapKey key)
key - the key of the dir to resolve
public HmapDir resolveDirLocally(String name)
name - the name of the dir to resolve
public HmapLeaf resolveLeaf(String path)
path - the leaf to resolve
public HmapLeaf resolveLeaf(HmapPath path)
path - the leaf to resolve
public HmapLeaf resolveLeafLocally(HmapKey key)
key - the key of the leaf to resolve
public HmapLeaf resolveLeafLocally(String name)
name - the name of the leaf to resolve
public HmapNode resolve(String path)
path - the path to resolve
public HmapNode resolveLocally(HmapKey key)
key - The key of the node to resolve
public HmapNode resolveLocally(String name)
name - The name of the node to resolve
public void addHandler(Handler handler)
handler - The handler to be addedpublic void addInvokator(Invokator invocator)
invocator - The invocator to be addedpublic void addListener(Listener listener)
listener - The listener to be addedpublic void removeHandler(Handler handler)
handler - The handler to removepublic void removeInvocator(Invokator invocator)
invocator - The invocator to removepublic void removeListener(Listener listener)
listener - The listener to removepublic Iterator handlerIterator()
public Iterator invokatorIterator()
public Iterator listenerIterator()
public boolean hasHandlers()
public boolean hasInvokators()
public boolean hasListeners()
public int getHmapEntryType()
protected void invokeListeners(HmapEvent event)
event - public String printHandlers(int indent)
indent - prepend a number of whitespaces to the retured string
public String printInvokators(int indent)
indent - prepend a number of whitespaces to the retured string
public String printListeners(int indent)
indent - prepend a number of whitespaces to the retured string
public abstract String toString(int indent)
indent - prepend a number of whitespaces to the retured string
public abstract String toStringAll(int indent)
indent - prepend a number of whitespaces to the retured string
protected abstract void invokeHandlers(HmapEvent event)
event - The event to invoke handlers withprotected abstract boolean isAncestorOf(HmapNode node)
node - The potential (grand)child node
public abstract HmapNode resolve(HmapPath path,
int type)
path - the path of the node to resolvetype - the type of the given node. Can be leaf, dir and unknown
public abstract HmapNode resolveLocally(HmapKey key,
int type)
key - The key of the childtype - The type of the given node. Can be leaf, dir and unknown
protected abstract void recalculatePath(HmapPath parentPath)
parentPath - The path of ones parent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||