|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectnet.sf.saxon.xqj.SaxonXQExpressionContext
public class SaxonXQExpressionContext
This is a read-only implementation of the XQStaticContext interface that provides information about the static context options selected within the query prolog of a compiled expression.
Note that it only provides information about the main module of the query, library modules have a different static context and this is not available via the XQJ API.
| Constructor Summary | |
|---|---|
SaxonXQExpressionContext(XQueryExpression expression)
|
|
| Method Summary | |
|---|---|
void |
declareNamespace(String prefix,
String uri)
Declares a namespace prefix and associates it with a namespace URI. |
String |
getBaseURI()
Gets the Base URI, if set in the static context, else the empty string. |
int |
getBindingMode()
Gets the value of the binding mode property. |
int |
getBoundarySpacePolicy()
Gets the boundary-space policy defined in the static context. |
int |
getConstructionMode()
Gets the construction mode defined in the static context. |
javax.xml.xquery.XQItemType |
getContextItemStaticType()
Gets the static type of the context item. |
int |
getCopyNamespacesModeInherit()
Gets the inherit part of the copy-namespaces mode defined in the static context. |
int |
getCopyNamespacesModePreserve()
Gets the preserve part of the copy-namespaces mode defined in the static context. |
String |
getDefaultCollation()
Gets the URI of the default collation. |
String |
getDefaultElementTypeNamespace()
Gets the URI of the default element/type namespace, the empty string if not set. |
String |
getDefaultFunctionNamespace()
Gets the URI of the default function namespace, the empty string if not set. |
int |
getDefaultOrderForEmptySequences()
Gets the default order for empty sequences defined in the static context. |
int |
getHoldability()
Gets the value of the holdability property. |
String[] |
getNamespacePrefixes()
Returns the prefixes of all the statically known namespaces. |
String |
getNamespaceURI(String prefix)
Retrieves the namespace URI associated with a prefix. |
int |
getOrderingMode()
Gets the ordering mode defined in the static context. |
int |
getQueryLanguageTypeAndVersion()
Gets the value of the language type and version property. |
int |
getQueryTimeout()
Retrieves the number of seconds an implementation will wait for a query to execute. |
int |
getScrollability()
Gets the value of the scrollability property. |
void |
setBaseURI(String baseUri)
Sets the Base URI in the static context, specify the empty string to make it undefined. |
void |
setBindingMode(int bindingMode)
Sets the binding mode property. |
void |
setBoundarySpacePolicy(int policy)
Sets the boundary-space policy in the static context. |
void |
setConstructionMode(int mode)
Sets the construction mode in the static context. |
void |
setContextItemStaticType(javax.xml.xquery.XQItemType contextItemType)
Sets the static type of the context item, specify null
to make it unspecified. |
void |
setCopyNamespacesModeInherit(int mode)
Sets the inherit part of the copy-namespaces mode in the static context. |
void |
setCopyNamespacesModePreserve(int mode)
Sets the preserve part of the copy-namespaces mode in the static context. |
void |
setDefaultCollation(String uri)
Sets the URI of the default collation. |
void |
setDefaultElementTypeNamespace(String uri)
Sets the URI of the default element/type namespace, the empty string to make it unspecified. |
void |
setDefaultFunctionNamespace(String uri)
Sets the URI of the default function namespace, the empty string to make it unspecified. |
void |
setDefaultOrderForEmptySequences(int order)
Sets the default order for empty sequences in the static context. |
void |
setHoldability(int holdability)
Sets the holdability property. |
void |
setOrderingMode(int mode)
Sets the ordering mode in the static context. |
void |
setQueryLanguageTypeAndVersion(int langType)
Sets the input query language type and version. |
void |
setQueryTimeout(int seconds)
Sets the number of seconds an implementation will wait for a query to execute. |
void |
setScrollability(int scrollability)
Sets the scrollability of the result sequence. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SaxonXQExpressionContext(XQueryExpression expression)
| Method Detail |
|---|
public void declareNamespace(String prefix,
String uri)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
declareNamespace in interface javax.xml.xquery.XQStaticContextprefix - the prefix for the namespace URIuri - the namespace URI. An empty string
undeclares the specific prefix. Cannot be null
javax.xml.xquery.XQException - if (1) a null prefix, or (2) a null namespace
URI is specifiedpublic String getBaseURI()
javax.xml.xquery.XQStaticContext
getBaseURI in interface javax.xml.xquery.XQStaticContextnull..public int getBindingMode()
javax.xml.xquery.XQStaticContext
getBindingMode in interface javax.xml.xquery.XQStaticContextXQConstants.BINDING_MODE_IMMEDIATE,
orXQConstants.BINDING_MODE_DEFERRED.public int getBoundarySpacePolicy()
javax.xml.xquery.XQStaticContext
getBoundarySpacePolicy in interface javax.xml.xquery.XQStaticContextXQConstants.BOUNDARY_SPACE_PRESERVE,
XQConstants.BOUNDARY_SPACE_STRIP.public int getConstructionMode()
javax.xml.xquery.XQStaticContext
getConstructionMode in interface javax.xml.xquery.XQStaticContextXQConstants.CONSTRUCTION_MODE_PRESERVE,
XQConstants.CONSTRUCTION_MODE_STRIPpublic javax.xml.xquery.XQItemType getContextItemStaticType()
javax.xml.xquery.XQStaticContextnull if unspecified.
getContextItemStaticType in interface javax.xml.xquery.XQStaticContextnullpublic int getCopyNamespacesModeInherit()
javax.xml.xquery.XQStaticContext
getCopyNamespacesModeInherit in interface javax.xml.xquery.XQStaticContextXQConstants.COPY_NAMESPACES_MODE_INHERIT,
XQConstants.COPY_NAMESPACES_MODE_NO_INHERIT.public int getCopyNamespacesModePreserve()
javax.xml.xquery.XQStaticContext
getCopyNamespacesModePreserve in interface javax.xml.xquery.XQStaticContextXQConstants.COPY_NAMESPACES_MODE_PRESERVE,
XQConstants.COPY_NAMESPACES_MODE_NO_PRESERVE.public String getDefaultCollation()
javax.xml.xquery.XQStaticContext
getDefaultCollation in interface javax.xml.xquery.XQStaticContextnull.public String getDefaultElementTypeNamespace()
javax.xml.xquery.XQStaticContext
getDefaultElementTypeNamespace in interface javax.xml.xquery.XQStaticContextnullpublic String getDefaultFunctionNamespace()
javax.xml.xquery.XQStaticContext
getDefaultFunctionNamespace in interface javax.xml.xquery.XQStaticContextnullpublic int getDefaultOrderForEmptySequences()
javax.xml.xquery.XQStaticContext
getDefaultOrderForEmptySequences in interface javax.xml.xquery.XQStaticContextXQConstants.DEFAULT_ORDER_FOR_EMPTY_SEQUENCES_GREATEST,
XQConstants.DEFAULT_ORDER_FOR_EMPTY_SEQUENCES_LEAST.public int getHoldability()
javax.xml.xquery.XQStaticContext
getHoldability in interface javax.xml.xquery.XQStaticContextXQConstants.HOLDTYPE_HOLD_CURSORS_OVER_COMMIT,
or XQConstants.HOLDTYPE_CLOSE_CURSORS_AT_COMMIT.public String[] getNamespacePrefixes()
javax.xml.xquery.XQStaticContextgetNamespaceURI method to look up the namespace URI
corresponding to a specific prefix.
getNamespacePrefixes in interface javax.xml.xquery.XQStaticContextString array containing the namespace prefixes.
Cannot be null
public String getNamespaceURI(String prefix)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContextXQException
is thrown if an unknown prefix is specified, i.e. a prefix not returned by the
getInScopeNamespacePrefixes method.
getNamespaceURI in interface javax.xml.xquery.XQStaticContextprefix - the prefix for which the namespace URI is sought. Cannot
be null
null
javax.xml.xquery.XQException - if a null prefix is specified or if the prefix
is unknownpublic int getOrderingMode()
javax.xml.xquery.XQStaticContext
getOrderingMode in interface javax.xml.xquery.XQStaticContextXQConstants.ORDERING_MODE_ORDERED,
XQConstants.ORDERING_MODE_UNORDERED.public int getQueryLanguageTypeAndVersion()
javax.xml.xquery.XQStaticContextXQConstants.LANGTYPE_XQUERY.
getQueryLanguageTypeAndVersion in interface javax.xml.xquery.XQStaticContextXQConstants.LANGTYPE_XQUERY,
or XQConstants.LANGTYPE_XQUERYX
or a negative value indicating a vendor specific
query language type and version.public int getQueryTimeout()
javax.xml.xquery.XQStaticContext
getQueryTimeout in interface javax.xml.xquery.XQStaticContextpublic int getScrollability()
javax.xml.xquery.XQStaticContext
getScrollability in interface javax.xml.xquery.XQStaticContextXQConstants.SCROLLTYPE_FORWARD_ONLY, or
XQConstants.SCROLLTYPE_SCROLLABLE.
public void setBaseURI(String baseUri)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setBaseURI in interface javax.xml.xquery.XQStaticContextbaseUri - the new baseUri, or empty string to make it undefined.
Cannot be null.
javax.xml.xquery.XQException - if a null base uri is specified
public void setBindingMode(int bindingMode)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setBindingMode in interface javax.xml.xquery.XQStaticContextbindingMode - the binding mode. One of:
XQConstants.BINDING_MODE_IMMEDIATE,
orXQConstants.BINDING_MODE_DEFERRED.
javax.xml.xquery.XQException - the specified mode is different from
XQConstants.BINDING_MODE_IMMEDIATE,
XQConstants.BINDING_MODE_DEFERRED
public void setBoundarySpacePolicy(int policy)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setBoundarySpacePolicy in interface javax.xml.xquery.XQStaticContextpolicy - boundary space policy. One of:
XQConstants.BOUNDARY_SPACE_PRESERVE,
XQConstants.BOUNDARY_SPACE_STRIP.
javax.xml.xquery.XQException - the specified mode is different from
XQConstants.BOUNDARY_SPACE_PRESERVE,
XQConstants.BOUNDARY_SPACE_STRIP
public void setConstructionMode(int mode)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setConstructionMode in interface javax.xml.xquery.XQStaticContextmode - construction mode value. One of:
XQConstants.CONSTRUCTION_MODE_PRESERVE,
XQConstants.CONSTRUCTION_MODE_STRIP.
javax.xml.xquery.XQException - the specified mode is different from
XQConstants.CONSTRUCTION_MODE_PRESERVE,
XQConstants.CONSTRUCTION_MODE_STRIPpublic void setContextItemStaticType(javax.xml.xquery.XQItemType contextItemType)
javax.xml.xquery.XQStaticContextnull
to make it unspecified.
setContextItemStaticType in interface javax.xml.xquery.XQStaticContextcontextItemType - the static type of the context item;
null if unspecified.
public void setCopyNamespacesModeInherit(int mode)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setCopyNamespacesModeInherit in interface javax.xml.xquery.XQStaticContextmode - ordering mode value. One of:
XQConstants.COPY_NAMESPACES_MODE_INHERIT,
XQConstants.COPY_NAMESPACES_MODE_NO_INHERIT.
javax.xml.xquery.XQException - the specified mode is different from
XQConstants.COPY_NAMESPACES_MODE_INHERIT,
XQConstants.COPY_NAMESPACES_MODE_NO_INHERIT
public void setCopyNamespacesModePreserve(int mode)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setCopyNamespacesModePreserve in interface javax.xml.xquery.XQStaticContextmode - ordering mode value. One of:
XQConstants.COPY_NAMESPACES_MODE_PRESERVE,
XQConstants.COPY_NAMESPACES_MODE_NO_PRESERVE.
javax.xml.xquery.XQException - the specified mode is different from
XQConstants.COPY_NAMESPACES_MODE_PRESERVE,
XQConstants.COPY_NAMESPACES_MODE_NO_PRESERVE
public void setDefaultCollation(String uri)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setDefaultCollation in interface javax.xml.xquery.XQStaticContexturi - the namespace URI of the default collation.
Cannot be null.
javax.xml.xquery.XQException - if a null URI is specified
public void setDefaultElementTypeNamespace(String uri)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setDefaultElementTypeNamespace in interface javax.xml.xquery.XQStaticContexturi - the namespace URI of the default element/type namespace,
the empty string to make it unspecified.
Cannot be null.
javax.xml.xquery.XQException - if a null uri is specified
public void setDefaultFunctionNamespace(String uri)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setDefaultFunctionNamespace in interface javax.xml.xquery.XQStaticContexturi - the namespace URI of the default function namespace,
the empty string to make it unspecified.
Cannot be null.
javax.xml.xquery.XQException - if a null URI is specified
public void setDefaultOrderForEmptySequences(int order)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setDefaultOrderForEmptySequences in interface javax.xml.xquery.XQStaticContextorder - the default order for empty sequences. One of:
XQConstants.DEFAULT_ORDER_FOR_EMPTY_SEQUENCES_GREATEST,
XQConstants.DEFAULT_ORDER_FOR_EMPTY_SEQUENCES_LEAST.
javax.xml.xquery.XQException - the specified order for empty sequences is different from
XQConstants.DEFAULT_ORDER_FOR_EMPTY_SEQUENCES_GREATEST,
XQConstants.DEFAULT_ORDER_FOR_EMPTY_SEQUENCES_LEAST
public void setHoldability(int holdability)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setHoldability in interface javax.xml.xquery.XQStaticContextholdability - the holdability of the result. One of:
XQConstants.HOLDTYPE_HOLD_CURSORS_OVER_COMMIT,
or XQConstants.HOLDTYPE_CLOSE_CURSORS_AT_COMMIT.
javax.xml.xquery.XQException - the specified holdability is different from
XQConstants.HOLDTYPE_HOLD_CURSORS_OVER_COMMIT,
XQConstants.HOLDTYPE_CLOSE_CURSORS_AT_COMMIT
public void setOrderingMode(int mode)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setOrderingMode in interface javax.xml.xquery.XQStaticContextmode - ordering mode value. One of:
XQConstants.ORDERING_MODE_ORDERED,
XQConstants.ORDERING_MODE_UNORDERED.
javax.xml.xquery.XQException - the specified mode is different from
XQConstants.ORDERING_MODE_ORDERED,
XQConstants.ORDERING_MODE_UNORDERED
public void setQueryLanguageTypeAndVersion(int langType)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setQueryLanguageTypeAndVersion in interface javax.xml.xquery.XQStaticContextlangType - the query language type and version of the
inputs. One of: XQConstants.LANGTYPE_XQUERY
(default), or XQConstants.LANGTYPE_XQUERYX.
A negative number indicates a vendor specific
query language type and version.
javax.xml.xquery.XQException - the specified langtype is different from
XQConstants.LANGTYPE_XQUERY,
XQConstants.LANGTYPE_XQUERYX and is not negative
public void setQueryTimeout(int seconds)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setQueryTimeout in interface javax.xml.xquery.XQStaticContextseconds - the query execution timeout value in seconds.
A value of 0 indicates no limit
javax.xml.xquery.XQException - if the passed in value is negative
public void setScrollability(int scrollability)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQStaticContext
setScrollability in interface javax.xml.xquery.XQStaticContextscrollability - the scrollability of the result. One of:
XQConstants.SCROLLTYPE_FORWARD_ONLY, or
XQConstants.SCROLLTYPE_SCROLLABLE.
javax.xml.xquery.XQException - the specified crollability type is different from
XQConstants.SCROLLTYPE_FORWARD_ONLY,
XQConstants.SCROLLTYPE_SCROLLABLE
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||