|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.priha.path.PathFactory
public class PathFactory
Gets Paths from a local storage.
If you possibly can, you should use PathFactory to get yourself a Path object. This
factory class stores the Paths in a WeakHashMap, and is always guaranteed to give
you a good Path object. In most cases, this is a lot faster than calling the regular
Path.Path(String)
constructor, since path parsing can take quite a bit of
time.
Constructor Summary | |
---|---|
PathFactory()
|
Method Summary | |
---|---|
static java.lang.String |
getMappedPath(NamespaceMapper ns,
Path path)
|
static Path |
getPath(NamespaceMapper ns,
java.lang.String path)
Turns a String to a Path. |
static Path |
getPath(java.lang.String property)
Turns a FQN-representation of a Path into a real Path. |
static void |
reset()
This method clears up the PathFactory cache maps. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PathFactory()
Method Detail |
---|
public static void reset()
public static Path getPath(NamespaceMapper ns, java.lang.String path) throws javax.jcr.NamespaceException, javax.jcr.RepositoryException
path
- A String representing the Path
javax.jcr.RepositoryException
- If there is a problem parsing the Path
javax.jcr.NamespaceException
- If the Path contains a prefix which could not be parsed.public static java.lang.String getMappedPath(NamespaceMapper ns, Path path) throws javax.jcr.NamespaceException, javax.jcr.RepositoryException
javax.jcr.NamespaceException
javax.jcr.RepositoryException
public static Path getPath(java.lang.String property) throws javax.jcr.NamespaceException, javax.jcr.RepositoryException
property
-
javax.jcr.NamespaceException
javax.jcr.RepositoryException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |