| java.lang.Object ti.chimera.registry.RegistryCore
All known Subclasses: ti.chimera.Registry,
RegistryCore | abstract public class RegistryCore (Code) | | The implementation of the "core" registry API.
author: ;Rob Clark;a0873619;San Diego;; version: 0.1 |
Inner Class :public static class DirectoryNode extends Node | |
Method Summary | |
public static String | basename(String path) Given a normalized path, return basename. | public static String | dirname(String path) Given a normalized path, return dirname. | public boolean | exists(String path) Determine if the node at the specified path exists. | public void | link(Node node, String path) Link in a new 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. | public Node | mkdir(String path) Create a directory node, if one does not already exist. | public static String | normalize(String path) Normalize the path. | public Node | resolve(String path) Find the node at the specified path . | public void | unlink(String path) Unlink a node. | public void | unlink(String path, boolean recursive) Unlink a node. |
root | final protected Node root(Code) | | The root node.
|
RegistryCore | protected RegistryCore(Main main)(Code) | | Class Constructor.
|
basename | public static String basename(String path)(Code) | | Given a normalized path, return basename. Ie. the last component of the
path.
|
dirname | public static String dirname(String path)(Code) | | Given a normalized path, return dirname. Ie. everything but the last
component in the path.
|
exists | public boolean exists(String path)(Code) | | Determine if the node at the specified path exists.
Parameters: path - the path to the node true if node exists, else false |
link | public void link(Node node, String path) throws RegistryException(Code) | | Link in a new 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.
Parameters: node - the node to link in Parameters: path - the path to link the node in to throws: RegistryException - if a node is already linked in at thespecified path See Also: RegistryCore.unlink See Also: RegistryCore.mkdir |
mkdir | public Node mkdir(String path)(Code) | | Create a directory node, if one does not already exist. Recursively
creates parent directories if needed.
Parameters: path - the path to the node to unlink the created node |
normalize | public static String normalize(String path)(Code) | | Normalize the path. This involves ensuring the path is
fully qualified (begins with "/"), and gets rid of any
extra "." and "/".
|
unlink | public void unlink(String path) throws RegistryException(Code) | | Unlink a node. This will remove a link to the node from the tree,
and if there are no more references to the node could result in the
node being garbage collected.
Parameters: path - the path to the node to unlink throws: RegistryException - if there is no node linked in at thespecified path, or if this is the last link to a directorynode that still has children See Also: RegistryCore.link See Also: RegistryCore.mkdir |
unlink | public void unlink(String path, boolean recursive) throws RegistryException(Code) | | Unlink a node. This will remove a link to the node from the tree,
and if there are no more references to the node could result in the
node being garbage collected.
Parameters: path - the path to the node to unlink Parameters: recursive - if true , and the specified node is adirectory node, then child nodes are recursively unlinked throws: RegistryException - if there is no node linked in at thespecified path, or if this is the last link to a directorynode that still has children and recursive isfalse See Also: RegistryCore.link See Also: RegistryCore.mkdir |
|
|