|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.api.xqj.BXQStaticContext
public class BXQStaticContext
Java XQuery API - Static Context.
Constructor Summary | |
---|---|
BXQStaticContext()
|
Method Summary | |
---|---|
void |
declareNamespace(java.lang.String prefix,
java.lang.String uri)
Declares a namespace prefix and associates it with a namespace URI. |
java.lang.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. |
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. |
java.lang.String |
getDefaultCollation()
Gets the URI of the default collation. |
java.lang.String |
getDefaultElementTypeNamespace()
Gets the URI of the default element/type namespace, the empty string if not set. |
java.lang.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. |
java.lang.String[] |
getNamespacePrefixes()
Returns the prefixes of all the statically known namespaces. |
java.lang.String |
getNamespaceURI(java.lang.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(java.lang.String baseUri)
Sets the Base URI in the static context, specify the empty string to make it undefined. |
void |
setBindingMode(int mode)
Sets the binding mode property. |
void |
setBoundarySpacePolicy(int mode)
Sets the boundary-space policy in the static context. |
void |
setConstructionMode(int mode)
Sets the construction mode in the static context. |
void |
setContextItemStaticType(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 m)
Sets the preserve part of the copy-namespaces mode in the static context. |
void |
setDefaultCollation(java.lang.String uri)
Sets the URI of the default collation. |
void |
setDefaultElementTypeNamespace(java.lang.String uri)
Sets the URI of the default element/type namespace, the empty string to make it unspecified. |
void |
setDefaultFunctionNamespace(java.lang.String uri)
Sets the URI of the default function namespace, the empty string to make it unspecified. |
void |
setDefaultOrderForEmptySequences(int mode)
Sets the default order for empty sequences in the static context. |
void |
setHoldability(int hold)
Sets the holdability property. |
void |
setOrderingMode(int mode)
Sets the ordering mode in the static context. |
void |
setQueryLanguageTypeAndVersion(int m)
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 mode)
Sets the scrollability of the result sequence. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BXQStaticContext()
Method Detail |
---|
public void declareNamespace(java.lang.String prefix, java.lang.String uri) throws XQException
XQStaticContext
declareNamespace
in interface XQStaticContext
prefix
- the prefix for the namespace URIuri
- the namespace URI. An empty string
undeclares the specific prefix. Cannot be null
.
XQException
- if (1) a null
prefix, or (2) a null
namespace
URI is specifiedpublic java.lang.String getBaseURI()
XQStaticContext
getBaseURI
in interface XQStaticContext
null
..public int getBindingMode()
XQStaticContext
getBindingMode
in interface XQStaticContext
XQConstants.BINDING_MODE_IMMEDIATE
,
orXQConstants.BINDING_MODE_DEFERRED
.public int getBoundarySpacePolicy()
XQStaticContext
getBoundarySpacePolicy
in interface XQStaticContext
XQConstants.BOUNDARY_SPACE_PRESERVE
,
XQConstants.BOUNDARY_SPACE_STRIP
.public int getConstructionMode()
XQStaticContext
getConstructionMode
in interface XQStaticContext
XQConstants.CONSTRUCTION_MODE_PRESERVE
,
XQConstants.CONSTRUCTION_MODE_STRIP
public XQItemType getContextItemStaticType()
XQStaticContext
null
if unspecified.
getContextItemStaticType
in interface XQStaticContext
null
public int getCopyNamespacesModeInherit()
XQStaticContext
getCopyNamespacesModeInherit
in interface XQStaticContext
XQConstants.COPY_NAMESPACES_MODE_INHERIT
,
XQConstants.COPY_NAMESPACES_MODE_NO_INHERIT
.public int getCopyNamespacesModePreserve()
XQStaticContext
getCopyNamespacesModePreserve
in interface XQStaticContext
XQConstants.COPY_NAMESPACES_MODE_PRESERVE
,
XQConstants.COPY_NAMESPACES_MODE_NO_PRESERVE
.public java.lang.String getDefaultCollation()
XQStaticContext
getDefaultCollation
in interface XQStaticContext
null
.public java.lang.String getDefaultElementTypeNamespace()
XQStaticContext
getDefaultElementTypeNamespace
in interface XQStaticContext
null
.public java.lang.String getDefaultFunctionNamespace()
XQStaticContext
getDefaultFunctionNamespace
in interface XQStaticContext
null
public int getDefaultOrderForEmptySequences()
XQStaticContext
getDefaultOrderForEmptySequences
in interface XQStaticContext
XQConstants.DEFAULT_ORDER_FOR_EMPTY_SEQUENCES_GREATEST
,
XQConstants.DEFAULT_ORDER_FOR_EMPTY_SEQUENCES_LEAST
.public int getHoldability()
XQStaticContext
getHoldability
in interface XQStaticContext
XQConstants.HOLDTYPE_HOLD_CURSORS_OVER_COMMIT
,
or XQConstants.HOLDTYPE_CLOSE_CURSORS_AT_COMMIT
.public java.lang.String[] getNamespacePrefixes()
XQStaticContext
getNamespaceURI
method to look up the namespace URI
corresponding to a specific prefix.
getNamespacePrefixes
in interface XQStaticContext
String
array containing the namespace prefixes.
Cannot be null
.public java.lang.String getNamespaceURI(java.lang.String prefix) throws XQException
XQStaticContext
XQException
is thrown if an unknown prefix is specified, i.e. a prefix not returned by the
getInScopeNamespacePrefixes
method.
getNamespaceURI
in interface XQStaticContext
prefix
- the prefix for which the namespace URI is sought. Cannot
be null
.
null
if the prefix is unknown.
XQException
- if a null
prefix is specifiedpublic int getOrderingMode()
XQStaticContext
getOrderingMode
in interface XQStaticContext
XQConstants.ORDERING_MODE_ORDERED
,
XQConstants.ORDERING_MODE_UNORDERED
.public int getQueryLanguageTypeAndVersion()
XQStaticContext
XQConstants.LANGTYPE_XQUERY
.
getQueryLanguageTypeAndVersion
in interface XQStaticContext
XQConstants.LANGTYPE_XQUERY
,
or XQConstants.LANGTYPE_XQUERYX
or a negative value indicating a vendor specific
query language type and version.public int getQueryTimeout()
XQStaticContext
getQueryTimeout
in interface XQStaticContext
public int getScrollability()
XQStaticContext
getScrollability
in interface XQStaticContext
XQConstants.SCROLLTYPE_FORWARD_ONLY
, or
XQConstants.SCROLLTYPE_SCROLLABLE
.public void setBaseURI(java.lang.String baseUri) throws XQException
XQStaticContext
setBaseURI
in interface XQStaticContext
baseUri
- the new baseUri, or empty string to make it undefined.
Cannot be null
.
XQException
- if a null
base uri is specifiedpublic void setBindingMode(int mode) throws org.basex.api.xqj.BXQException
XQStaticContext
setBindingMode
in interface XQStaticContext
mode
- the binding mode. One of:
XQConstants.BINDING_MODE_IMMEDIATE
,
orXQConstants.BINDING_MODE_DEFERRED
.
org.basex.api.xqj.BXQException
public void setBoundarySpacePolicy(int mode) throws org.basex.api.xqj.BXQException
XQStaticContext
setBoundarySpacePolicy
in interface XQStaticContext
mode
- boundary space policy. One of:
XQConstants.BOUNDARY_SPACE_PRESERVE
,
XQConstants.BOUNDARY_SPACE_STRIP
.
org.basex.api.xqj.BXQException
public void setConstructionMode(int mode) throws XQException
XQStaticContext
setConstructionMode
in interface XQStaticContext
mode
- construction mode value. One of:
XQConstants.CONSTRUCTION_MODE_PRESERVE
,
XQConstants.CONSTRUCTION_MODE_STRIP
.
XQException
- the specified mode is different from
XQConstants.CONSTRUCTION_MODE_PRESERVE
,
XQConstants.CONSTRUCTION_MODE_STRIP
public void setContextItemStaticType(XQItemType contextItemType)
XQStaticContext
null
to make it unspecified.
setContextItemStaticType
in interface XQStaticContext
contextItemType
- the static type of the context item; null
if unspecified.public void setCopyNamespacesModeInherit(int mode) throws org.basex.api.xqj.BXQException
XQStaticContext
setCopyNamespacesModeInherit
in interface XQStaticContext
mode
- ordering mode value. One of:
XQConstants.COPY_NAMESPACES_MODE_INHERIT
,
XQConstants.COPY_NAMESPACES_MODE_NO_INHERIT
.
org.basex.api.xqj.BXQException
public void setCopyNamespacesModePreserve(int m) throws org.basex.api.xqj.BXQException
XQStaticContext
setCopyNamespacesModePreserve
in interface XQStaticContext
m
- ordering mode value. One of:
XQConstants.COPY_NAMESPACES_MODE_PRESERVE
,
XQConstants.COPY_NAMESPACES_MODE_NO_PRESERVE
.
org.basex.api.xqj.BXQException
public void setDefaultCollation(java.lang.String uri) throws XQException
XQStaticContext
setDefaultCollation
in interface XQStaticContext
uri
- the namespace URI of the default collation.
Cannot be null
.
XQException
- if a null
URI is specifiedpublic void setDefaultElementTypeNamespace(java.lang.String uri) throws XQException
XQStaticContext
setDefaultElementTypeNamespace
in interface XQStaticContext
uri
- the namespace URI of the default element/type namespace,
the empty string to make it unspecified.
Cannot be null
.
XQException
- if a null
uri is specifiedpublic void setDefaultFunctionNamespace(java.lang.String uri) throws XQException
XQStaticContext
setDefaultFunctionNamespace
in interface XQStaticContext
uri
- the namespace URI of the default function namespace,
the empty string to make it unspecified.
Cannot be null
.
XQException
- if a null
URI is specifiedpublic void setDefaultOrderForEmptySequences(int mode) throws org.basex.api.xqj.BXQException
XQStaticContext
setDefaultOrderForEmptySequences
in interface XQStaticContext
mode
- the default order for empty sequences. One of:
XQConstants.DEFAULT_ORDER_FOR_EMPTY_SEQUENCES_GREATEST
,
XQConstants.DEFAULT_ORDER_FOR_EMPTY_SEQUENCES_LEAST
.
org.basex.api.xqj.BXQException
public void setHoldability(int hold) throws org.basex.api.xqj.BXQException
XQStaticContext
setHoldability
in interface XQStaticContext
hold
- the holdability of the result. One of:
XQConstants.HOLDTYPE_HOLD_CURSORS_OVER_COMMIT
,
or XQConstants.HOLDTYPE_CLOSE_CURSORS_AT_COMMIT
.
org.basex.api.xqj.BXQException
public void setOrderingMode(int mode) throws org.basex.api.xqj.BXQException
XQStaticContext
setOrderingMode
in interface XQStaticContext
mode
- ordering mode value. One of:
XQConstants.ORDERING_MODE_ORDERED
,
XQConstants.ORDERING_MODE_UNORDERED
.
org.basex.api.xqj.BXQException
public void setQueryLanguageTypeAndVersion(int m) throws org.basex.api.xqj.BXQException
XQStaticContext
setQueryLanguageTypeAndVersion
in interface XQStaticContext
m
- 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.
org.basex.api.xqj.BXQException
public void setQueryTimeout(int seconds) throws org.basex.api.xqj.BXQException
XQStaticContext
setQueryTimeout
in interface XQStaticContext
seconds
- the query execution timeout value in seconds.
A value of 0 indicates no limit
org.basex.api.xqj.BXQException
public void setScrollability(int mode) throws org.basex.api.xqj.BXQException
XQStaticContext
setScrollability
in interface XQStaticContext
mode
- the scrollability of the result. One of:
XQConstants.SCROLLTYPE_FORWARD_ONLY
, or
XQConstants.SCROLLTYPE_SCROLLABLE
.
org.basex.api.xqj.BXQException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |