Syntax of valid DMT URIs:
'/' \u002F) is the separator of the node names.
Slashes used in node name must therefore be escaped using a backslash slash (
"\/"). The backslash must be escaped with a double backslash
sequence. A backslash found must be ignored when it is not followed by a
slash or backslash.[-a-zA-Z0-9_.!~*'()] are most efficient.'/'
\u002F). This implies that the root node must be denoted as "."
and not "./"."../" to traverse the tree upwards."./" must not be used
anywhere else but in the beginning of a URI.| Modifier and Type | Field and Description |
|---|---|
| private static final char[] | |
| public static final String | PATH_SEPARATOR
This constant stands for a string identifying the path separator in the DmTree ("/"). |
| public static final char | PATH_SEPARATOR_CHAR
This constant stands for a char identifying the path separator in the DmTree ('/'). |
| public static final String | ROOT_NODE
This constant stands for a string identifying the root of the DmTree ("."). |
| public static final char | ROOT_NODE_CHAR
This constant stands for a char identifying the root of the DmTree ('.'). |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static String | |
| public static String | |
| private static String | |
| private static int | Returns: URI segment lengththe URI segment segment)This method returns the length of a URI segment. |
| public static boolean | Returns: whether the specified URI is absolutethe URI to be checked, must not be uri)null and must
contain a valid URIChecks whether the specified URI is an absolute URI. |
| public static boolean | Returns: whether the specified URI is validthe URI to be validated uri)Checks whether the specified URI is valid. |
| public static String | |
| pack-priv static String | |
| public static String[] | |
| public static String |
| BASE_64_TABLE | back to summary |
|---|---|
| private static final char[] BASE_64_TABLE | |
| PATH_SEPARATOR | back to summary |
|---|---|
| public static final String PATH_SEPARATOR This constant stands for a string identifying the path separator in the DmTree ("/").
| |
| PATH_SEPARATOR_CHAR | back to summary |
|---|---|
| public static final char PATH_SEPARATOR_CHAR This constant stands for a char identifying the path separator in the DmTree ('/').
| |
| ROOT_NODE | back to summary |
|---|---|
| public static final String ROOT_NODE This constant stands for a string identifying the root of the DmTree (".").
| |
| ROOT_NODE_CHAR | back to summary |
|---|---|
| public static final char ROOT_NODE_CHAR This constant stands for a char identifying the root of the DmTree ('.').
| |
| Uri | back to summary |
|---|---|
| private Uri() A private constructor to suppress the default public constructor. | |
| decode | back to summary |
|---|---|
| public static String decode(String nodeName) Decode the node name so that back slash and forward slash are unescaped from a back slash. | |
| encode | back to summary |
|---|---|
| public static String encode(String nodeName) Encode the node name so that back slash and forward slash are escaped
with a back slash. This method is the reverse of | |
| getHash | back to summary |
|---|---|
| private static String getHash(String from) | |
| getSegmentLength | back to summary |
|---|---|
| private static int getSegmentLength(String segment) This method returns the length of a URI segment. The length of the URI segment is defined as the number of bytes in the unescaped, UTF-8 encoded representation of the segment. The method verifies that the URI segment is well-formed.
| |
| isAbsoluteUri | back to summary |
|---|---|
| public static boolean isAbsoluteUri(String uri) Checks whether the specified URI is an absolute URI. An absolute URI contains the complete path to a node in the DMT starting from the DMT root (".").
| |
| isValidUri | back to summary |
|---|---|
| public static boolean isValidUri(String uri) Checks whether the specified URI is valid. A URI is considered valid if it meets the following constraints:
getMaxUriLength() and
getMaxSegmentNameLength() methods.
| |
| mangle | back to summary |
|---|---|
| public static String mangle(String nodeName) Returns a node name that is valid for the tree operation methods, based
on the given node name. This transformation is not idempotent, so it must
not be called with a parameter that is the result of a previous
Node name mangling is needed in the following cases:
A node name that does not suffer from either of these problems is guaranteed to remain unchanged by this method. Therefore the client may skip the mangling if the node name is known to be valid (though it is always safe to call this method).
The method returns the normalized
| |
| mangle | back to summary |
|---|---|
| pack-priv static String mangle(String nodeName, int limit) | |
| toPath | back to summary |
|---|---|
| public static String[] toPath(String uri) Split the specified URI along the path separator '/' characters and return an array of URI segments. Special characters in the returned segments are escaped. The returned array may be empty if the specified URI was empty.
| |
| toUri | back to summary |
|---|---|
| public static String toUri(String[] path) Construct a URI from the specified URI segments. The segments must already be mangled.
If the specified path is an empty array then an empty URI (
| |