|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.xquery.value.AtomicValue
org.exist.xquery.value.StringValue
public class StringValue
Field Summary | |
---|---|
static StringValue |
EMPTY_STRING
|
Fields inherited from class org.exist.xquery.value.AtomicValue |
---|
EMPTY_VALUE |
Fields inherited from interface org.exist.xquery.value.Sequence |
---|
EMPTY_SEQUENCE |
Constructor Summary | |
---|---|
StringValue(java.lang.String stringValue)
|
|
StringValue(java.lang.String stringValue,
int type)
|
Method Summary | |
---|---|
static java.lang.String |
collapseWhitespace(java.lang.CharSequence in)
Collapses all sequences of adjacent whitespace chars in the input string into a single space. |
int |
compareTo(java.text.Collator collator,
AtomicValue other)
|
boolean |
compareTo(java.text.Collator collator,
int operator,
AtomicValue other)
|
int |
compareTo(java.lang.Object o)
|
boolean |
contains(java.text.Collator collator,
AtomicValue other)
Compares this atomic value to another. |
int |
conversionPreference(java.lang.Class javaClass)
Returns a preference indicator, indicating the preference of a value to be converted into the given Java class. |
AtomicValue |
convertTo(int requiredType)
Convert this item into an atomic value, whose type corresponds to the specified target type. |
boolean |
effectiveBooleanValue()
Get the effective boolean value of this sequence. |
boolean |
endsWith(java.text.Collator collator,
AtomicValue other)
Compares this atomic value to another. |
StringValue |
expand()
|
static java.lang.String |
expand(java.lang.CharSequence seq)
|
java.lang.String |
getStringValue()
Return the string value of this item (see the definition of string value in XPath). |
int |
getType()
Returns the type of the Indexable as one of the constants defined in Type . |
Item |
itemAt(int pos)
Returns the item located at the specified position within this sequence. |
AtomicValue |
max(java.text.Collator collator,
AtomicValue other)
|
AtomicValue |
min(java.text.Collator collator,
AtomicValue other)
|
static java.lang.String |
normalizeWhitespace(java.lang.CharSequence seq)
|
byte[] |
serializeValue(int offset,
boolean caseSensitive)
Serialize for the persistant storage |
boolean |
startsWith(java.text.Collator collator,
AtomicValue other)
Compares this atomic value to another. |
java.lang.Object |
toJavaObject(java.lang.Class target)
Convert the value into an instance of the specified Java class. |
java.lang.String |
toString()
|
static java.lang.String |
trimWhitespace(java.lang.String in)
|
Methods inherited from class org.exist.xquery.value.AtomicValue |
---|
add, addAll, atomize, clearContext, copyTo, deserialize, dump, getCardinality, getDocumentSet, getItemType, getLength, hasMany, hasOne, isCached, isEmpty, isPersistentSet, iterate, removeDuplicates, serialize, setIsCached, setSelfAsContext, toNodeSet, toSAX, toSequence, unorderedIterator |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final StringValue EMPTY_STRING
Constructor Detail |
---|
public StringValue(java.lang.String stringValue, int type) throws XPathException
XPathException
public StringValue(java.lang.String stringValue)
Method Detail |
---|
public StringValue expand() throws XPathException
XPathException
public int getType()
Indexable
Type
.
getType
in interface Indexable
getType
in interface Item
getType
in class AtomicValue
public java.lang.String getStringValue()
Item
getStringValue
in interface Item
getStringValue
in interface Sequence
getStringValue
in class AtomicValue
public Item itemAt(int pos)
Sequence
itemAt
in interface Sequence
itemAt
in class AtomicValue
public AtomicValue convertTo(int requiredType) throws XPathException
Item
Type
. An XPathException
is thrown
if the conversion is impossible.
convertTo
in interface Item
convertTo
in interface Sequence
convertTo
in class AtomicValue
requiredType
- one of the type constants defined in class Type
XPathException
public int conversionPreference(java.lang.Class javaClass)
Sequence
conversionPreference
in interface Item
conversionPreference
in interface Sequence
conversionPreference
in class AtomicValue
public java.lang.Object toJavaObject(java.lang.Class target) throws XPathException
Sequence
toJavaObject
in interface Item
toJavaObject
in interface Sequence
toJavaObject
in class AtomicValue
XPathException
public boolean compareTo(java.text.Collator collator, int operator, AtomicValue other) throws XPathException
compareTo
in class AtomicValue
XPathException
public int compareTo(java.text.Collator collator, AtomicValue other) throws XPathException
compareTo
in class AtomicValue
XPathException
public boolean startsWith(java.text.Collator collator, AtomicValue other) throws XPathException
AtomicValue
startsWith
in class AtomicValue
collator
- Collator used for string comparison.
XPathException
- if this is not a string.public boolean endsWith(java.text.Collator collator, AtomicValue other) throws XPathException
AtomicValue
endsWith
in class AtomicValue
collator
- Collator used for string comparison.
XPathException
- if this is not a string.public boolean contains(java.text.Collator collator, AtomicValue other) throws XPathException
AtomicValue
contains
in class AtomicValue
collator
- Collator used for string comparison.
XPathException
- if this is not a string.public boolean effectiveBooleanValue() throws XPathException
Sequence
effectiveBooleanValue
in interface Sequence
effectiveBooleanValue
in class AtomicValue
XPathException
public java.lang.String toString()
toString
in class AtomicValue
public static final java.lang.String normalizeWhitespace(java.lang.CharSequence seq)
public static java.lang.String collapseWhitespace(java.lang.CharSequence in)
in
- public static final java.lang.String trimWhitespace(java.lang.String in)
public static final java.lang.String expand(java.lang.CharSequence seq) throws XPathException
XPathException
public AtomicValue max(java.text.Collator collator, AtomicValue other) throws XPathException
max
in class AtomicValue
XPathException
public AtomicValue min(java.text.Collator collator, AtomicValue other) throws XPathException
min
in class AtomicValue
XPathException
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
compareTo
in class AtomicValue
public byte[] serializeValue(int offset, boolean caseSensitive)
serializeValue
in interface Indexable
serializeValue
in class AtomicValue
offset
-
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |