|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectti.chimera.registry.RegistryCore
The implementation of the "core" registry API.
Nested Class Summary | |
static class |
RegistryCore.DirectoryNode
A directory-node. |
Field Summary | |
protected Main |
main
link to main |
protected Node |
root
The root node. |
Constructor Summary | |
protected |
RegistryCore(Main main)
Class Constructor. |
Method Summary | |
static java.lang.String |
basename(java.lang.String path)
Given a normalized path, return basename. |
static java.lang.String |
dirname(java.lang.String path)
Given a normalized path, return dirname. |
boolean |
exists(java.lang.String path)
Determine if the node at the specified path exists. |
void |
link(Node node,
java.lang.String path)
Link in a new node to the specified path . |
Node |
mkdir(java.lang.String path)
Create a directory node, if one does not already exist. |
static java.lang.String |
normalize(java.lang.String path)
Normalize the path. |
Node |
resolve(java.lang.String path)
Find the node at the specified path . |
void |
unlink(java.lang.String path)
Unlink a node. |
void |
unlink(java.lang.String path,
boolean recursive)
Unlink a node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Main main
protected final Node root
Constructor Detail |
protected RegistryCore(Main main)
Method Detail |
public void link(Node node, java.lang.String path) throws RegistryException
node
to the specified path
.
This will make the node a part of the registry, so it will be
accessible by other parts of the system. It is permitted for the
same node to be link()
in to multiple locations in
the tree. The link()
operation will cause the parent
directory to be created, if needed.
node
- the node to link inpath
- the path to link the node in to
RegistryException
- if a node is already linked in at the
specified pathunlink(java.lang.String)
,
mkdir(java.lang.String)
public void unlink(java.lang.String path) throws RegistryException
path
- the path to the node to unlink
RegistryException
- if there is no node linked in at the
specified path, or if this is the last link to a directory
node that still has childrenlink(ti.chimera.registry.Node, java.lang.String)
,
mkdir(java.lang.String)
public void unlink(java.lang.String path, boolean recursive) throws RegistryException
path
- the path to the node to unlinkrecursive
- if true
, and the specified node is a
directory node, then child nodes are recursively unlinked
RegistryException
- if there is no node linked in at the
specified path, or if this is the last link to a directory
node that still has children and recursive
is
false
link(ti.chimera.registry.Node, java.lang.String)
,
mkdir(java.lang.String)
public Node resolve(java.lang.String path) throws RegistryException
path
.
path
- the path to the node to resolve
RegistryException
- if there is no node linked in at the
specified pathpublic boolean exists(java.lang.String path)
path
exists.
path
- the path to the node
true
if node exists, else false
public Node mkdir(java.lang.String path)
path
- the path to the node to unlink
public static java.lang.String normalize(java.lang.String path)
public static java.lang.String dirname(java.lang.String path)
public static java.lang.String basename(java.lang.String path)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |