|
Nux 1.0a5 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnux.xom.pool.XQueryFactory
Creates and returns new XQuery
objects using flexible parametrization (thread-safe).
This implementation is thread-safe.
Constructor Summary | |
XQueryFactory()
Equivalent to new XQueryFactory(null, null) . |
|
XQueryFactory(Charset charset,
DocumentURIResolver resolver)
Creates a factory instance that uses the given DocumentResolver and character encoding. |
Method Summary | |
XQuery |
createXQuery(File query)
Creates and returns a new XQuery for the given input
query. |
XQuery |
createXQuery(InputStream query,
URI baseURI)
Creates and returns a new XQuery for the given input
query, using the given base URI. |
XQuery |
createXQuery(String query,
URI baseURI)
Creates and returns a new XQuery for the given input
query, using the given base URI. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XQueryFactory()
new XQueryFactory(null, null)
.
public XQueryFactory(Charset charset, DocumentURIResolver resolver)
charset
- the charset to convert byte streams to a query string, e.g.
Charset.forName("UTF-8")
. May be
null
in which case the system's default
platform encoding is used.resolver
- an object that is called by the XQuery processor to turn a URI
passed to the XQuery doc()
function into a XOM
Document
. May be null
in which case
Saxon's default resolution is used.Method Detail |
public XQuery createXQuery(File query) throws XQueryException, IOException
XQuery
for the given input
query.
query
- the query to compile
IOException
- if an I/O error occured while reading the query from the file
XQueryException
- if the query cannot be compiled, e.g. due too a syntax error.public XQuery createXQuery(String query, URI baseURI) throws XQueryException
XQuery
for the given input
query, using the given base URI.
If desired, overrride this default implementation to construct and return a custom object or a custom XQuery subclass.
query
- the query to compilebaseURI
- the base URI of the query (may be null
)
XQueryException
- if the query cannot be compiled, e.g. due too a syntax error.public XQuery createXQuery(InputStream query, URI baseURI) throws XQueryException, IOException
XQuery
for the given input
query, using the given base URI.
query
- the query to compilebaseURI
- the base URI of the query (may be null
)
IOException
- if an I/O error occurs while reading the query from the
stream
XQueryException
- if the query cannot be compiled, e.g. due too a syntax error.
|
Nux 1.0a5 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |