net.sf.saxon.xqj

Class SaxonXQItem

Implemented Interfaces:
XQItem, XQItemAccessor, XQResultItem

public class SaxonXQItem
extends java.lang.Object
implements XQResultItem

This Saxon class is used to implement both the XQItem and XQResultItem interfaces in XQJ. Where the item is not a real XQResultItem, getConnection() will return null.

Constructor Summary

SaxonXQItem(Item item, SaxonXQDataFactory factory)

Method Summary

void
close()
String
getAtomicValue()
boolean
getBoolean()
byte
getByte()
XQConnection
getConnection()
double
getDouble()
float
getFloat()
int
getInt()
XMLStreamReader
getItemAsStream()
String
getItemAsString(Properties props)
XQItemType
getItemType()
long
getLong()
Node
getNode()
URI
getNodeUri()
Object
getObject()
short
getShort()
boolean
instanceOf(XQItemType type)
boolean
isClosed()
void
writeItem(OutputStream os, Properties props)
void
writeItem(Writer ow, Properties props)
void
writeItemToResult(Result result)
void
writeItemToSAX(ContentHandler saxHandler)

Constructor Details

SaxonXQItem

public SaxonXQItem(Item item,
                   SaxonXQDataFactory factory)

Method Details

close

public void close()
Specified by:
close in interface XQItem

getAtomicValue

public String getAtomicValue()
            throws XQException
Specified by:
getAtomicValue in interface XQItemAccessor

getBoolean

public boolean getBoolean()
            throws XQException
Specified by:
getBoolean in interface XQItemAccessor

getByte

public byte getByte()
            throws XQException
Specified by:
getByte in interface XQItemAccessor

getConnection

public XQConnection getConnection()
            throws XQException
Specified by:
getConnection in interface XQResultItem

getDouble

public double getDouble()
            throws XQException
Specified by:
getDouble in interface XQItemAccessor

getFloat

public float getFloat()
            throws XQException
Specified by:
getFloat in interface XQItemAccessor

getInt

public int getInt()
            throws XQException
Specified by:
getInt in interface XQItemAccessor

getItemAsStream

public XMLStreamReader getItemAsStream()
            throws XQException
Specified by:
getItemAsStream in interface XQItemAccessor

getItemAsString

public String getItemAsString(Properties props)
            throws XQException
Specified by:
getItemAsString in interface XQItemAccessor

getItemType

public XQItemType getItemType()
            throws XQException
Specified by:
getItemType in interface XQItemAccessor

getLong

public long getLong()
            throws XQException
Specified by:
getLong in interface XQItemAccessor

getNode

public Node getNode()
            throws XQException
Specified by:
getNode in interface XQItemAccessor

getNodeUri

public URI getNodeUri()
            throws XQException
Specified by:
getNodeUri in interface XQItemAccessor

getObject

public Object getObject()
            throws XQException
Specified by:
getObject in interface XQItemAccessor

getShort

public short getShort()
            throws XQException
Specified by:
getShort in interface XQItemAccessor

instanceOf

public boolean instanceOf(XQItemType type)
            throws XQException
Specified by:
instanceOf in interface XQItemAccessor

isClosed

public boolean isClosed()
Specified by:
isClosed in interface XQItem

writeItem

public void writeItem(OutputStream os,
                      Properties props)
            throws XQException
Specified by:
writeItem in interface XQItemAccessor

writeItem

public void writeItem(Writer ow,
                      Properties props)
            throws XQException
Specified by:
writeItem in interface XQItemAccessor

writeItemToResult

public void writeItemToResult(Result result)
            throws XQException
Specified by:
writeItemToResult in interface XQItemAccessor

writeItemToSAX

public void writeItemToSAX(ContentHandler saxHandler)
            throws XQException
Specified by:
writeItemToSAX in interface XQItemAccessor