com.metamatrix.query.xquery.saxon
Class SaxonXQueryExpression

java.lang.Object
  extended by com.metamatrix.query.xquery.saxon.SaxonXQueryExpression
All Implemented Interfaces:
XQueryExpression

public class SaxonXQueryExpression
extends java.lang.Object
implements XQueryExpression

Saxon implementation of MetaMatrix XQueryExpression


Constructor Summary
SaxonXQueryExpression()
           
 
Method Summary
 void compileXQuery(java.lang.String xQueryString)
          Return the compiled XQueryExpression - the result of this call should be used as a parameter to the getDocumentNames and evaluateXQuery methods.
 java.sql.SQLXML evaluateXQuery(XQuerySQLEvaluator sqlEval)
          Evaluate the XQuery and return results.
 void setParameters(java.util.Map params)
          Set external parameter values.
 void setXMLFormat(java.lang.String xmlFormat)
          This method sets whether the documents should be returned in compact format (no extraneous whitespace).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaxonXQueryExpression

public SaxonXQueryExpression()
Method Detail

compileXQuery

public void compileXQuery(java.lang.String xQueryString)
                   throws MetaMatrixProcessingException
Description copied from interface: XQueryExpression
Return the compiled XQueryExpression - the result of this call should be used as a parameter to the getDocumentNames and evaluateXQuery methods. A null return value is interpreted to mean that XQueries are not supported by this engine at all.

Specified by:
compileXQuery in interface XQueryExpression
Parameters:
xQueryString - the original XQuery String
Throws:
MetaMatrixProcessingException - if xQueryString is invalid and fails to compile
See Also:
com.metamatrix.query.xquery.XQueryEngine#compileXQuery(java.lang.String)

evaluateXQuery

public java.sql.SQLXML evaluateXQuery(XQuerySQLEvaluator sqlEval)
                               throws MetaMatrixProcessingException,
                                      MetaMatrixComponentException
Description copied from interface: XQueryExpression
Evaluate the XQuery and return results. A null return value is interpreted to mean that XQueries are not supported by this engine.

Specified by:
evaluateXQuery in interface XQueryExpression
Returns:
retuns a result SQLXML object.
Throws:
MetaMatrixProcessingException - if xQueryString is invalid and fails to compile
MetaMatrixComponentException
See Also:
com.metamatrix.query.xquery.XQueryEngine#evaluateXQuery(com.metamatrix.query.xquery.XQueryExpression)

setXMLFormat

public void setXMLFormat(java.lang.String xmlFormat)
This method sets whether the documents should be returned in compact format (no extraneous whitespace). Non-compact format is more human-readable (and bigger). Additional formats may be possible in future.

Specified by:
setXMLFormat in interface XQueryExpression
Parameters:
xmlFormat - A string giving the format in which xml results need to be returned

setParameters

public void setParameters(java.util.Map params)
Description copied from interface: XQueryExpression
Set external parameter values. These much match up to declared external variables in the xquery expression itself. For example, xml literal inputs need to be declared like this in the prolog: declare variable $input as node() external;

Specified by:
setParameters in interface XQueryExpression
Parameters:
params - Map of parameter name -> value
Since:
4.3
See Also:
XQueryExpression.setParameters(java.util.Map)


Copyright © 2009. All Rights Reserved.