|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.xmlpatterns.QXmlItem
public class QXmlItem
The QXmlItem
class contains either an XML node or an atomic value. In XQuery
, all expressions evaluate to a sequence of items, where each item is either an XML node or an atomic value. The query in the following snippet evaluates to sequence of five items. The five items are: An element, an atomic value (binary data encoded in base64), a date, a float, and an attribute.
QXmlItem
is the class that represents these XQuery
items in the QtXmlPatterns API. A non-null instance of QXmlItem
is either a node or an atomic value. Calling isNode()
or isAtomicValue()
tells you which it is. Atomic values are represented elsewhere in the Qt API as instances of QVariant
, and an instance of QXmlItem
that represents an atomic value can be converted to a QVariant
by calling toAtomicValue()
. A QXmlItem
that wraps a node is represented elsewhere as an instance of QXmlNodeModelIndex
. A node QXmlItem
can be converted to a QXmlNodeModelIndex
by calling toNodeModelIndex()
.
A default constructed QXmlItem
instance is neither a node nor an atomic value. It is considered null, in which case isNull()
returns true.
An instance of QXmlItem
will be left dangling if the XML node model
that its QXmlNodeModelIndex
refers to is deleted.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Constructor Summary | |
---|---|
QXmlItem()
Constructs a null QXmlItem that is neither a node nor an atomic value. |
|
QXmlItem(java.lang.Object atomicValue)
Constructs an atomic value QXmlItem with atomicValue. |
|
QXmlItem(QXmlItem other)
The copy constructor constructs a copy of other. |
|
QXmlItem(QXmlNodeModelIndex node)
Constructs a node QXmlItem that is a copy of node. |
Method Summary | |
---|---|
QXmlItem |
clone()
This method is reimplemented for internal reasons |
static QXmlItem |
fromNativePointer(QNativePointer nativePointer)
|
boolean |
isAtomicValue()
Returns true if this item is an atomic value. |
boolean |
isNode()
Returns true if this item is a Node. |
boolean |
isNull()
Returns true if this QXmlItem is neither a node nor an atomic value. |
static QNativePointer |
nativePointerArray(QXmlItem[] array)
|
java.lang.Object |
toAtomicValue()
If this QXmlItem represents an atomic value, it is converted to an appropriate QVariant and returned. |
QXmlNodeModelIndex |
toNodeModelIndex()
If this QXmlItem represents a node, it returns the item as a QXmlNodeModelIndex . |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QXmlItem()
QXmlItem
that is neither a node nor an atomic value. isNull()
returns true for default constructed .
public QXmlItem(java.lang.Object atomicValue)
QXmlItem
with atomicValue. isAtomicValue()
.
public QXmlItem(QXmlItem other)
public QXmlItem(QXmlNodeModelIndex node)
QXmlItem
that is a copy of node. isNode()
.
Method Detail |
---|
public final boolean isAtomicValue()
isNull()
, and isNode()
.
public final boolean isNode()
isNull()
, and isAtomicValue()
.
public final boolean isNull()
QXmlItem
is neither a node nor an atomic value. Default constructed instances of QXmlItem
are null.
public final java.lang.Object toAtomicValue()
QXmlItem
represents an atomic value, it is converted to an appropriate QVariant
and returned. If this QXmlItem
is not an atomic value, the return value is a default constructed QVariant
. You can call isAtomicValue()
to test whether the item is an atomic value. isAtomicValue()
.
public final QXmlNodeModelIndex toNodeModelIndex()
QXmlItem
represents a node, it returns the item as a QXmlNodeModelIndex
. If this QXmlItem
is not a node, the return value is undefined. You can call isNode()
to test whether the item is a node. isNode()
.
public static QXmlItem fromNativePointer(QNativePointer nativePointer)
public static QNativePointer nativePointerArray(QXmlItem[] array)
public QXmlItem clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |