|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.XQueryStatement
public class XQueryStatement
An immutable XQuery expression which may or may not be namespace aware.
This class wraps the XQuery expression and an optional set of namespace mappings that are used by it. If for example the XQuery statement read:
//c24:party/c24:namethen a namespace mapping should exist for the "c24" prefix.
Constructor Summary | |
---|---|
XQueryStatement(InputStream stream)
Creates a new namespace aware XQuery query stream. |
|
XQueryStatement(InputStream stream,
boolean ignoreDocumentNode,
boolean namespaceAware,
net.sf.saxon.query.ModuleURIResolver moduleResolver)
Creates a new, possibly namespace aware, instance with the specified XQuery query stream. |
|
XQueryStatement(InputStream xqStream,
boolean ignoreDocumentNode,
NamespaceMapping[] namespaces,
net.sf.saxon.query.ModuleURIResolver moduleResolver)
Creates a new instances with the specified XQuery query stream and namespaces If namespaces == null || namespaces.length == 0 then this constructor will create a non-namespace aware
instance. |
|
XQueryStatement(String xquery)
Creates a new namespace aware XQuery query. |
|
XQueryStatement(String xquery,
boolean ignoreDocumentNode,
boolean namespaceAware,
net.sf.saxon.query.ModuleURIResolver moduleResolver)
Creates a new, possibly namespace aware, instance with the specified XQuery query. |
|
XQueryStatement(String xquery,
boolean ignoreDocumentNode,
NamespaceMapping[] namespaces,
net.sf.saxon.query.ModuleURIResolver moduleResolver)
Creates a new instances with the specified XQuery query and namespaces If namespaces == null || namespaces.length == 0 then this constructor will create a non-namespace aware
instance. |
Method Summary | |
---|---|
net.sf.saxon.query.ModuleURIResolver |
getModuleResolver()
Returns the uri resolver to resolve module imports. |
NamespaceMapping |
getNamespace(int index)
Returns the namespace mapping at index . |
int |
getNamespaceCount()
Returns the number of namespace mappings present. |
NamespaceMapping[] |
getNamespaces()
Returns a copy of the array of namespaces held by this object. |
InputStream |
getXQStream()
Returns the XQuery stream. |
String |
getXQuery()
Returns the XQuery query. |
boolean |
isIgnoreDocumentNode()
Whether the document node will be skipped whilst traversing the descendant axis. |
boolean |
isNamespaceAware()
Returns whether this statement is namespace aware. |
void |
setIgnoreDocumentNode(boolean ignoreDocumentNode)
|
void |
setNamespaceAware(boolean namespaceAware)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XQueryStatement(InputStream stream)
The resulting expression will skip the document node whilst traversing the descendant axis.
query
- The XQuery expression.
IllegalArgumentException
- If no XQuery was specified.public XQueryStatement(String xquery)
The resulting expression will skip the document node whilst traversing the descendant axis.
query
- The XQuery expression.
IllegalArgumentException
- If no XQuery was specified.public XQueryStatement(InputStream stream, boolean ignoreDocumentNode, boolean namespaceAware, net.sf.saxon.query.ModuleURIResolver moduleResolver)
If namespaceAware == true
then since no namespace mappings are being specified the XQuery statement
should only use components from the default (i.e. no prefix) namespace.
xquery
- The XQuery statementignoreDocumentNode
- Whether to skip the document node whilst traversing the descendant axis.namespaceAware
- Whether to take account of namespaces.moduleResolver
- to resolve imports in the query.
IllegalArgumentException
- If no XQuery stream was specified.public XQueryStatement(String xquery, boolean ignoreDocumentNode, boolean namespaceAware, net.sf.saxon.query.ModuleURIResolver moduleResolver)
If namespaceAware == true
then since no namespace mappings are being specified the XQuery statement
should only use components from the default (i.e. no prefix) namespace.
xquery
- The XQuery statementignoreDocumentNode
- Whether to skip the document node whilst traversing the descendant axis.namespaceAware
- Whether to take account of namespaces.moduleResolver
- to resolve imports in the query.
IllegalArgumentException
- If no XQuery expression was specified.public XQueryStatement(InputStream xqStream, boolean ignoreDocumentNode, NamespaceMapping[] namespaces, net.sf.saxon.query.ModuleURIResolver moduleResolver)
If namespaces == null || namespaces.length == 0
then this constructor will create a non-namespace aware
instance.
xquery
- The XQuery stream - which can include namespace prefixes.ignoreDocumentNode
- Whether to skip the document node whilst traversing the descendant axis.namespaces
- An optional array of namespace mappings used by the XQuery expression.moduleResolver
- to resolve imports in the query.
IllegalArgumentException
- If no XQuery statement was specified.public XQueryStatement(String xquery, boolean ignoreDocumentNode, NamespaceMapping[] namespaces, net.sf.saxon.query.ModuleURIResolver moduleResolver)
If namespaces == null || namespaces.length == 0
then this constructor will create a non-namespace aware
instance.
xpath
- The XQuery statement - which can include namespace prefixes.ignoreDocumentNode
- Whether to skip the document node whilst traversing the descendant axis.namespaces
- An optional array of namespace mappings used by the XPath statement.moduleResolver
- to resolve imports in the query.
IllegalArgumentException
- If no XQuery statement was specified.Method Detail |
---|
public void setIgnoreDocumentNode(boolean ignoreDocumentNode)
public void setNamespaceAware(boolean namespaceAware)
public InputStream getXQStream()
public String getXQuery()
public boolean isIgnoreDocumentNode()
If this property is set to true
then the XQuery statement should attempt to descend directly from below
the document node and therefore NOT include it's name. This is often required since the name of the document node
(i.e. the root defining element declaration) is not fixed at the point at which the rule is defined on the type.
public boolean isNamespaceAware()
public NamespaceMapping[] getNamespaces()
public int getNamespaceCount()
public NamespaceMapping getNamespace(int index)
index
.
index
- The index of the namespace mapping to return
public net.sf.saxon.query.ModuleURIResolver getModuleResolver()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |