public interface XmlDataTreeCursor extends XmlDataCursor
nextItem()
and previousItem()
position to next or previous individual item in the array.
This is achieved by internally maintaining a current-index in this cursor that specifies an offset within repeating-values.
There are also additional methods such as firstItem()
and lastItem()
that
position on the very first and very last items in a group-value by setting the current-index as appropriate.
There are also the deleteForward()
and deleteBackward()
methods that
are index-aware and update the current-index after deleting an individual item.
Indexed XmlDataCursor accessors such as getValue(), getItem, getContent(), setItem(), setValue(), and setContent() behave slightly
differently for XmlDataTreeCursor. When the index is omitted, the item at the current-index is referenced (contrasted to an XmlDataCursor
for which an omitted index implies that there is only one item).
Finally, the XmlDataTreeCursor "object" methods have the same basic behavior as the XmlDataCursor "object" methods except that any method call that changes the current-position also resets the current-index to zero. The XmlDataCursor concepts such as current-position, current-object, and current-tag are exactly the same for XmlDataTreeCursor. When cursors are stacked during tree traversal, these concepts apply to the cursor most recently pushed onto the cursor stack. Other concepts such as current-tree-position are unique to XmlDataTreeCursor.
XmlDataTreeCursor also supports navigation through a hierarchy of XmlData objects using the parent()
, firstChild()
, and lastChild()
methods.
These methods maintain a stack of cursors. Invoking lastChild() or firstChild() pushes the current cursor onto a stack and creates a new
cursor for the child content. The parent() method pops the top of the cursor stack and restores the parent as the current XmlData object.
It is also possible to navigate through nested XmlData structures in document order using the methods nextInOrder()
and previousInOrder()
.
Methods | Operation |
---|---|
getItem() , setItem() ,
deleteItem() ,
insertItemAfter() , insertItemBefore() |
Similar to the XmlDataCursor "item" methods with the additional behavior of defaulting to the current-item when no index is specified even though the current-object represents repeating values. This is in contrast to XmlDataCursor "item" methods which have no current-index and throw an exception when no index is specified and repeating values are present. |
currentIndex() , deleteBackward() , deleteForward() , firstItem() , lastItem() , nextItem() ,
lastItem() , previousItem() , setIndex()
|
Additional "item" methods that maintain the current-item after as operation. |
firstChild() , lastChild() , parent() , nextInOrder() , previousInOrder() , top() , depth()
|
Additional "item" methods that facilitate navigation through multiple levels of the XmlData infoset tree. |
getValue() , setValue()
getValueTag() , setValueTag() ,
insertValueAfter() , insertValueBefore() ,
getValueTag() , setValueTag()
getComplexValueContent() , setComplexValueContent() ,
getContent() , setContent() ,
isEmpty() , isSimpleValue() , isGroupValue() , isComplexValue() ,
getValueCursor()
|
Similar to the XmlDataCursor value" methods with the additional behavior of defaulting to the current-item when no index is specified even though the current-object represent repeating values. This in contrast to XmlDataCursor "item" methods which throw an exception when no index is specified when repeating values are present. |
getAttributes() , setAttributes() ,
getAttributeValue() , setAttributeValue() ,
hasAttributes() , getAttributeNames() ,
removeAttribute()
|
Similar to the XmlDataCursor "attribute" methods with the additional behavior of defaulting to the current-index when no index is specified even though the current-object represent repeating values. This in contrast to XmlDataCursor "attribute" methods which throw an exception when no index is specified when repeating values are present. |
getNamespaceDecl , setNamespaceDecl() ,
getNamespaceDecls() , setNamespaceDecls() ,
getInstanceProp() , setInstanceProp()
|
Similar to the XmlDataCursor "namespace" methods with the additional behavior of defaulting to the current-index when no index is specified even though the current-object represent repeating values. This in contrast to XmlDataCursor "attribute" methods which throw an exception when no index is specified when repeating values are present. |
setObjec() , deleteObjec() ,
next() , first() , previous() , last() ,
insertObjectBefore() , insertObjectAfter() ,
count() ,
firs() , next() , previous() ,
firstPartial() , nextPartial() ,
previousPartial() , lastPartial()
|
Similar to the XmlDataCursor "object" methods except that explicitly positioning to a tag-object-pair causes the current-index to be reset to zero. |
copyCursor() , data()
|
Methods similar to XmlDtaCursor methods but only operate on current-cursor. Previously pushed cursors along the navigation path are not affected. |
firstChild()
push the current-cursor onto a stack and allocate a new cursor in order to navigate the child content of the
current-value. The newly created
cursor becomes the current-cursor. Methods such as parent()
pop the top cursor from the internal cursor stack and the popped cursor then
becomes the current-cursor.
nextItem()
and similar methods cause the index to be incremented.
Subsequents calls to previousItem()
and similar methods cause the index to be decremented.
When the current-index is positioned on the last item in the current-object, a subsequent call to nextItem() resets the current index to zero and
points to the first item in the next tag-object-pair.
When the current-index is positioned on the first item in the current-object, a subsequent call to previousItem() sets the current-index
to point at the last item in the previous tag-object-pair.
The combination of current-object and current-index uniquely identify the current-itemnextInOrder()
and
previousInOrder()
methods navigate through an XMlData infoset using in-order traversal.Modifier and Type | Method and Description |
---|---|
int |
currentIndex()
Returns the index of the current-item when the current-object is an object containing repeating values.
|
boolean |
deleteBackward()
Deletes the current-item and positions the cursor on the previous item.
|
boolean |
deleteForward()
Deletes the current-item and positions the cursor on the next item.
|
boolean |
deleteItem(int... index)
Delete the specified item.
|
int |
depth()
Returns the stacked cursor depth.
|
boolean |
firstChild()
Positions this cursor on the first child of the current-value.
|
boolean |
firstItem()
Positions this cursor on the first item.
|
XmlDataContentTag |
getAnyTag(int... index)
The behavior is similar to
XmlDataCursor.getAnyTag(int...) except that an omitted index references the current-item rather than the first and only item content. |
XmlDataAttributeTag[] |
getAttributeNames(int... index)
The behavior is similar to
XmlDataCursor.getAttributeNames(int...) except that an omitted index references the current-item rather than the first and only item content. |
IData |
getAttributes(int... index)
The behavior is similar to
XmlDataCursor.getAttributes(int...) except that an omitted index references the current-item rather than the first and only item content. |
java.lang.String |
getAttributeValue(XmlDataAttributeTag attribute,
int... index)
The behavior is similar to
XmlDataCursor.getAttributeValue(XmlDataAttributeTag, int...) except that an omitted index references the current-item rather than the first and only item content. |
java.lang.Object |
getComplexValueContent(int... index)
The behavior is similar to
XmlDataCursor.getComplexValueContent(int...) except that an omitted index references the current-item content rather than the first and only item content. |
java.lang.Object |
getContent(int... index)
The behavior is similar to
XmlDataCursor.getContent(int...) except that an omitted index references the current-item content rather than the first and only item content. |
java.lang.String |
getInstanceProp(java.lang.String name,
int... index)
The behavior is similar to
XmlDataCursor.getInstanceProp(String, int...) except that an omitted index references the current-item rather than the first and only item content. |
java.lang.Object |
getItem(int... index)
The behavior is similar to
XmlDataCursor.getItem(int...) except that an omitted index references the current-item rather than the first and only item. |
java.lang.String |
getNamespaceDecl(java.lang.String prefix,
int... index)
The behavior is similar to
XmlDataCursor.getNamespaceDecl(String, int...) except that an omitted index references the current-item
rather than the first and only item content. |
IData |
getNamespaceDecls(int... index)
The behavior is similar to
XmlDataCursor.getNamespaceDecls(int...) except that an omitted index references the current-item rather than the first and only item content. |
java.lang.Object |
getValue(int... index)
The behavior is similar to
XmlDataCursor.getValue(int...) except that an omitted index references the current-item value rather than the first and only item value. |
XmlDataContentTag |
getValueTag(int... index)
The behavior is similar to
XmlDataCursor.getValueTag(int...) except that an omitted index references the current-item
value-tag rather than the first and only item's value-tag. |
boolean |
hasAttributes(int... index)
The behavior is exactly like
XmlDataCursor.hasAttributes(int...) except that an omitted index references the current-item
value rather than the first and only item value. |
void |
insertItemAfter(java.lang.Object item)
Inserts an item after the current-item in a repeating value.
|
void |
insertItemBefore(java.lang.Object item)
Inserts an item before the current-item in a repeating value.
|
void |
insertValueAfter(XmlDataContentTag valueTag,
java.lang.Object value)
|
void |
insertValueBefore(XmlDataContentTag valueTag,
java.lang.Object value)
|
boolean |
isComplexValue(int... index)
The behavior is similar to
XmlDataCursor.isComplexValue(int...) except that an omitted index references the current-item. |
boolean |
isEmpty(int... index)
The behavior is similar to
XmlDataCursor.isEmpty(int...) except that an omitted index references the current-item. |
boolean |
isGroupValue(int... index)
The behavior is similar to
XmlDataCursor.isGroupValue(int...) except that an omitted index references the current-item. |
boolean |
isSimpleValue(int... index)
The behavior is similar to
XmlDataCursor.isSimpleValue(int...) except that an omitted index references the current-item. |
boolean |
isTop()
Determines if the XmlDataTreeCursor is positioned somewhere in the top level.
|
boolean |
lastChild()
Positions this cursor on the last child value of the current-value.
|
boolean |
lastItem()
Positions this cursor on the last item.
|
java.lang.Integer |
nextInOrder()
Positions this cursor to the next in-order item.
|
boolean |
nextItem()
Positions this cursor on the next item.
|
boolean |
nextItem(XmlDataContentTag tag)
Positions this cursor on the next item with the specified tag.
|
boolean |
nextValueTag(XmlDataContentTag tag)
Positions this cursor on the next item with a value-tag that matches the search tag.
|
boolean |
parent()
Moves the XmlDataTreeCursor up one level by popping the top-level cursor from the internal stack of cursor.
|
java.lang.Integer |
previousInOrder()
Positions the cursor to the previous in-order item.
|
boolean |
previousItem()
Positions this cursor on the previous item.
|
boolean |
previousItem(XmlDataContentTag tag)
Positions this cursor on the previous item with the specified tag.
|
boolean |
previousValueTag(XmlDataContentTag tag)
Positions this cursor the previous item with a value-tag that matches the search tag.
|
boolean |
removeAttribute(XmlDataAttributeTag attribute,
int... index)
Removes the specified attribute.
|
void |
setAnyTag(XmlDataContentTag tag,
int... index)
The behavior is similar to
XmlDataCursor.setAnyTag(XmlDataContentTag, int...) except that an omitted index always accesses the current-item rather than the first and only item. |
void |
setAttributes(IData attributes,
int... index)
The behavior is similar to
XmlDataCursor.setAttributes(IData, int...) except that an omitted index always accesses the current-item rather than the first and only item. |
void |
setAttributeValue(XmlDataAttributeTag attribute,
java.lang.String value,
int... index)
The behavior is similar to
XmlDataCursor.setAttributeValue(XmlDataAttributeTag, String, int...) except that an omitted index always accesses
the current-item rather than the first and only item. |
void |
setComplexValueContent(java.lang.Object item,
int... index)
The behavior is exactly the same
XmlDataCursor.setComplexValueContent(java.lang.Object, int...) except that an omitted index always accesses the current-item rather than the first and only item. |
void |
setContent(java.lang.Object item,
int... index)
The behavior is exactly the same
XmlDataCursor.setContent(java.lang.Object, int...) except that an omitted index always accesses the current-item rather than the first and only item. |
void |
setIndex(int index)
Establishes the current-item in repeating values.
|
void |
setInstanceProp(java.lang.String name,
java.lang.String value,
int... index)
Sets an XML instance property (xsi attribute) on the current item.
|
void |
setItem(java.lang.Object item,
int... index)
The behavior is similar to
XmlDataCursor.setItem(java.lang.Object, int...) except that an omitted index always accesses the current-item rather than the first and only item. |
void |
setNamespaceDecl(java.lang.String prefix,
java.lang.String uri,
int... index)
The behavior is similar to
XmlDataCursor.setNamespaceDecl(String, String, int...) except that an omitted index always references the current-item rather the first and only item. |
void |
setNamespaceDecls(IData nsDecls,
int... index)
The behavior is similar to
XmlDataCursor.setNamespaceDecls(IData, int...) except that an omitted index always references the current-item rather the first and only item. |
void |
setValue(java.lang.Object item,
int... index)
The behavior is similar to
XmlDataCursor.setValue(java.lang.Object, int...) except that an omitted index always accesses the current-item value rather than the first and only item value. |
void |
setValueTag(XmlDataContentTag tag,
int... index)
The behavior is similar to
XmlDataCursor.setValueTag(com.wm.xmldata.XmlDataContentTag, int...) except that an omitted index always accesses the current-item;s
value-tag rather than the first and only item's value-tag. |
void |
top()
Positions the TreeCursor on the top-level and destroys all intervening cursors.
|
copyCursor, count, data, deleteObject, destroy, first, first, firstPartial, getObject, getTag, getValueCursor, home, insertItemAfter, insertItemBefore, insertObjectAfter, insertObjectBefore, insertValueAfter, insertValueBefore, isAny, isGroup, isHome, isRecast, isRepeating, isSubstitution, last, last, lastPartial, newCursor, next, next, nextPartial, previous, previous, previousPartial, recast, setObject, setTag
int currentIndex()
boolean deleteBackward()
XmlDataException.UnpositionedCursor
- when the cursor is not positionedboolean deleteForward()
XmlDataException.UnpositionedCursor
- when the cursor is not positionedboolean deleteItem(int... index)
XmlDataCursor.deleteItem(int...)
except that an omitted index
results in current-item deletion.deleteItem
in interface XmlDataCursor
index
- optional offset (starting at zero) into the array of repeating values are presentXmlDataException.UnpositionedCursor
- when the cursor is not positionedXmlDataException.IndexOutOfRange
- when the indexed item does not existint depth()
firstChild()
or lastChild()
that returns true, the depth increases
by one. For every invocation of parent()
that returns true, the depth decreases by one.boolean firstChild()
XmlDataCursor.getValueCursor(int...)
.XmlDataException.UnpositionedCursor
- when the cursor is not positionedboolean firstItem()
XmlDataContentTag getAnyTag(int... index)
XmlDataCursor.getAnyTag(int...)
except that an omitted index references the current-item rather than the first and only item content.getAnyTag
in interface XmlDataCursor
index
- the index of the repeating valueXmlDataCursor.getAttributeNames(int...)
XmlDataAttributeTag[] getAttributeNames(int... index)
XmlDataCursor.getAttributeNames(int...)
except that an omitted index references the current-item rather than the first and only item content.getAttributeNames
in interface XmlDataCursor
index
- the index of the repeating valueXmlDataCursor.getAttributeNames(int...)
IData getAttributes(int... index)
XmlDataCursor.getAttributes(int...)
except that an omitted index references the current-item rather than the first and only item content.getAttributes
in interface XmlDataCursor
index
- the index of the repeating valueXmlDataCursor.getAttributes(int...)
java.lang.String getAttributeValue(XmlDataAttributeTag attribute, int... index)
XmlDataCursor.getAttributeValue(XmlDataAttributeTag, int...)
except that an omitted index references the current-item rather than the first and only item content.getAttributeValue
in interface XmlDataCursor
index
- the index of the repeating valueattribute
- the tag of the attribute XmlDataAttributeTag)XmlDataCursor.getAttributeValue(XmlDataAttributeTag, int...)
java.lang.Object getComplexValueContent(int... index)
XmlDataCursor.getComplexValueContent(int...)
except that an omitted index references the current-item content rather than the first and only item content.getComplexValueContent
in interface XmlDataCursor
index
- the index of the repeating valueXmlDataCursor.getComplexValueContent(int...)
java.lang.Object getContent(int... index)
XmlDataCursor.getContent(int...)
except that an omitted index references the current-item content rather than the first and only item content.getContent
in interface XmlDataCursor
index
- the index of the repeating valueXmlDataCursor.getContent(int...)
java.lang.String getInstanceProp(java.lang.String name, int... index)
XmlDataCursor.getInstanceProp(String, int...)
except that an omitted index references the current-item rather than the first and only item content.getInstanceProp
in interface XmlDataCursor
index
- the index of the repeating valuename
- the name of the xsi property (e.g. nil, type)XmlDataCursor.getInstanceProp(String, int...)
java.lang.Object getItem(int... index)
XmlDataCursor.getItem(int...)
except that an omitted index references the current-item rather than the first and only item.getItem
in interface XmlDataCursor
index
- offset into the repeating content array (if repeating content is present)XmlDataCursor.getItem(int...)
java.lang.String getNamespaceDecl(java.lang.String prefix, int... index)
XmlDataCursor.getNamespaceDecl(String, int...)
except that an omitted index references the current-item
rather than the first and only item content.getNamespaceDecl
in interface XmlDataCursor
index
- the index of the repeating valueprefix
- the prefixXmlDataCursor.getNamespaceDecl(String, int...)
IData getNamespaceDecls(int... index)
XmlDataCursor.getNamespaceDecls(int...)
except that an omitted index references the current-item rather than the first and only item content.getNamespaceDecls
in interface XmlDataCursor
index
- the index of the repeating valueXmlDataCursor.getNamespaceDecls(int...)
java.lang.Object getValue(int... index)
XmlDataCursor.getValue(int...)
except that an omitted index references the current-item value rather than the first and only item value.getValue
in interface XmlDataCursor
index
- the offset into repeating contentXmlDataCursor.getValue(int...)
XmlDataContentTag getValueTag(int... index)
XmlDataCursor.getValueTag(int...)
except that an omitted index references the current-item
value-tag rather than the first and only item's value-tag.getValueTag
in interface XmlDataCursor
index
- the index of the repeating valueXmlDataCursor.getValueTag(int...)
boolean hasAttributes(int... index)
XmlDataCursor.hasAttributes(int...)
except that an omitted index references the current-item
value rather than the first and only item value.hasAttributes
in interface XmlDataCursor
index
- the offset into repeating content (or no index for the current-item)XmlDataCursor.hasAttributes(int...)
void insertItemAfter(java.lang.Object item)
insertValueAfter(XmlDataContentTag, Object)
and the item is treated like a value. If the current-tag
is a substitution-tag, a properly formatted substitution-item must be provided.
If the current-tag is an any-tag, a properly formatted any-item
must be provided. This method is unlike insertValueAfter(XmlDataContentTag, Object)
because that method creates an indirect-item
from a value while this method expects an indirect-item that has already been created.
This method differs from XmlDataCursor.insertItemAfter(Object, int)
because an index is not required. When no index is specified
the current-index is used.item
- the item to insertXmlDataException.UnpositionedCursor
- when the cursor is not positionedvoid insertItemBefore(java.lang.Object item)
insertValueBefore(XmlDataContentTag, Object)
and the item is treated like a value. If the current-tag
is a substitution-tag, a properly formatted substitution-item must be provided.
If the current-tag is an any-tag, a properly formatted any-item
must be provided. This method is unlike insertValueBefore(XmlDataContentTag, Object)
because that method creates an indirect-item
from a value while this method expects an indirect-item that has already been created.
This method differs from XmlDataCursor.insertItemBefore(Object, int)
because an index is not required. When no index is specified
the current-index is used.item
- the item to insertXmlDataException.UnpositionedCursor
- when the cursor is not positionedvoid insertValueAfter(XmlDataContentTag valueTag, java.lang.Object value)
XmlDataCursor.insertValueAfter(XmlDataContentTag, Object, int)
because this method allows insertion without specifying an index (the current index is used).
XmlDataCursor
does not support insertAfter without an index.valueTag
- the tag used to construct the indirect-item (or null if not needed)value
- the value used directly for elements and groups or the value used to construct the indirect-itemXmlDataException.UnpositionedCursor
- when the cursor is not positionedvoid insertValueBefore(XmlDataContentTag valueTag, java.lang.Object value)
XmlDataCursor.insertValueBefore(XmlDataContentTag, Object, int)
because this method allows insert without specifying an index (the current index is used).
XmlDataCursor does not support insertAfter without an index.valueTag
- the tag used to construct the indirect-item (or null if not needed)value
- the value used directly for elements and groups or the value used to construct the indirect-itemXmlDataException.UnpositionedCursor
- when the cursor is not positionedboolean isComplexValue(int... index)
XmlDataCursor.isComplexValue(int...)
except that an omitted index references the current-item.isComplexValue
in interface XmlDataCursor
index
- the offset into repeating content (or no index for the current-item)boolean isEmpty(int... index)
XmlDataCursor.isEmpty(int...)
except that an omitted index references the current-item.isEmpty
in interface XmlDataCursor
index
- the offset into repeating content (or no index for the current-item)XmlDataCursor.isEmpty(int...)
boolean isGroupValue(int... index)
XmlDataCursor.isGroupValue(int...)
except that an omitted index references the current-item.isGroupValue
in interface XmlDataCursor
index
- the offset into repeating content (or no index for the current-item)XmlData.isGroupValue(Object)
boolean isSimpleValue(int... index)
XmlDataCursor.isSimpleValue(int...)
except that an omitted index references the current-item.isSimpleValue
in interface XmlDataCursor
index
- the offset into repeating content (or no index for the current-item)boolean isTop()
boolean lastChild()
XmlDataCursor.getValueCursor(int...)
.XmlDataException.UnpositionedCursor
- when the cursor is not positionedboolean lastItem()
java.lang.Integer nextInOrder()
boolean nextItem()
boolean nextItem(XmlDataContentTag tag)
nextValueTag(XmlDataContentTag)
method.
The tag match is based on the partial-name (it does not include the particle-id).tag
- the tag that is compared to item tagsboolean nextValueTag(XmlDataContentTag tag)
nextItem(XmlDataContentTag)
.
However, for any-items and substitution-items,
the nextItem()
's value-tag is used for comparison.
This method is more easily used for a general search than the nextItem(XmlDataContentTag)
method because the user can search without concern for whether the items are normal elements
or indirect-items.
The tag match is based on the partial-name (it does not include the particle-id).tag
- the tag which is compared to item value-tagsboolean parent()
firstChild()
or lastChild()
had never been invoked on this cursor,
the parent() method will always return false.java.lang.Integer previousInOrder()
boolean previousItem()
boolean previousItem(XmlDataContentTag tag)
previousValueTag(XmlDataContentTag)
method.
The tag match is based on the partial-name (it does not include the particle-id).tag
- the raw tagboolean previousValueTag(XmlDataContentTag tag)
previousItem(XmlDataContentTag)
.
However, for any-items and substitution-items
the previousItem()
's value-tag is used for comparison.
This method is more easily used for a general search than previousItem(XmlDataContentTag)
because the user can search without concern for whether the items are normal elements
or indirect-items.
The tag match is based on the partial-name (it does not include the particle-id).tag
- the tag which is comparedboolean removeAttribute(XmlDataAttributeTag attribute, int... index)
XmlDataCursor.removeAttribute(XmlDataAttributeTag, int...)
except that an omitted index references
the current-item.removeAttribute
in interface XmlDataCursor
attribute
- an XmlDataAttributeTag naming the attributeindex
- the offset of the element is a repeating value; an omitted index references the current-itemXmlDataCursor.removeAttribute(XmlDataAttributeTag, int...)
void setAnyTag(XmlDataContentTag tag, int... index)
XmlDataCursor.setAnyTag(XmlDataContentTag, int...)
except that an omitted index always accesses the current-item rather than the first and only item.setAnyTag
in interface XmlDataCursor
tag
- the tag used to set the ncName and namespace of the anyItem at the current cursor.index
- the position in the list of repeating values to be set. When index is not specified, the current-item is replaced.XmlDataCursor.setAnyTag(XmlDataContentTag, int...)
,
XmlDataCursor.setAnyTag(XmlDataContentTag, int...)
void setAttributes(IData attributes, int... index)
XmlDataCursor.setAttributes(IData, int...)
except that an omitted index always accesses the current-item rather than the first and only item.setAttributes
in interface XmlDataCursor
attributes
- an IData containing attribute-tag/value pairs.index
- the position in the list of repeating values to be set. When index is not specified, the current-item is replaced.XmlDataCursor.setAnyTag(XmlDataContentTag, int...)
,
XmlDataCursor.setAttributes(IData, int...)
void setAttributeValue(XmlDataAttributeTag attribute, java.lang.String value, int... index)
XmlDataCursor.setAttributeValue(XmlDataAttributeTag, String, int...)
except that an omitted index always accesses
the current-item rather than the first and only item.setAttributeValue
in interface XmlDataCursor
attribute
- an XmlDataAttributeTagindex
- the position in the list of repeating values to be set. When index is not specified, the current-item is replaced.value
- the value to set (must be a String)XmlDataCursor.setAnyTag(XmlDataContentTag, int...)
,
XmlDataCursor.setAttributeValue(XmlDataAttributeTag, String, int...)
void setContent(java.lang.Object item, int... index)
XmlDataCursor.setContent(java.lang.Object, int...)
except that an omitted index always accesses the current-item rather than the first and only item.setContent
in interface XmlDataCursor
item
- the item contentindex
- optional offset when repeating values are presentXmlDataCursor.setContent(Object, int...)
void setComplexValueContent(java.lang.Object item, int... index)
XmlDataCursor.setComplexValueContent(java.lang.Object, int...)
except that an omitted index always accesses the current-item rather than the first and only item.setComplexValueContent
in interface XmlDataCursor
item
- the item contentindex
- optional offset when repeating values are presentXmlDataCursor.setComplexValueContent(Object, int...)
void setIndex(int index)
index
- the index specifying the current-itemXmlDataException.UnpositionedCursor
- when the cursor is unpositionedXmlDataException.IndexOutOfRange
- the position in the list of repeating item values to be set. When index is not specified, the current-item is replaced.void setInstanceProp(java.lang.String name, java.lang.String value, int... index)
XmlDataCursor
setInstanceProp
in interface XmlDataCursor
name
- the name of the property(e.g. 'nil')value
- the value of the property (e.g. 'true')index
- the offset index into repeating valuesvoid setItem(java.lang.Object item, int... index)
XmlDataCursor.setItem(java.lang.Object, int...)
except that an omitted index always accesses the current-item rather than the first and only item.setItem
in interface XmlDataCursor
item
- the item that replaces the current-itemindex
- the position in the list of repeating values to be set. When index is not specified, the current-item is replaced.XmlDataCursor
,
XmlDataCursor.setItem(Object, int...)
void setNamespaceDecl(java.lang.String prefix, java.lang.String uri, int... index)
XmlDataCursor.setNamespaceDecl(String, String, int...)
except that an omitted index always references the current-item rather the first and only item.setNamespaceDecl
in interface XmlDataCursor
prefix
- the prefix for which the namespace is establisheduri
- the uri assigned to the prefixindex
- the position in the list of repeating values to be set. When index is not specified, the current-item is replaced.XmlDataCursor
,
XmlDataCursor.setNamespaceDecls(IData, int...)
void setNamespaceDecls(IData nsDecls, int... index)
XmlDataCursor.setNamespaceDecls(IData, int...)
except that an omitted index always references the current-item rather the first and only item.setNamespaceDecls
in interface XmlDataCursor
nsDecls
- an IData containing prefixes and URIsindex
- the position in the list of repeating values to be set. When index is not specified, the current-item is replaced.XmlDataCursor
,
XmlDataCursor.setNamespaceDecls(IData, int...)
void setValue(java.lang.Object item, int... index)
XmlDataCursor.setValue(java.lang.Object, int...)
except that an omitted index always accesses the current-item value rather than the first and only item value.setValue
in interface XmlDataCursor
item
- the item value that replaces the current-item valueindex
- the position in the list of repeating item values to be set. When index is not specified, the current-item value is replaced.XmlDataCursor.setValue(Object, int...)
void setValueTag(XmlDataContentTag tag, int... index)
XmlDataCursor.setValueTag(com.wm.xmldata.XmlDataContentTag, int...)
except that an omitted index always accesses the current-item;s
value-tag rather than the first and only item's value-tag.setValueTag
in interface XmlDataCursor
tag
- the tag assigned to the current valueindex
- the offset into the repeating value arrayXmlDataCursor.setValueTag(XmlDataContentTag, int...)
void top()