|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.value.basic.BasicPathSegment
@Immutable public class BasicPathSegment
A basic implementation of Path.Segment
.
Constructor Summary | |
---|---|
BasicPathSegment(Name name)
|
|
BasicPathSegment(Name name,
int index)
|
Method Summary | |
---|---|
int |
compareTo(Path.Segment that)
|
boolean |
equals(Object obj)
|
int |
getIndex()
Get the index for this segment, which will be 1 by default. |
Name |
getName()
Get the name component of this segment. |
String |
getString()
Get the string form of the object. |
String |
getString(NamespaceRegistry namespaceRegistry)
Get the string form of the object, using the supplied namespace registry to convert any namespace URIs to prefixes. |
String |
getString(NamespaceRegistry namespaceRegistry,
TextEncoder encoder)
Get the encoded string form of the object, using the supplied namespace registry to convert the any namespace URIs to prefixes. |
String |
getString(NamespaceRegistry namespaceRegistry,
TextEncoder encoder,
TextEncoder delimiterEncoder)
Get the encoded string form of the object, using the supplied namespace registry to convert the names' namespace URIs to prefixes and the supplied encoder to encode characters, and using the second delimiter to encode (or convert) the delimiter used between the namespace prefix and the local part of any names. |
String |
getString(TextEncoder encoder)
Get the encoded string form of the object, using the supplied encoder to encode characters. |
String |
getUnencodedString()
Get the raw string form of the segment using the no-op encoder . |
int |
hashCode()
|
boolean |
hasIndex()
Return whether this segment has an index. |
boolean |
isIdentifier()
Return whether this segment is an identifier segment. |
boolean |
isParentReference()
Return whether this segment is a reference to a parent. |
boolean |
isSelfReference()
Return whether this segment is a self-reference. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicPathSegment(Name name)
name
- the segment name
IllegalArgumentException
- if the name is null or if the index is invalidpublic BasicPathSegment(Name name, int index)
name
- the segment nameindex
- the segment index
IllegalArgumentException
- if the name is null or if the index is invalidMethod Detail |
---|
public int getIndex()
Path.Segment
getIndex
in interface Path.Segment
public Name getName()
Path.Segment
getName
in interface Path.Segment
public boolean hasIndex()
Path.Segment
hasIndex
in interface Path.Segment
public boolean isParentReference()
Path.Segment
isParentReference
in interface Path.Segment
public boolean isSelfReference()
Path.Segment
isSelfReference
in interface Path.Segment
public boolean isIdentifier()
Path.Segment
isIdentifier
in interface Path.Segment
public int compareTo(Path.Segment that)
compareTo
in interface Comparable<Path.Segment>
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public String getUnencodedString()
Path.Segment
no-op encoder
. This is equivalent to
calling getString(Path.NO_OP_ENCODER)
.
getUnencodedString
in interface Path.Segment
Readable.getString(TextEncoder)
public String getString()
Readable
default encoder
is used to encode characters.
getString
in interface Readable
Readable.getString(TextEncoder)
public String getString(TextEncoder encoder)
Readable
getString
in interface Readable
encoder
- the encoder to use, or null if the default encoder
should be used
Readable.getString()
public String getString(NamespaceRegistry namespaceRegistry)
Readable
default encoder
is used to encode characters.
getString
in interface Readable
namespaceRegistry
- the namespace registry that should be used to obtain the prefix for any namespace URIs
Readable.getString(NamespaceRegistry,TextEncoder)
public String getString(NamespaceRegistry namespaceRegistry, TextEncoder encoder)
Readable
getString
in interface Readable
namespaceRegistry
- the namespace registry that should be used to obtain the prefix for the namespace URIsencoder
- the encoder to use, or null if the default encoder
should be used
Readable.getString(NamespaceRegistry)
public String getString(NamespaceRegistry namespaceRegistry, TextEncoder encoder, TextEncoder delimiterEncoder)
Readable
getString
in interface Readable
namespaceRegistry
- the namespace registry that should be used to obtain the prefix for the namespace URIs in the
segment names
encoder
- the encoder to use for encoding the local part and namespace prefix of any names, or null if the
default encoder
should be useddelimiterEncoder
- the encoder to use for encoding the delimiter between the local part and namespace prefix of any
names, or null if the standard delimiter should be used
Readable.getString(NamespaceRegistry)
,
Readable.getString(NamespaceRegistry, TextEncoder)
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |