|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.chemistry.opencmis.jcr.PathManager
public class PathManager
Utility class for mapping JCR paths to CMIS paths
Field Summary | |
---|---|
static String |
CMIS_ROOT_ID
Identifier of the root folder |
static String |
CMIS_ROOT_PATH
Root path |
Constructor Summary | |
---|---|
PathManager(String jcrRootPath)
Create a new PathManager instance for the given JCR root path. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CMIS_ROOT_ID
public static final String CMIS_ROOT_PATH
Constructor Detail |
---|
public PathManager(String jcrRootPath)
PathManager
instance for the given JCR root path.
jcrRootPath
- Method Detail |
---|
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 element
public static String relativize(String prefix, String cmisPath)
prefix
- cmisPath
-
r
such that prefix
+ r
= cmisPath
IllegalArgumentException
- if prefix
is not a prefix of cmisPath
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |