|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.exist.fluent.Resource org.exist.fluent.Item
public class Item
An XML item in the database. While most often used to represent XML
elements, it can also stand in for any DOM node or an atomic value. However, it
is not used to represent entire XML documents (see XMLDocument
).
Not all operations are valid in all cases.
Method Summary | |
---|---|
boolean |
booleanValue()
Return the converted boolean value following XQuery / XPath conversion rules. |
Comparable<Object> |
comparableValue()
Return the comparable value of this item, if available. |
XMLGregorianCalendar |
dateTimeValue()
Return the XML date/time value of this item by parsing its string representation. |
double |
doubleValue()
Return the double value of this item. |
Duration |
durationValue()
Return the duration value of this item by parsing its string representation as a duration. |
boolean |
equals(Object o)
|
boolean |
extant()
Return whether this item really exists. |
int |
hashCode()
The hash code computation can be expensive, and the hash codes may not be very well distributed. |
Date |
instantValue()
Return the java.util.Date value of this item by parsing its string
representation as an XML date/time value, then converting to a Java date. |
int |
intValue()
Return the int value of this item. |
long |
longValue()
Return the long value of this item. |
Node |
node()
Return this item cast as a node. |
Item |
toAtomicItem()
Atomize this item and return the result. |
ItemList |
toItemList()
Return a singleton item list consisting of this item. |
String |
toString()
Return the string representation of this item. |
String |
type()
Return the type of this item, e.g. |
String |
value()
|
String |
valueWithDefault(String defaultValue)
|
Methods inherited from class org.exist.fluent.Resource |
---|
database, namespaceBindings, query |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public Node node()
DatabaseException
- if this item is not a nodepublic boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String type()
public boolean extant()
true
if the item exists, false
otherwisepublic ItemList toItemList()
public Item toAtomicItem()
public String value()
public String valueWithDefault(String defaultValue)
defaultValue
- the default value to return if the item is null (unbound)
public boolean booleanValue()
DatabaseException
- if the conversion failedpublic int intValue()
DatabaseException
- if the conversion failedpublic long longValue()
DatabaseException
- if the conversion failedpublic double doubleValue()
DatabaseException
- if the conversion failedpublic Duration durationValue()
DatabaseException
- if the conversion failedpublic XMLGregorianCalendar dateTimeValue()
DatabaseException
- if the conversion failedpublic Date instantValue()
java.util.Date
value of this item by parsing its string
representation as an XML date/time value, then converting to a Java date.
DatabaseException
- if the conversion failedpublic Comparable<Object> comparableValue()
DatabaseException
- if this item is not comparablepublic String toString()
toString
in class Object
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |