|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents the set of results of a query.
This interface has setContentHandler(...), setLexicalHandler(...) and setErrorHandler(...)
methods allowing the client to get the results as SAX2 events.
Method Summary | |
void |
close()
Releases this result set object's resources immediately instead of waiting for this to happen when it is automatically closed. |
org.xml.sax.ContentHandler |
getContentHandler()
Returns the current content handler. |
org.xml.sax.ErrorHandler |
getErrorHandler()
Returns the current error handler. |
XMLDocument |
getFragmentsAsDocument(java.lang.String namespace,
java.lang.String localName,
java.lang.String qName)
Returns the fragments contained in the result set as a single XML document, with a document root element having the specified namespace, local name and qualified name. |
org.xml.sax.ext.LexicalHandler |
getLexicalHandler()
Returns the current lexical handler. |
XMLDocument |
getMetaData()
Returns the result set metadata (the XML Schema that models the returned data) as an XMLDocument. |
int |
getPosition()
Retrieves the current cursor position in ResultSet. |
java.util.Map |
getPrefixMap()
Returns the result set prefix map (as prefix-namespace pairs). |
org.xquark.schema.validation.PSVInfoSetProvider |
getPSVInfoSetProvider()
|
int |
getResultCount()
Returns the number of results in the result set. |
XMLStatement |
getStatement()
Returns the statement that produced this result set. |
boolean |
hasNext()
Indicates if there is a next Result after the current Result in ResultSet. |
boolean |
hasRootTag()
|
boolean |
isBeforeFirst()
Indicates whether the cursor is before the first result in this result set. |
boolean |
isDocument()
|
org.w3c.dom.Document |
nextAsDocument()
Returns the next result as a DOM2 document and increments by 1 the cursor position. |
org.w3c.dom.Node |
nextAsDOM()
Deprecated. Prefer nextAsDocument() or nextAsDOM(Element)
becuse a result may return multiple root nodes. |
void |
nextAsDOM(org.w3c.dom.Element parent)
Attaches the next result nodes as children of the Element node passed as a parameter to and increments by 1 the cursor position. |
void |
nextAsSAX()
Returns the next result as a SAX2 event flow and increments by 1 the cursor position. |
void |
nextAsStream(java.io.Writer out)
Returns the next result in a provided character stream and increments by 1 the cursor position. |
java.lang.String |
nextAsString()
Returns the next result as an XML string and increments by 1 the cursor position. |
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Sets a (SAX2) content handler to intercept events produced when retrieving results as SAX. |
void |
setErrorHandler(org.xml.sax.ErrorHandler handler)
Sets a (SAX2) error handler to intercept error events produced when retrieving results as SAX. |
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Sets a (SAX2) lexical handler to intercept events produced when retrieving results as SAX. |
Method Detail |
public void setContentHandler(org.xml.sax.ContentHandler handler)
*** ONLY FOR SAX2 ***
handler
- the content handler implementation (see org.xml.sax.ContentHandler)public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
*** ONLY FOR SAX2 ***
handler
- the lexical handler implementation (see org.xml.sax.ext.LexicalHandler)public void setErrorHandler(org.xml.sax.ErrorHandler handler)
*** ONLY FOR SAX2 ***
handler
- the error handler implementation (see org.xml.sax.ErrorHandler)public org.xml.sax.ContentHandler getContentHandler()
*** ONLY FOR SAX2 ***
public org.xml.sax.ext.LexicalHandler getLexicalHandler()
*** ONLY FOR SAX2 ***
public org.xml.sax.ErrorHandler getErrorHandler()
*** ONLY FOR SAX2 ***
public int getResultCount() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public XMLStatement getStatement() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public XMLDocument getMetaData() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public java.util.Map getPrefixMap() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public void close() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public boolean isBeforeFirst() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public org.w3c.dom.Document nextAsDocument() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public org.w3c.dom.Node nextAsDOM() throws XMLDBCException
nextAsDocument()
or nextAsDOM(Element)
becuse a result may return multiple root nodes.
XMLDBCException
- if a data source access error occurs.public void nextAsDOM(org.w3c.dom.Element parent) throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public java.lang.String nextAsString() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public void nextAsStream(java.io.Writer out) throws XMLDBCException
out
- a Writer
object assuming user is
responsible for the character encoding.
XMLDBCException
- if a data source access error occurs.public void nextAsSAX() throws XMLDBCException, org.xml.sax.SAXException
*** ONLY FOR SAX2 ***
XMLDBCException
- if a data source access error occurs
or if user has not set a content handler.
org.xml.sax.SAXException
- if a handler exception occurs.public boolean hasNext() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public int getPosition() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public XMLDocument getFragmentsAsDocument(java.lang.String namespace, java.lang.String localName, java.lang.String qName) throws XMLDBCException
namespace
- the namespace of the document root element.localName
- the local name of the document root element.qName
- the qualified name of the document root element.
XMLDBCException
- if a data source access error occurs.public boolean hasRootTag()
public boolean isDocument()
public org.xquark.schema.validation.PSVInfoSetProvider getPSVInfoSetProvider()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |