public class Compiler extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Compiler.SearchStrategy |
| Constructor and Description |
|---|
Compiler(IndexConfiguration config)
Creates a Compiler configured according to the given
IndexConfiguration. |
Compiler(net.sf.saxon.s9api.Processor processor,
IndexConfiguration indexConfig)
Creates a Compiler using the provided
Processor and IndexConfiguration. |
| Modifier and Type | Method and Description |
|---|---|
net.sf.saxon.s9api.XQueryExecutable |
compile(String exprString)
Compiles the XQuery expression (main module) using a Saxon
XQueryCompiler, then translates it into a mutable AbstractExpression
tree using a SaxonTranslator, optimizes it with a PathOptimizer, and then re-serializes and re-compiles. |
net.sf.saxon.s9api.XQueryExecutable |
compile(String exprString,
ErrorListener errorListener) |
net.sf.saxon.s9api.XQueryExecutable |
compile(String exprString,
ErrorListener errorListener,
URI baseURI)
Compiles an XQuery expression, returning a Saxon XQueryExecutable.
|
void |
compileFieldExpressions()
Save an AbstractExpression version of each XPathField's xpath, for use when optimizing.
|
net.sf.saxon.lib.CollectionURIResolver |
getDefaultCollectionURIResolver() |
FieldDefinition |
getFieldForExpr(AbstractExpression fieldExpr) |
List<AbstractExpression> |
getFieldLeaves(AbstractExpression leafExpr) |
IndexConfiguration |
getIndexConfiguration() |
XQuery |
getLastOptimized() |
net.sf.saxon.s9api.Processor |
getProcessor() |
Compiler.SearchStrategy |
getSearchStrategy() |
String |
getUriFieldName() |
net.sf.saxon.s9api.XPathCompiler |
getXPathCompiler() |
net.sf.saxon.s9api.XQueryCompiler |
getXQueryCompiler() |
net.sf.saxon.s9api.XsltCompiler |
getXsltCompiler() |
boolean |
isSaxonLicensed() |
SaxonTranslator |
makeTranslator() |
void |
setSearchStrategy(Compiler.SearchStrategy searchStrategy) |
public Compiler(IndexConfiguration config)
IndexConfiguration.
A Saxon Processor is generated using the installed version of Saxon. If a licensed version of Saxon
(PE or EE) is installed, the presence of a license is asserted so as to enable the use of licensed Saxon features.config - the index configurationpublic Compiler(net.sf.saxon.s9api.Processor processor,
IndexConfiguration indexConfig)
Processor and IndexConfiguration.processor - the Saxon ProcessorindexConfig - the index configurationpublic net.sf.saxon.s9api.XQueryExecutable compile(String exprString) throws LuxException
XQueryCompiler, then translates it into a mutable AbstractExpression
tree using a SaxonTranslator, optimizes it with a PathOptimizer, and then re-serializes and re-compiles.exprString - the XQuery sourceLuxException - if any error occurs while compiling, such as a static XQuery error or syntax error.public net.sf.saxon.s9api.XQueryExecutable compile(String exprString, ErrorListener errorListener) throws LuxException
LuxExceptionpublic net.sf.saxon.s9api.XQueryExecutable compile(String exprString, ErrorListener errorListener, URI baseURI) throws LuxException
exprString - the expression to compileerrorListener - receives any errors generated while compiling; may be null, in which case
any errors generated will be lostbaseURI - the base URI of the compiled queryLuxException - when a compilation error occurs. The message is typically unhelpful; meaningful errors
are stored in the errorListenerpublic net.sf.saxon.s9api.XsltCompiler getXsltCompiler()
public net.sf.saxon.s9api.XQueryCompiler getXQueryCompiler()
public net.sf.saxon.s9api.XPathCompiler getXPathCompiler()
public IndexConfiguration getIndexConfiguration()
public net.sf.saxon.s9api.Processor getProcessor()
public SaxonTranslator makeTranslator()
public net.sf.saxon.lib.CollectionURIResolver getDefaultCollectionURIResolver()
public String getUriFieldName()
public Compiler.SearchStrategy getSearchStrategy()
public void setSearchStrategy(Compiler.SearchStrategy searchStrategy)
public boolean isSaxonLicensed()
public XQuery getLastOptimized()
public List<AbstractExpression> getFieldLeaves(AbstractExpression leafExpr)
public FieldDefinition getFieldForExpr(AbstractExpression fieldExpr)
public void compileFieldExpressions()
Copyright © 2013. All Rights Reserved.