|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.spi.commons.name.PathFactoryImpl
public class PathFactoryImpl
PathFactoryImpl...
| Method Summary | |
|---|---|
Path |
create(Name name)
Creates a relative path based on a Name. |
Path |
create(Name name,
int index)
Creates a relative path based on a Name and a normalized index. |
Path |
create(Path.Element[] elements)
Create a new Path from the given elements. |
Path |
create(Path parent,
Name name,
boolean normalize)
Creates a new Path out of the given parent |
Path |
create(Path parent,
Name name,
int index,
boolean normalize)
Creates a new Path out of the given parent |
Path |
create(Path parent,
Path relPath,
boolean normalize)
Return a new Path out of the given parent |
Path |
create(java.lang.String pathString)
Returns a Path holding the value of the specified
string. |
Path.Element |
createElement(Name name)
Creates a path element with the given qualified name. |
Path.Element |
createElement(Name name,
int index)
Same as PathFactory.createElement(Name) except that an explicit index can be
specified. |
Path.Element |
getCurrentElement()
Return the current element. |
static PathFactory |
getInstance()
|
Path.Element |
getParentElement()
Return the parent element. |
Path.Element |
getRootElement()
Return the root element. |
Path |
getRootPath()
Return the Path of the root node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static PathFactory getInstance()
public Path create(Path parent,
Path relPath,
boolean normalize)
throws java.lang.IllegalArgumentException,
javax.jcr.RepositoryException
PathFactoryPath out of the given parent path
string and the given relative path string. If normalize is
true, the returned path will be normalized (or
canonicalized, if the parent path is absolute).
- Specified by:
create in interface PathFactory
- Returns:
-
- Throws:
java.lang.IllegalArgumentException - if relPath is absolute.
javax.jcr.RepositoryException - if normalize is true but the
created Path cannot be normalized.- See Also:
PathFactory.create(Path, Path, boolean)
public Path create(Path parent,
Name name,
boolean normalize)
throws javax.jcr.RepositoryException
PathFactoryPath out of the given parent path
string and the give name. If normalize is true,
the returned path will be normalized (or canonicalized, if the parent
path is absolute). Use PathFactory.create(Path, Name, int, boolean)
in order to build a Path having an index with his name element.
- Specified by:
create in interface PathFactory
- Parameters:
parent - the parent pathname - the name of the new path element.
- Returns:
-
- Throws:
javax.jcr.RepositoryException- See Also:
PathFactory.create(Path, Name, boolean)
public Path create(Path parent,
Name name,
int index,
boolean normalize)
throws java.lang.IllegalArgumentException,
javax.jcr.RepositoryException
PathFactoryPath out of the given parent path
and the give name and normalized index. See also
PathFactory.create(Path, Name, boolean).
- Specified by:
create in interface PathFactory
- Parameters:
parent - the parent path.name - the name of the new path element.index - the index of the new path element.normalize - If true the Path is normalized before being returned.
- Returns:
-
- Throws:
java.lang.IllegalArgumentException - If the given index is lower than
Path.INDEX_UNDEFINED.
javax.jcr.RepositoryException - If the normalized is
true and the path cannot be normalized.- See Also:
PathFactory.create(Path, Name, int, boolean)
public Path create(Name name)
throws java.lang.IllegalArgumentException
PathFactoryName.
create in interface PathFactoryname - single Name for this relative path.
name.
java.lang.IllegalArgumentException - if the name is null.PathFactory.create(Name)
public Path create(Name name,
int index)
throws java.lang.IllegalArgumentException
PathFactoryName and a normalized index.
Same as PathFactory.create(Name) but allows to explicitely specify an
index.
create in interface PathFactoryname - single Name for this relative path.index - index of the single name element.
name and normalizedIndex.
java.lang.IllegalArgumentException - if index is lower
than Path.INDEX_UNDEFINED or if the name is not valid.PathFactory.create(Name, int)
public Path create(Path.Element[] elements)
throws java.lang.IllegalArgumentException
PathFactoryPath from the given elements.
create in interface PathFactoryPath created from the elements.
java.lang.IllegalArgumentException - If the given elements are null
or have a length of 0.PathFactory.create(Path.Element[])
public Path create(java.lang.String pathString)
throws java.lang.IllegalArgumentException
PathFactoryPath holding the value of the specified
string. The string must be in the format returned by the
Path.getString() method.
create in interface PathFactorypathString - a String containing the Path
representation to be parsed.
Path represented by the argument
java.lang.IllegalArgumentException - if the specified string can not be parsed
as a Path.PathFactory.create(String)
public Path.Element createElement(Name name)
throws java.lang.IllegalArgumentException
PathFactoryPathFactory.getParentElement(), PathFactory.getCurrentElement() or
PathFactory.getRootElement()) then the associated constant is returned.
createElement in interface PathFactoryname - the name of the element
java.lang.IllegalArgumentException - if the name is nullPathFactory.createElement(Name)
public Path.Element createElement(Name name,
int index)
throws java.lang.IllegalArgumentException
PathFactoryPathFactory.createElement(Name) except that an explicit index can be
specified.
Note that an IllegalArgumentException will be thrown if the specified
name denotes a special path element (either
PathFactory.getParentElement(), PathFactory.getCurrentElement() or
PathFactory.getRootElement()) since an explicit index is not allowed
in this context.
createElement in interface PathFactoryname - the name of the elementindex - the index if the element.
java.lang.IllegalArgumentException - if the name is null,
if the given index is lower than Path.INDEX_UNDEFINED or if name
denoting a special path element.PathFactory.createElement(Name, int)public Path.Element getCurrentElement()
PathFactory
getCurrentElement in interface PathFactoryPathFactory.getCurrentElement()public Path.Element getParentElement()
PathFactory
getParentElement in interface PathFactoryPathFactory.getParentElement()public Path.Element getRootElement()
PathFactory
getRootElement in interface PathFactoryPathFactory.getRootElement()public Path getRootPath()
PathFactoryPath of the root node.
getRootPath in interface PathFactoryPath of the root node.PathFactory.getRootPath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||