public class PathManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CMIS_ROOT_ID
Identifier of the root folder
|
static String |
CMIS_ROOT_PATH
Root path
|
Constructor and Description |
---|
PathManager(String jcrRootPath)
Create a new
PathManager instance for the given JCR root
path. |
Modifier and Type | Method and Description |
---|---|
static String |
createCmisPath(String cmisPath,
String child)
Create a CMIS path from a parent path and a child element
|
String |
getJcrRootPath() |
String |
getPath(javax.jcr.Node node)
Determine the CMIS path given a JCR
Node . |
static boolean |
isAbsolute(String cmisPath) |
boolean |
isRoot(javax.jcr.Node node)
Determines whether a JCR
Node is the root node wrt. |
static boolean |
isRoot(String cmisPath) |
static String |
relativize(String prefix,
String cmisPath)
Relativize an CMIS path wrt.
|
public static final String CMIS_ROOT_ID
public static final String CMIS_ROOT_PATH
public PathManager(String jcrRootPath)
PathManager
instance for the given JCR root
path.jcrRootPath
- public String getJcrRootPath()
public boolean isRoot(javax.jcr.Node node)
Node
is the root node wrt. to this
PathManager
instance. That is, whether the path of the node
is equal to this instance's JCR root path.node
- true
iff node
is the root node wrt. to
this PathManager
instance.public String getPath(javax.jcr.Node node)
Node
.node
- IllegalArgumentException
- when node
is not part of the hierarchypublic static boolean isRoot(String cmisPath)
cmisPath
- true
iff cmisPath
equals
CMIS_ROOT_PATH
public static boolean isAbsolute(String cmisPath)
cmisPath
- true
iff cmisPath
public static String createCmisPath(String cmisPath, String child)
cmisPath
- parent pathchild
- child elementpublic static String relativize(String prefix, String cmisPath)
prefix
- cmisPath
- r
such that prefix
+
r
= cmisPath
IllegalArgumentException
- if prefix
is not a prefix of
cmisPath
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.