Package com.saxonica.xqj
Class SaxonXQExpression
- java.lang.Object
- 
- com.saxonica.xqj.Closable
- 
- com.saxonica.xqj.SaxonXQDynamicContext
- 
- com.saxonica.xqj.SaxonXQExpression
 
 
 
- 
- All Implemented Interfaces:
- XQDynamicContext,- XQExpression
 
 public class SaxonXQExpression extends SaxonXQDynamicContext implements XQExpression Saxon implementation of the XQJ XQExpression interface
- 
- 
Field Summary- 
Fields inherited from class com.saxonica.xqj.SaxonXQDynamicContextconnection
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Attempts to cancel the execution if both the XQuery engine and XQJ driver support aborting the execution of anXQExpression.voidexecuteCommand(java.io.Reader command)Executes an implementation-defined command.voidexecuteCommand(java.lang.String command)Executes an implementation-defined command.XQResultSequenceexecuteQuery(java.io.InputStream query)Executes a query expression.XQResultSequenceexecuteQuery(java.io.Reader query)Executes a query expression.XQResultSequenceexecuteQuery(java.lang.String query)Executes a query expression.protected booleanexternalVariableExists(javax.xml.namespace.QName name)protected SaxonXQDataFactorygetDataFactory()protected DynamicQueryContextgetDynamicContext()XQStaticContextgetStaticContext()Gets anXQStaticContextrepresenting the values for all expression properties.- 
Methods inherited from class com.saxonica.xqj.SaxonXQDynamicContextbindAtomicValue, bindBoolean, bindByte, bindDocument, bindDocument, bindDocument, bindDocument, bindDocument, bindDouble, bindFloat, bindInt, bindItem, bindLong, bindNode, bindObject, bindSequence, bindShort, bindString, getConfiguration, getImplicitTimeZone, setImplicitTimeZone
 - 
Methods inherited from class com.saxonica.xqj.Closableclose, isClosed, setClosableContainer
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface javax.xml.xquery.XQDynamicContextbindAtomicValue, bindBoolean, bindByte, bindDocument, bindDocument, bindDocument, bindDocument, bindDocument, bindDouble, bindFloat, bindInt, bindItem, bindLong, bindNode, bindObject, bindSequence, bindShort, bindString, getImplicitTimeZone, setImplicitTimeZone
 - 
Methods inherited from interface javax.xml.xquery.XQExpressionclose, isClosed
 
- 
 
- 
- 
- 
Method Detail- 
getDynamicContextprotected DynamicQueryContext getDynamicContext() - Specified by:
- getDynamicContextin class- SaxonXQDynamicContext
 
 - 
getDataFactoryprotected SaxonXQDataFactory getDataFactory() - Specified by:
- getDataFactoryin class- SaxonXQDynamicContext
 
 - 
cancelpublic void cancel() throws XQExceptionDescription copied from interface:XQExpressionAttempts to cancel the execution if both the XQuery engine and XQJ driver support aborting the execution of anXQExpression. This method can be used by one thread to cancel anXQExpression, 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, anXQExceptionis thrown, to indicate that it has been aborted, byexecuteQuery,executeCommandor any method accessing theXQResultSequencereturned byexecuteQuery. If applicable, any openXQResultSequenceandXQResultItemobjects will also be implicitly closed in this case.- Specified by:
- cancelin interface- XQExpression
- Throws:
- XQException- if the expression is in a closed state
 
 - 
executeCommandpublic void executeCommand(java.io.Reader command) throws XQExceptionDescription copied from interface:XQExpressionExecutes an implementation-defined command. Calling this method implicitly closes any previous result sequence obtained from this expression.- Specified by:
- executeCommandin interface- XQExpression
- Parameters:
- command- the input command as a string reader
- Throws:
- XQException- if (1) there are errors when executing the command, (2) the expression is in a closed state, or (3) the execution is cancelled
 
 - 
executeCommandpublic void executeCommand(java.lang.String command) throws XQExceptionDescription copied from interface:XQExpressionExecutes an implementation-defined command. Calling this method implicitly closes any previous result sequence obtained from this expression.- Specified by:
- executeCommandin interface- XQExpression
- Parameters:
- command- the input command as a string
- Throws:
- XQException- if (1) there are errors when executing the command, or (2) the expression is in a closed state
 
 - 
executeQuerypublic XQResultSequence executeQuery(java.io.InputStream query) throws XQException Description copied from interface:XQExpressionExecutes 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. - Specified by:
- executeQueryin interface- XQExpression
- Parameters:
- query- the input query expression as a input stream object. Cannot be- null
- Returns:
- an XQResultSequencecontaining the result of the query execution
- Throws:
- XQException- 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- null
 
 - 
executeQuerypublic XQResultSequence executeQuery(java.io.Reader query) throws XQException Description copied from interface:XQExpressionExecutes a query expression. This implicitly closes any previous result sequences obtained from this expression.- Specified by:
- executeQueryin interface- XQExpression
- Parameters:
- query- the input query expression as a reader object. Cannot be- null
- Returns:
- an XQResultSequenceobject containing the result of the query execution
- Throws:
- XQException- 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- null
 
 - 
executeQuerypublic XQResultSequence executeQuery(java.lang.String query) throws XQException Description copied from interface:XQExpressionExecutes a query expression. This implicitly closes any previous result sequences obtained from this expression.- Specified by:
- executeQueryin interface- XQExpression
- Parameters:
- query- the input query expression string. Cannot be- null
- Returns:
- an XQResultSequenceobject containing the result of the query execution
- Throws:
- XQException- 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- null
 
 - 
getStaticContextpublic XQStaticContext getStaticContext() throws XQException Description copied from interface:XQExpressionGets anXQStaticContextrepresenting the values for all expression properties. Note that these properties cannot be changed; in order to change, a newXQExpressionneeds to be created.- Specified by:
- getStaticContextin interface- XQExpression
- Returns:
- an XQStaticContextrepresenting the values for all expression properties
- Throws:
- XQException- if the expression is in a closed state
 
 - 
externalVariableExistsprotected boolean externalVariableExists(javax.xml.namespace.QName name) - Specified by:
- externalVariableExistsin class- SaxonXQDynamicContext
 
 
- 
 
-