SaxonC
11.6
Saxon Processor library for C/C++, PHP and Python
|
#include <XdmItem.h>
Public Member Functions | |
XdmItem () | |
XdmItem default constructor. More... | |
XdmItem (jobject) | |
XdmItem constructor created as a wrapper around an existing Saxon Java object. More... | |
XdmItem (const XdmItem &item) | |
Copy constructor. More... | |
virtual | ~XdmItem () |
Destructor. More... | |
virtual void | incrementRefCount () |
Increment reference count of this XdmItem - Memory management - Internal use only. More... | |
virtual void | decrementRefCount () |
Decrement reference count of this XdmItem - Memory management - Internal use only. More... | |
virtual bool | isAtomic () |
virtual bool | isNode () |
virtual bool | isFunction () |
virtual bool | isMap () |
virtual bool | isArray () |
virtual jobject | getUnderlyingValue () |
virtual const char * | getStringValue () |
const char * | toString () |
Create a string representation of the value. More... | |
virtual XdmItem * | getHead () |
XdmItem * | itemAt (int n) |
int | size () |
virtual XDM_TYPE | getType () |
Public Member Functions inherited from XdmValue | |
XdmValue () | |
A default Constructor. More... | |
XdmValue (const XdmValue &other) | |
A copy constructor. More... | |
XdmValue * | addXdmValueWithType (const char *tStr, const char *val) |
Add an XdmItem to the sequence. More... | |
void | addXdmItem (XdmItem *val) |
void | addUnderlyingValue (jobject val) |
XdmValue (jobject val, bool arrFlag) | |
A Constructor for handling XdmArray - Internal user only. More... | |
XdmValue (jobject val) | |
A Constructor. More... | |
virtual | ~XdmValue () |
Destructor. More... | |
void | releaseXdmValue () |
Delete the XdmValue object and clean up all items in the sequence. Release the underlying JNI object. | |
int | getRefCount () |
Get the number of references on this XdmValue. More... | |
Protected Attributes | |
jobject | value |
std::string | stringValue |
Protected Attributes inherited from XdmValue | |
char * | valueType |
std::vector< XdmItem * > | values |
int | xdmSize |
int | refCount |
Additional Inherited Members | |
Protected Member Functions inherited from XdmValue | |
void | initialize () |
initialize this XdmValue with default values | |
The class XdmItem represents an item in a sequence, as defined by the XDM data model. An item is either an atomic value or a node.
An item is a member of a sequence, but it can also be considered as a sequence (of length one) in its own right. XdmItem
is a subtype of XdmValue
because every Item in the XDM data model is also a value.
It cannot be assumed that every sequence of length one will be represented by an XdmItem
. It is quite possible for an XdmValue
that is not an XdmItem
to hold a singleton sequence.
Saxon provides two concrete subclasses of XdmItem
, namely XdmNode and XdmAtomicValue. Users must not attempt to create additional subclasses.
|
explicit |
|
virtual |
Destructor.
Destructor for XdmItem
|
virtual |
|
virtual |
Get the first item in the sequence
Reimplemented from XdmValue.
Reimplemented in XdmNode, and XdmAtomicValue.
|
virtual |
Get the string value of the item. For a node, this gets the string value of the node. For an atomic value, it has the same effect as casting the value to a string. In all cases the result is the same as applying the XPath string() function.
For atomic values, the result is the same as the result of calling toString
. This is not the case for nodes, where toString
returns an XML serialization of the node.
Reimplemented in XdmNode, and XdmAtomicValue.
|
virtual |
Get the type of the object
Reimplemented from XdmValue.
Reimplemented in XdmNode, XdmMap, XdmFunctionItem, XdmAtomicValue, and XdmArray.
|
virtual |
|
virtual |
|
virtual |
Determine whether the item is an Array or some other type of item
Reimplemented in XdmArray.
|
virtual |
Determine whether the item is an atomic value or some other type of item
Reimplemented in XdmNode, XdmFunctionItem, and XdmAtomicValue.
|
virtual |
Determine whether the item is a function or some other type of item
Reimplemented in XdmMap, XdmFunctionItem, and XdmArray.
|
virtual |
Determine whether the item is a map or some other type of item
Reimplemented in XdmMap.
|
virtual |
Determine whether the item is a node or some other type of item
Reimplemented in XdmNode.
|
virtual |
Get the n'th item in the value, counting from zero.
n | the item that is required, counting the first item in the sequence as item zero |
Reimplemented from XdmValue.
|
virtual |
Get the number of items in the sequence
Reimplemented from XdmValue.
|
virtual |
|
protected |
Cached. String representation of the XdmValue, if available
|
protected |
The Java XdmItem object as a JNI jobject