|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlux.Compiler
public class Compiler
Compiles XQuery using Saxon's compiler and optimizes it for use with a Lucene index. This class is thread-safe, and should be re-used for multiple queries.
| Nested Class Summary | |
|---|---|
static class |
Compiler.SearchStrategy
|
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
net.sf.saxon.lib.CollectionURIResolver |
getDefaultCollectionURIResolver()
|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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 configuration
public Compiler(net.sf.saxon.s9api.Processor processor,
IndexConfiguration indexConfig)
Processor and IndexConfiguration.
processor - the Saxon ProcessorindexConfig - the index configuration| Method Detail |
|---|
public 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 source
LuxException - 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
LuxException
public 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 query
LuxException - 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||