|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@ThreadSafe public interface PathFactory
A factory for creating paths
. This interface extends the ValueFactory
generic interface and adds specific
methods for creating paths (and relative paths) from a series of names, segments, or combinations.
Field Summary |
---|
Fields inherited from interface org.modeshape.jcr.value.ValueFactory |
---|
DEFAULT_DECODER, DEFAULT_ENCODER |
Method Summary | |
---|---|
Path |
create(Path parentPath,
Iterable<Path.Segment> segments)
Create a path by appending the supplied names to the parent path. |
Path |
create(Path parentPath,
Name... segmentNames)
Create a path by appending the supplied names to the parent path. |
Path |
create(Path parentPath,
Name segmentName,
int index)
Create a path by appending the supplied names to the parent path. |
Path |
create(Path parentPath,
Path.Segment... segments)
Create a path by appending the supplied names to the parent path. |
Path |
create(Path parentPath,
Path childPath)
Create a path by appending the supplied relative path to the supplied parent path. |
Path |
create(Path parentPath,
String subpath)
Create a path by appending the supplied names to the parent path. |
Path |
create(Path parentPath,
String segmentName,
int index)
Create a path by appending the supplied names to the parent path. |
Path |
createAbsolutePath(Iterable<Path.Segment> segments)
Create an absolute path with the supplied segments, in order. |
Path |
createAbsolutePath(Name... segmentNames)
Create an absolute path with the supplied segment names, in order. |
Path |
createAbsolutePath(Path.Segment... segments)
Create an absolute path with the supplied segments, in order. |
Path |
createRelativePath()
Create an empty relative path (i.e., equivalent to createRelativePath (
Path.SELF_SEGMENT )). |
Path |
createRelativePath(Iterable<Path.Segment> segments)
Create a relative path with the supplied segments, in order. |
Path |
createRelativePath(Name... segmentNames)
Create a relative path with the supplied segment names, in order. |
Path |
createRelativePath(Path.Segment... segments)
Create a relative path with the supplied segments, in order. |
Path |
createRootPath()
Create an absolute root path. |
Path.Segment |
createSegment(Name segmentName)
Create a path segment given the supplied segment name. |
Path.Segment |
createSegment(Name segmentName,
int index)
Create a path segment given the supplied segment name and index. |
Path.Segment |
createSegment(String segmentName)
Create a path segment given the supplied segment name. |
Path.Segment |
createSegment(String segmentName,
int index)
Create a path segment given the supplied segment name and index. |
Path.Segment |
createSegment(String segmentName,
TextDecoder decoder)
Create a path segment given the supplied segment name. |
Methods inherited from interface org.modeshape.jcr.value.ValueFactory |
---|
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getPropertyType |
Method Detail |
---|
Path createRootPath()
Path createAbsolutePath(Name... segmentNames)
segmentNames
- the names of the segments
IllegalArgumentException
- if at least one segment name is provided and if any of the supplied segment names are nullPath createAbsolutePath(Path.Segment... segments)
segments
- the segments
IllegalArgumentException
- if at least one segment is provided and if any of the supplied segments are nullPath createAbsolutePath(Iterable<Path.Segment> segments)
segments
- the segments
IllegalArgumentException
- if at least one segment is provided and if any of the supplied segments are nullPath createRelativePath()
createRelativePath
(
Path.SELF_SEGMENT
)). Subsequent calls will always return the same instance.
Path createRelativePath(Name... segmentNames)
segmentNames
- the names of the segments
IllegalArgumentException
- if at least one segment name is provided and if any of the supplied segment names are nullPath createRelativePath(Path.Segment... segments)
segments
- the segments
IllegalArgumentException
- if at least one segment is provided and if any of the supplied segments are nullPath createRelativePath(Iterable<Path.Segment> segments)
segments
- the segments
IllegalArgumentException
- if at least one segment is provided and if any of the supplied segments are nullPath create(Path parentPath, Path childPath)
absolute
if the supplied parent path is absolute.
parentPath
- the path that is to provide the basis for the new pathchildPath
- the path that should be appended to the parent path
IllegalArgumentException
- if the parent path reference or the child path reference is nullPath create(Path parentPath, Name segmentName, int index)
parentPath
- the path that is to provide the basis for the new pathsegmentName
- the name of the segment to be appended to the parent pathindex
- the index for the new segment
IllegalArgumentException
- if the parent path reference or the segment name is null, or if the index is invalidPath create(Path parentPath, String segmentName, int index)
parentPath
- the path that is to provide the basis for the new pathsegmentName
- the name of the segment to be appended to the parent pathindex
- the index for the new segment
IllegalArgumentException
- if the parent path reference or the segment name is null, or if the index is invalidPath create(Path parentPath, Name... segmentNames)
parentPath
- the path that is to provide the basis for the new pathsegmentNames
- the names of the segments that are to be appended, in order, to the parent path
IllegalArgumentException
- if the parent path reference is null, or if at least one segment name is provided and if
any of the supplied segment names are nullPath create(Path parentPath, Path.Segment... segments)
parentPath
- the path that is to provide the basis for the new pathsegments
- the segments that are to be appended, in order, to the parent path
IllegalArgumentException
- if the parent path reference is null, or if at least one segment name is provided and if
any of the supplied segment names are nullPath create(Path parentPath, Iterable<Path.Segment> segments)
parentPath
- the path that is to provide the basis for the new pathsegments
- the segments that are to be appended, in order, to the parent path
IllegalArgumentException
- if the parent path reference is null, or if at least one segment name is provided and if
any of the supplied segment names are nullPath create(Path parentPath, String subpath)
parentPath
- the path that is to provide the basis for the new pathsubpath
- the subpath to be appended to the parent path, which must be in the form of a relative path
IllegalArgumentException
- if the parent path reference or the segment name is null, or if the index is invalidPath.Segment createSegment(String segmentName)
[n]
" at the end of the name, where n is a positive integer. Note that the
same-name-sibling index is 1-based, not zero-based.
segmentName
- the name of the segment
IllegalArgumentException
- if the segment name reference is null
or the value could not be created from
the supplied string
ValueFormatException
- if the same-name-sibling index is not an integer, or if the supplied string is not a valid
segment namePath.Segment createSegment(String segmentName, TextDecoder decoder)
[n]
" at the end of the name, where n is a positive integer. Note that the
same-name-sibling index is 1-based, not zero-based.
segmentName
- the name of the segmentdecoder
- the decoder that should be used to decode the qualified name
IllegalArgumentException
- if the segment name reference is null
or the value could not be created from
the supplied string
ValueFormatException
- if the same-name-sibling index is not an integer, or if the supplied string is not a valid
segment namePath.Segment createSegment(String segmentName, int index)
segmentName
- the name of the new segmentindex
- the index of the new segment
IllegalArgumentException
- if the segment name reference is null
or if the index is invalid
ValueFormatException
- if the supplied string is not a valid segment namePath.Segment createSegment(Name segmentName)
segmentName
- the name of the segment
IllegalArgumentException
- if the segment name reference is nullPath.Segment createSegment(Name segmentName, int index)
segmentName
- the name of the new segmentindex
- the index of the new segment
IllegalArgumentException
- if the segment name reference is null or if the index is invalid
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |