javax.xml.xquery
Interface XQSequence

All Superinterfaces:
XQItemAccessor
All Known Subinterfaces:
XQCachedSequence, XQResultSequence
All Known Implementing Classes:
XQAbstractResultSequence, XQResultSequenceImpl

public interface XQSequence
extends XQItemAccessor

Author:
Michael Stark

Method Summary
 boolean absolute(int itempos)
          Moves the XQSequence's position to the given item number in this object.
 void afterLast()
          Move to the position after the last item.
 void beforeFirst()
          Moves to the position before the first item.
 void close()
          Closes the sequence and frees all resources associated with this sequence.
 boolean first()
          Moves to the first item in the sequence.
 XQItem getCachedItem()
          Get the current item as an immutable cached item object.
 XQItem getItem()
          Get the current item as an immutable XQItem object.
 javax.xml.stream.XMLStreamReader getSequenceAsStream()
          Read the entire sequence starting from the current position as an XMLStreamReader object.
 java.lang.String getSequenceAsString()
          Converts the sequence into a string (of XML elements or document).
 java.lang.String getSequenceAsString(java.util.Properties props)
          Converts the sequence into a string (of XML elements or document).
 boolean isAfterLast()
          Checks if the current position is after the last item in the sequence.
 boolean isBeforeFirst()
          Checks if the current position before the first item in the sequence.
 boolean isClosed()
          Checks if the sequence is closed.
 boolean isFirst()
          Checks if the current position at the first item in the sequence.
 boolean isLast()
          Checks if the current position at the last item in the sequence.
 boolean isOnItem()
          Check if the sequence is positioned on an item or not.
 boolean isScrollable()
          Checks if the sequence is scrollable.
 boolean last()
          Moves to the last item in the sequence.
 boolean next()
          Moves to the next item in the sequence.
 boolean previous()
          Moves to the previous item in the sequence
 boolean relative(int itempos)
          Moves the cursor a relative number of items, either positive or negative.
 void writeSequence(java.io.OutputStream os, java.util.Properties props)
          Writes the entire sequence starting from the current position to the output Writer.
 void writeSequence(java.io.Writer ow)
          Writes the entire sequence starting from the current position to the output Writer.
 void writeSequence(java.io.Writer ow, java.util.Properties props)
          Writes the entire sequence starting from the current position to the output Writer.
 void writeSequenceToSAX(org.xml.sax.ContentHandler saxhdlr)
          Writes the entire sequence starting from the current position to a SAX handler.
 void writeSequenceToStream(javax.xml.stream.XMLStreamWriter writer)
          Writes the entire sequence starting from the current position to an XMLStreamWriter object.
 
Methods inherited from interface javax.xml.xquery.XQItemAccessor
getCalendar, getDouble, getInt, getItemType, getLexicalValue, getLong, getNode, getNodeUri, getObject, getObject, getString, getXMLStreamReader, instanceOf, writeSAX, writeXMLStream
 

Method Detail

absolute

boolean absolute(int itempos)
                 throws XQException
Moves the XQSequence's position to the given item number in this object.

Throws:
XQException

afterLast

void afterLast()
               throws XQException
Move to the position after the last item.

Throws:
XQException

beforeFirst

void beforeFirst()
                 throws XQException
Moves to the position before the first item.

Throws:
XQException

close

void close()
           throws XQException
Closes the sequence and frees all resources associated with this sequence.

Throws:
XQException

first

boolean first()
              throws XQException
Moves to the first item in the sequence.

Throws:
XQException

getCachedItem

XQItem getCachedItem()
                     throws XQException
Get the current item as an immutable cached item object.

Throws:
XQException

getItem

XQItem getItem()
               throws XQException
Get the current item as an immutable XQItem object.

Throws:
XQException

getSequenceAsStream

javax.xml.stream.XMLStreamReader getSequenceAsStream()
                                                     throws XQException
Read the entire sequence starting from the current position as an XMLStreamReader object.

Throws:
XQException

getSequenceAsString

java.lang.String getSequenceAsString()
                                     throws XQException
Converts the sequence into a string (of XML elements or document).

Throws:
XQException

getSequenceAsString

java.lang.String getSequenceAsString(java.util.Properties props)
                                     throws XQException
Converts the sequence into a string (of XML elements or document).

Throws:
XQException

isAfterLast

boolean isAfterLast()
                    throws XQException
Checks if the current position is after the last item in the sequence.

Throws:
XQException

isBeforeFirst

boolean isBeforeFirst()
                      throws XQException
Checks if the current position before the first item in the sequence.

Throws:
XQException

isClosed

boolean isClosed()
Checks if the sequence is closed.


isFirst

boolean isFirst()
                throws XQException
Checks if the current position at the first item in the sequence.

Throws:
XQException

isLast

boolean isLast()
               throws XQException
Checks if the current position at the last item in the sequence.

Throws:
XQException

isOnItem

boolean isOnItem()
                 throws XQException
Check if the sequence is positioned on an item or not.

Throws:
XQException

isScrollable

boolean isScrollable()
                     throws XQException
Checks if the sequence is scrollable.

Throws:
XQException

last

boolean last()
             throws XQException
Moves to the last item in the sequence.

Throws:
XQException

next

boolean next()
             throws XQException
Moves to the next item in the sequence.

Throws:
XQException

previous

boolean previous()
                 throws XQException
Moves to the previous item in the sequence

Throws:
XQException

relative

boolean relative(int itempos)
                 throws XQException
Moves the cursor a relative number of items, either positive or negative.

Throws:
XQException

writeSequence

void writeSequence(java.io.OutputStream os,
                   java.util.Properties props)
                   throws XQException
Writes the entire sequence starting from the current position to the output Writer.

Throws:
XQException

writeSequence

void writeSequence(java.io.Writer ow)
                   throws XQException
Writes the entire sequence starting from the current position to the output Writer.

Throws:
XQException

writeSequence

void writeSequence(java.io.Writer ow,
                   java.util.Properties props)
                   throws XQException
Writes the entire sequence starting from the current position to the output Writer.

Throws:
XQException

writeSequenceToSAX

void writeSequenceToSAX(org.xml.sax.ContentHandler saxhdlr)
                        throws XQException
Writes the entire sequence starting from the current position to a SAX handler.

Throws:
XQException

writeSequenceToStream

void writeSequenceToStream(javax.xml.stream.XMLStreamWriter writer)
                           throws XQException
Writes the entire sequence starting from the current position to an XMLStreamWriter object.

Throws:
XQException