<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 09 20:48:46 GMT 2011 --> <TITLE> XQExpression </TITLE> <META NAME="date" CONTENT="2011-12-09"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="XQExpression"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery"><B>PREV CLASS</B></A> <A HREF="../../../javax/xml/xquery/XQItem.html" title="interface in javax.xml.xquery"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/xml/xquery/XQExpression.html" target="_top"><B>FRAMES</B></A> <A HREF="XQExpression.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> javax.xml.xquery</FONT> <BR> Interface XQExpression</H2> <DL> <DT><B>All Superinterfaces:</B> <DD><A HREF="../../../javax/xml/xquery/XQDynamicContext.html" title="interface in javax.xml.xquery">XQDynamicContext</A></DD> </DL> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/sf/saxon/xqj/SaxonXQExpression.html" title="class in net.sf.saxon.xqj">SaxonXQExpression</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>XQExpression</B><DT>extends <A HREF="../../../javax/xml/xquery/XQDynamicContext.html" title="interface in javax.xml.xquery">XQDynamicContext</A></DL> </PRE> <P> This interface describes the execute immediate functionality for expressions. This object can be created from the <code>XQConnection</code> and the execution can be done using the <code>executeQuery()</code> or <code>executeCommand()</code> method, passing in the XQuery expression. <p> All external variables defined in the prolog of the expression to be executed must be set in the dynamic context of this expression using the bind methods. Also, variables bound in this expression but not defined as external in the prolog of the expression to be executed, are simply ignored. For example, if variables <code>$var1</code> and <code>$var2</code> are bound, but the query only defines <code>$var1</code> as external, no error will be reported for the binding of <code>$var2</code>. It will simply be ignored. When the expression is executed using the <code>executeQuery</code> method, if the execution is successful, then an <code>XQResultSequence</code> object is returned. The <code>XQResultSequence</code> object is tied to the <code>XQExpression</code> from which it was prepared and is closed implicitly if that <code>XQExpression</code> is either closed or re-executed. <p> The <code>XQExpression</code> object is dependent on the <code>XQConnection</code> object from which it was created and is only valid for the duration of that object. Thus, if the <code>XQConnection</code> object is closed then this <code>XQExpression</code> object will be implicitly closed and it can no longer be used. <p> An XQJ driver is not required to provide finalizer methods for the connection and other objects. Hence it is strongly recommended that users call close method explicitly to free any resources. It is also recommended that they do so under a final block to ensure that the object is closed even when there are exceptions. Not closing this object implicitly or explicitly might result in serious memory leaks. <p> When the <code>XQExpression</code> is closed any <code>XQResultSequence</code> object obtained from it is also implicitly closed. <p> Example - <pre> XQConnection conn = XQDatasource.getConnection(); XQExpression expr = conn.createExpression(); expr.bindInt(new QName("x"), 21, null); XQSequence result = expr.executeQuery( "declare variable $x as xs:integer external; for $i in $x return $i"); while (result.next()) { // process results ... } // Execute some other expression on the same object XQSequence result = expr.executeQuery("for $i in doc('foo.xml') return $i"); ... result.close(); // close the result expr.close(); conn.close(); </pre> <P> <P> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQExpression.html#cancel()">cancel</A></B>()</CODE> <BR> Attempts to cancel the execution if both the XQuery engine and XQJ driver support aborting the execution of an <code>XQExpression</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQExpression.html#close()">close</A></B>()</CODE> <BR> Closes the expression object and release associated resources.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQExpression.html#executeCommand(java.io.Reader)">executeCommand</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A> cmd)</CODE> <BR> Executes an implementation-defined command.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQExpression.html#executeCommand(java.lang.String)">executeCommand</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> cmd)</CODE> <BR> Executes an implementation-defined command.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../javax/xml/xquery/XQResultSequence.html" title="interface in javax.xml.xquery">XQResultSequence</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQExpression.html#executeQuery(java.io.InputStream)">executeQuery</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> query)</CODE> <BR> Executes a query expression.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../javax/xml/xquery/XQResultSequence.html" title="interface in javax.xml.xquery">XQResultSequence</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQExpression.html#executeQuery(java.io.Reader)">executeQuery</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A> query)</CODE> <BR> Executes a query expression.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../javax/xml/xquery/XQResultSequence.html" title="interface in javax.xml.xquery">XQResultSequence</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQExpression.html#executeQuery(java.lang.String)">executeQuery</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> query)</CODE> <BR> Executes a query expression.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../javax/xml/xquery/XQStaticContext.html" title="interface in javax.xml.xquery">XQStaticContext</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQExpression.html#getStaticContext()">getStaticContext</A></B>()</CODE> <BR> Gets an <code>XQStaticContext</code> representing the values for all expression properties.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQExpression.html#isClosed()">isClosed</A></B>()</CODE> <BR> Checks if the expression is in a closed state.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_javax.xml.xquery.XQDynamicContext"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from interface javax.xml.xquery.<A HREF="../../../javax/xml/xquery/XQDynamicContext.html" title="interface in javax.xml.xquery">XQDynamicContext</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindAtomicValue(javax.xml.namespace.QName, java.lang.String, javax.xml.xquery.XQItemType)">bindAtomicValue</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindBoolean(javax.xml.namespace.QName, boolean, javax.xml.xquery.XQItemType)">bindBoolean</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindByte(javax.xml.namespace.QName, byte, javax.xml.xquery.XQItemType)">bindByte</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDocument(javax.xml.namespace.QName, java.io.InputStream, java.lang.String, javax.xml.xquery.XQItemType)">bindDocument</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDocument(javax.xml.namespace.QName, java.io.Reader, java.lang.String, javax.xml.xquery.XQItemType)">bindDocument</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDocument(javax.xml.namespace.QName, javax.xml.transform.Source, javax.xml.xquery.XQItemType)">bindDocument</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDocument(javax.xml.namespace.QName, java.lang.String, java.lang.String, javax.xml.xquery.XQItemType)">bindDocument</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDocument(javax.xml.namespace.QName, javax.xml.stream.XMLStreamReader, javax.xml.xquery.XQItemType)">bindDocument</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDouble(javax.xml.namespace.QName, double, javax.xml.xquery.XQItemType)">bindDouble</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindFloat(javax.xml.namespace.QName, float, javax.xml.xquery.XQItemType)">bindFloat</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindInt(javax.xml.namespace.QName, int, javax.xml.xquery.XQItemType)">bindInt</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindItem(javax.xml.namespace.QName, javax.xml.xquery.XQItem)">bindItem</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindLong(javax.xml.namespace.QName, long, javax.xml.xquery.XQItemType)">bindLong</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindNode(javax.xml.namespace.QName, org.w3c.dom.Node, javax.xml.xquery.XQItemType)">bindNode</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindObject(javax.xml.namespace.QName, java.lang.Object, javax.xml.xquery.XQItemType)">bindObject</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindSequence(javax.xml.namespace.QName, javax.xml.xquery.XQSequence)">bindSequence</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindShort(javax.xml.namespace.QName, short, javax.xml.xquery.XQItemType)">bindShort</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindString(javax.xml.namespace.QName, java.lang.String, javax.xml.xquery.XQItemType)">bindString</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#getImplicitTimeZone()">getImplicitTimeZone</A>, <A HREF="../../../javax/xml/xquery/XQDynamicContext.html#setImplicitTimeZone(java.util.TimeZone)">setImplicitTimeZone</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="cancel()"><!-- --></A><H3> cancel</H3> <PRE> void <B>cancel</B>() throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Attempts to cancel the execution if both the XQuery engine and XQJ driver support aborting the execution of an <code>XQExpression</code>. This method can be used by one thread to cancel an <code>XQExpression</code>, that is being executed in another thread. If cancellation is not supported or the attempt to cancel the execution was not successful, the method returns without any error. If the cancellation is successful, an <code>XQException</code> is thrown, to indicate that it has been aborted, by <code>executeQuery</code>, <code>executeCommand</code> or any method accessing the <code>XQResultSequence</code> returned by <code>executeQuery</code>. If applicable, any open <code>XQResultSequence</code> and <code>XQResultItem</code> objects will also be implicitly closed in this case. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="isClosed()"><!-- --></A><H3> isClosed</H3> <PRE> boolean <B>isClosed</B>()</PRE> <DL> <DD>Checks if the expression is in a closed state. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD><code>true</code> if the expression is in a closed state, <code>false</code> otherwise</DL> </DD> </DL> <HR> <A NAME="close()"><!-- --></A><H3> close</H3> <PRE> void <B>close</B>() throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Closes the expression object and release associated resources. Once the expression is closed, all methods on this object other than the <code>close</code> or <code>isClosed</code> will raise exceptions. This also closes any result sequences obtained from this expression. Calling <code>close</code> on an <code>XQExpression</code> object that is already closed has no effect. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if there are errors when closing the expression</DL> </DD> </DL> <HR> <A NAME="executeCommand(java.lang.String)"><!-- --></A><H3> executeCommand</H3> <PRE> void <B>executeCommand</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> cmd) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Executes an implementation-defined command. Calling this method implicitly closes any previous result sequence obtained from this expression. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cmd</CODE> - the input command as a string <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors when executing the command, or (2) the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="executeCommand(java.io.Reader)"><!-- --></A><H3> executeCommand</H3> <PRE> void <B>executeCommand</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A> cmd) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Executes an implementation-defined command. Calling this method implicitly closes any previous result sequence obtained from this expression. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cmd</CODE> - the input command as a string reader <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors when executing the command, (2) the expression is in a closed state, or (3) the execution is cancelled</DL> </DD> </DL> <HR> <A NAME="executeQuery(java.lang.String)"><!-- --></A><H3> executeQuery</H3> <PRE> <A HREF="../../../javax/xml/xquery/XQResultSequence.html" title="interface in javax.xml.xquery">XQResultSequence</A> <B>executeQuery</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> query) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Executes a query expression. This implicitly closes any previous result sequences obtained from this expression. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>query</CODE> - the input query expression string. Cannot be <code>null</code> <DT><B>Returns:</B><DD>an <code>XQResultSequence</code> object containing the result of the query execution <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors when executing the query, (2) the expression is in a closed state, (3) the execution is cancelled, (4) the query parameter is <code>null</code></DL> </DD> </DL> <HR> <A NAME="executeQuery(java.io.Reader)"><!-- --></A><H3> executeQuery</H3> <PRE> <A HREF="../../../javax/xml/xquery/XQResultSequence.html" title="interface in javax.xml.xquery">XQResultSequence</A> <B>executeQuery</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A> query) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Executes a query expression. This implicitly closes any previous result sequences obtained from this expression. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>query</CODE> - the input query expression as a reader object. Cannot be <code>null</code> <DT><B>Returns:</B><DD>an <code>XQResultSequence</code> object containing the result of the query execution <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors when executing the query, (2) the expression is in a closed state, (3) the execution is cancelled, or (4) the query parameter is <code>null</code></DL> </DD> </DL> <HR> <A NAME="executeQuery(java.io.InputStream)"><!-- --></A><H3> executeQuery</H3> <PRE> <A HREF="../../../javax/xml/xquery/XQResultSequence.html" title="interface in javax.xml.xquery">XQResultSequence</A> <B>executeQuery</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> query) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Executes a query expression. This implicitly closes any previous result sequences obtained from this expression. If the query specifies a version declaration including an encoding, the XQJ implementation may try use this information to parse the query. In absence of the version declaration, the assumed encoding is implementation dependent. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>query</CODE> - the input query expression as a input stream object. Cannot be <code>null</code> <DT><B>Returns:</B><DD>an <code>XQResultSequence</code> containing the result of the query execution <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors when executing the query, (2) the expression is in a closed state, (3) the execution is cancelled, or (4) the xquery parameter is <code>null</code></DL> </DD> </DL> <HR> <A NAME="getStaticContext()"><!-- --></A><H3> getStaticContext</H3> <PRE> <A HREF="../../../javax/xml/xquery/XQStaticContext.html" title="interface in javax.xml.xquery">XQStaticContext</A> <B>getStaticContext</B>() throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Gets an <code>XQStaticContext</code> representing the values for all expression properties. Note that these properties cannot be changed; in order to change, a new <code>XQExpression</code> needs to be created. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an <code>XQStaticContext</code> representing the values for all expression properties <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if the expression is in a closed state</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery"><B>PREV CLASS</B></A> <A HREF="../../../javax/xml/xquery/XQItem.html" title="interface in javax.xml.xquery"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/xml/xquery/XQExpression.html" target="_top"><B>FRAMES</B></A> <A HREF="XQExpression.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright (c) 2004-2011 Saxonica Limited. All rights reserved. </BODY> </HTML>