|
API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XSequenceCursor
Represents a sequence of items providing cursor access to the items.
Cursor traversal can be achieved through the toNext
and toPrevious
methods. When either of these methods
is used the cursor will change state as it will now be pointing
to a different item in the sequence. This means that other
references to the same XSequenceCursor
object will also
now be pointing to the next or previous item.
XSequenceCursor
implements XItemView
so that
each item can be examined as the cursor is traversed. XItemView
in turn implements XNodeView
so that items of complex type can
be examined as well.
Note that null
is used to represent an empty sequence
so an XSequenceCursor
will always contain at least one item.
XItemView
,
XNodeView
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.ibm.xml.xapi.XNodeView |
---|
XNodeView.Kind |
Method Summary | |
---|---|
XSequenceCursor |
append(XItemView item)
Create a new sequence cursor by appending the specified item to this sequence. |
XSequenceCursor |
append(XSequenceCursor sequence)
Create a new sequence cursor by appending the items in the specified sequence to this sequence. |
List<XItemView> |
exportAsList()
Exports the sequence as a List . |
void |
exportSequence(Result result)
Export the sequence to a Result using the default output parameter settings. |
void |
exportSequence(Result result,
XOutputParameters parameters)
Export the sequence to a Result according to the specified output parameters. |
XItemView |
getSingletonItem()
Get the current item as a singleton. |
boolean |
toNext()
Moves the cursor to the next item in the sequence. |
boolean |
toPrevious()
Moves the cursor to the previous item in the sequence. |
Methods inherited from interface com.ibm.xml.xapi.XNodeView |
---|
getDOMNode, getKind, getNodeQName, getTreeCursor, isSameDocument, relativePosition |
Method Detail |
---|
boolean toNext()
true
if the move was successful, false
otherwise (if the cursor was already at the end of the sequence).boolean toPrevious()
true
if the move was successful, false
otherwise (if the cursor was already at the beginning of the sequence).XItemView getSingletonItem()
XSequenceCursor
implements XItemView
. It is intended to be called
only when a standalone item is needed that will not be affected
by calls to toNext
and toPrevious
on
the original sequence.
XItemView
object for the current item.List<XItemView> exportAsList()
List
.
The full sequence will be exported regardless of the current
position of the cursor in the sequence.
The resulting list will not be affected by any calls to
toNext
and toPrevious
on
the original sequence.
List
of XItemView
.void exportSequence(Result result, XOutputParameters parameters)
Result
according to the specified output parameters.
The full sequence will be exported regardless of the current
position of the cursor in the sequence.
Note that standalone attribute and namespace nodes cannot be serialized.
See Sequence Normalization
for more details.
Supported Result
types are:
result
- The Result
to export to.parameters
- The output parameter settings. See
XOutputParameters
.void exportSequence(Result result)
Result
using the default output parameter settings.
The full sequence will be exported regardless of the current
position of the cursor in the sequence.
Note that standalone attribute and namespace nodes cannot be serialized.
See Sequence Normalization
for more details.
Supported Result
types are:
result
- The Result
to export to.XSequenceCursor append(XItemView item)
item
- The item to append.
XSequenceCursor append(XSequenceCursor sequence)
sequence
- The sequence of items to append.
|
IBM Copyright 2004-2008 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |