API

com.ibm.xml.xapi
Interface XExecutable

All Known Subinterfaces:
XPathExecutable, XQueryExecutable, XSLTExecutable

public interface XExecutable

Base executable class. Provides common execute methods.

Parameters to the execute methods include:

The return value is an XSequenceCursor which is a cursor view of the resulting sequence of items. A List of XItemView return type is also provided for random access. If the result is the empty sequence and the return type is XSequenceCursor then the value will be null. If the result is empty and the return type is List then the value will be an empty list. Note that XSequenceCursor implements XItemView allowing the result of one execution to be passed in as the context item for another.

All XExecutable objects are thread safe.

See Also:
XDynamicContext, XSequenceCursor, XItemView, XPathExecutable, XQueryExecutable, XSLTExecutable

Method Summary
 XSequenceCursor execute()
          Execute for no source.
 XSequenceCursor execute(Source source)
          Execute for the given source.
 XSequenceCursor execute(Source source, XDynamicContext dynamicContext)
          Execute for the given source and dynamic context.
 XSequenceCursor execute(XDynamicContext dynamicContext)
          Execute for no source.
 XSequenceCursor execute(XItemView item)
          Execute for the given item.
 XSequenceCursor execute(XItemView item, XDynamicContext dynamicContext)
          Execute for the given item and dynamic context.
 List<XItemView> executeToList()
          Execute for no source.
 List<XItemView> executeToList(Source source)
          Execute for the given source.
 List<XItemView> executeToList(Source source, XDynamicContext dynamicContext)
          Execute for the given source and dynamic context.
 List<XItemView> executeToList(XDynamicContext dynamicContext)
          Execute for no source.
 List<XItemView> executeToList(XItemView item)
          Execute for the given item.
 List<XItemView> executeToList(XItemView item, XDynamicContext dynamicContext)
          Execute for the given item and dynamic context.
 

Method Detail

execute

XSequenceCursor execute(Source source)
Execute for the given source. The default dynamic context settings are used.

Parameters:
source - The input source. May be null for XPath and XQuery. Note that if the context item is null and an expression accesses the context item an error will be raised by the processor (it is an error if a part of the dynamic context is accessed which has not been initialized).
Returns:
A sequence cursor or null if the result is empty.

execute

XSequenceCursor execute(Source source,
                        XDynamicContext dynamicContext)
Execute for the given source and dynamic context.

Parameters:
source - The input source. May be null for XPath and XQuery and for XSLT when an initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName). Note that if the context item is null and an expression accesses the context item an error will be raised by the processor (it is an error if a part of the dynamic context is accessed which has not been initialized).
dynamicContext - The dynamic context.
Returns:
A sequence cursor or null if the result is empty.

execute

XSequenceCursor execute(XItemView item)
Execute for the given item. The default dynamic context settings are used.

Parameters:
item - The context item. May be null for XPath and XQuery. Note that if the context item is null and an expression accesses the context item an error will be raised by the processor (it is an error if a part of the dynamic context is accessed which has not been initialized).
Returns:
A sequence cursor or null if the result is empty.

execute

XSequenceCursor execute(XItemView item,
                        XDynamicContext dynamicContext)
Execute for the given item and dynamic context.

Parameters:
item - The context item. May be null for XPath and XQuery and for XSLT when an initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName). Note that if the context item is null and an expression accesses the context item an error will be raised by the processor (it is an error if a part of the dynamic context is accessed which has not been initialized).
dynamicContext - The dynamic context.
Returns:
A sequence cursor or null if the result is empty.

execute

XSequenceCursor execute()
Execute for no source. The default dynamic context settings are used. Valid for XPath and XQuery as long as the expression does not access the context item.

Returns:
A sequence cursor or null if the result is empty.

execute

XSequenceCursor execute(XDynamicContext dynamicContext)
Execute for no source. Valid for XPath and XQuery as long as the expression does not access the context item and for XSLT when an initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName).

Parameters:
dynamicContext - The dynamic context.
Returns:
A sequence cursor or null if the result is empty.

executeToList

List<XItemView> executeToList(Source source)
Execute for the given source. The default dynamic context settings are used.

Parameters:
source - The input source. May be null for XPath and XQuery. Note that if the context item is null and an expression accesses the context item an error will be raised by the processor (it is an error if a part of the dynamic context is accessed which has not been initialized).
Returns:
A list of XItemView. If the result of the execution is empty then an empty list is returned.

executeToList

List<XItemView> executeToList(Source source,
                              XDynamicContext dynamicContext)
Execute for the given source and dynamic context.

Parameters:
source - The input source. May be null for XPath and XQuery and for XSLT when an initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName). Note that if the context item is null and an expression accesses the context item an error will be raised by the processor (it is an error if a part of the dynamic context is accessed which has not been initialized).
Returns:
A list of XItemView. If the result of the execution is empty then an empty list is returned.

executeToList

List<XItemView> executeToList(XItemView item)
Execute for the given item. The default dynamic context settings are used.

Parameters:
item - The context item. May be null for XPath and XQuery. Note that if the context item is null and an expression accesses the context item an error will be raised by the processor (it is an error if a part of the dynamic context is accessed which has not been initialized).
Returns:
A list of XItemView. If the result of the execution is empty then an empty list is returned.

executeToList

List<XItemView> executeToList(XItemView item,
                              XDynamicContext dynamicContext)
Execute for the given item and dynamic context.

Parameters:
item - The context item. May be null for XPath and XQuery and for XSLT when an initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName). Note that if the context item is null and an expression accesses the context item an error will be raised by the processor (it is an error if a part of the dynamic context is accessed which has not been initialized).
dynamicContext - The dynamic context.
Returns:
A list of XItemView. If the result of the execution is empty then an empty list is returned.

executeToList

List<XItemView> executeToList()
Execute for no source. The default dynamic context settings are used. Valid for XPath and XQuery as long as the expression does not access the context item.

Returns:
A list of XItemView. If the result of the execution is empty then an empty list is returned.

executeToList

List<XItemView> executeToList(XDynamicContext dynamicContext)
Execute for no source. Valid for XPath and XQuery as long as the expression does not access the context item and for XSLT when an initial named template is specified using XDynamicContext.setXSLTInitialTemplate(QName).

Parameters:
dynamicContext - The dynamic context.
Returns:
A list of XItemView. If the result of the execution is empty then an empty list is returned.

IBM Copyright 2004-2008