|
Nux 1.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nux.xom.pool.XQueryFactory
public class 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 DocumentURIResolver and character encoding. |
Method Summary | |
---|---|
XQuery |
createXQuery(File query)
Creates and returns a new XQuery for the given input
query. |
XQuery |
createXQuery(File query,
URI baseURI)
Creates and returns a new XQuery for the given input
query, using the given base URI. |
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 non-validating default resolution is used.Method Detail |
---|
public XQuery createXQuery(File query) throws XQueryException, IOException
XQuery
for the given input
query. Equivalent to createXQuery(query, query.toURI())
.
query
- the query to compile
IOException
- if an I/O error occured while reading the query from the file
XQueryException
- if the query has a syntax error, or if it references
namespaces, variables, or functions that have not been
declared, or contains other static errors such as type mismatches.public XQuery createXQuery(File query, URI baseURI) throws XQueryException, IOException
XQuery
for the given input
query, using the given base URI.
query
- the query to compilebaseURI
- an absolute URI, used when necessary in the resolution of
relative URIs found in the query. Used by the XQuery
doc
function, and hence the resolver. May be
null
in which case it defaults to the current
working directory.
IOException
- if an I/O error occured while reading the query from the file
XQueryException
- if the query has a syntax error, or if it references
namespaces, variables, or functions that have not been
declared, or contains other static errors such as type mismatches.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
- an absolute URI, used when necessary in the resolution of
relative URIs found in the query. Used by the XQuery
doc
function, and hence the resolver. May be
null
in which case it defaults to the current
XQueryException
- if the query has a syntax error, or if it references
namespaces, variables, or functions that have not been
declared, or contains other static errors such as type mismatches.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
- an absolute URI, used when necessary in the resolution of
relative URIs found in the query. Used by the XQuery
doc
function, and hence the resolver. May be
null
in which case it defaults to the current
working directory.
Need not be the stream's actual URI.
IOException
- if an I/O error occurs while reading the query from the
stream
XQueryException
- if the query has a syntax error, or if it references
namespaces, variables, or functions that have not been
declared, or contains other static errors such as type mismatches.
|
Nux 1.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |