public class XmlDataTreeCursorImpl extends java.lang.Object implements XmlDataTreeCursor
Modifier and Type | Method and Description |
---|---|
XmlDataTreeCursor |
copyCursor() |
int |
count()
Returns the number of items stored at the current cursor position.
|
int |
currentIndex()
Returns the index of the current-item when the current-object is an object containing repeating values.
|
IData |
data()
Returns the IData for which this cursor is defined.
|
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.
|
boolean |
deleteObject()
Removes the tag-object-pair (single value or array of repeating values) from the current position.
|
int |
depth()
Returns the stacked cursor depth.
|
void |
destroy()
Release any resources associated with the current cursor.
|
boolean |
first()
Positions the cursor at the first tag-object-pair.
|
boolean |
first(XmlDataContentTag key)
Positions the cursor on the first tag-object-pair with the specified tag and returns true.
|
boolean |
firstChild()
Positions this cursor on the first child of the current-value.
|
boolean |
firstItem()
Positions this cursor on the first item.
|
boolean |
firstPartial(XmlDataContentTag key)
Positions the cursor on the first tag-object-pair with a tag that partially matches the specified tag.
|
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... optionalIndex)
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... optionalIndex)
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... optionalIndex)
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 |
getObject()
Returns the current-object, the object stored at the current-position.
|
XmlDataContentTag |
getTag()
Returns the current-tag as a parsed-tag.
|
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. |
XmlDataCursor |
getValueCursor(int... index)
Returns an XmlDataCursor positioned on the first child of the specified value in the current-object.
|
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 |
home()
The cursor becomes unpositioned as if newly created.
|
void |
insertItemAfter(java.lang.Object value)
Inserts an item after the current-item in a repeating value.
|
void |
insertItemAfter(java.lang.Object item,
int index)
Inserts an item after the specified index into the array of repeating values at the current-position.
|
void |
insertItemBefore(java.lang.Object value)
Inserts an item before the current-item in a repeating value.
|
void |
insertItemBefore(java.lang.Object value,
int index)
Inserts an item before the specified index into the array of repeating values at the current-position.
|
void |
insertObjectAfter(XmlDataContentTag tag,
java.lang.Object value)
Inserts a tag-object-pair after the current-position.
|
void |
insertObjectBefore(XmlDataContentTag tag,
java.lang.Object value)
Inserts a tag-object-pair before the current-position.
|
void |
insertValueAfter(XmlDataContentTag tag,
java.lang.Object value)
|
void |
insertValueAfter(XmlDataContentTag tag,
java.lang.Object value,
int index)
Inserts a value into an array of repeating values at the current-position, after the specified index.
|
void |
insertValueBefore(XmlDataContentTag tag,
java.lang.Object value)
|
void |
insertValueBefore(XmlDataContentTag tag,
java.lang.Object value,
int index)
Inserts a value into an array of repeating values at the current-position, before the specified index.
|
boolean |
isAny()
Determines if the current-tag is an any-tag.
|
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 |
isGroup()
Determines if the current-tag is a group-tag.
|
boolean |
isGroupValue(int... index)
The behavior is similar to
XmlDataCursor.isGroupValue(int...) except that an omitted index references the current-item. |
boolean |
isHome()
Indicates whether the cursor is unpositioned.
|
boolean |
isRecast()
Indicates if automatic recast is in effect.
|
boolean |
isRepeating()
Determines if the current-object is a repeating value.
|
boolean |
isSimpleValue(int... index)
The behavior is similar to
XmlDataCursor.isSimpleValue(int...) except that an omitted index references the current-item. |
boolean |
isSubstitution()
Determines if the current-tag is a substitution-tag
|
boolean |
isTop()
Determines if the XmlDataTreeCursor is positioned somewhere in the top level.
|
boolean |
last()
Positions the cursor at the last tag-object-pair.
|
boolean |
last(XmlDataContentTag key)
Positions the cursor on the last occurrence of the last tag-object-pairg with the specified tag and return true.
|
boolean |
lastChild()
Positions this cursor on the last child value of the current-value.
|
boolean |
lastItem()
Positions this cursor on the last item.
|
boolean |
lastPartial(XmlDataContentTag key)
Positiosn the cursor on the last tag-object-pair with a tag that partially matches the specified tag.
|
XmlDataTreeCursor |
newCursor(IData data)
Creates a new XmlDataCuror instances from an existing cursor factory.
|
boolean |
next()
Positions the cursor on the next tag-object-pair.
|
boolean |
next(XmlDataContentTag key)
Positiona the cursor on the next tag-object-pair that has the specified tag and returns true.
|
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 key)
Positions this cursor on the next item with the specified tag.
|
boolean |
nextPartial(XmlDataContentTag key)
Positions the cursor on the next tag-object-pair with a tag that partially matches the specified tag.
|
boolean |
nextValueTag(XmlDataContentTag key)
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.
|
boolean |
previous()
Positions the cursor on the previous tag-object-pair.
|
boolean |
previous(XmlDataContentTag key)
Positions the cursor on the previous tag-object-pair with the specified tag and return true.
|
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 key)
Positions this cursor on the previous item with the specified tag.
|
boolean |
previousPartial(XmlDataContentTag key)
Positions the cursor on the previous tag-object-pair with a tag that partially matches the specified tag.
|
boolean |
previousValueTag(XmlDataContentTag key)
Positions this cursor the previous item with a value-tag that matches the search tag.
|
void |
recast(boolean mode)
Indicates whether existing String[] or IData[] arrays for repeating values should be automatically recreated as an Object[] when the inserted or set value type doesn't match
the type of the repeating item array that is already present.
|
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 data,
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 data,
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 object,
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 |
setObject(java.lang.Object value)
Sets the object stored at the current cursor position ( a value or array of repeating values).
|
void |
setTag(XmlDataContentTag tag)
Sets the tag of the current tag-object pair.
|
void |
setValue(java.lang.Object object,
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 key,
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.
|
java.lang.String |
toString() |
public XmlDataTreeCursor copyCursor()
copyCursor
in interface XmlDataCursor
public int count()
XmlDataCursor
count
in interface XmlDataCursor
public int currentIndex()
XmlDataTreeCursor
currentIndex
in interface XmlDataTreeCursor
public IData data()
XmlDataCursor
data
in interface XmlDataCursor
public boolean deleteItem(int... index)
XmlDataTreeCursor
XmlDataCursor.deleteItem(int...)
except that an omitted index
results in current-item deletion.deleteItem
in interface XmlDataCursor
deleteItem
in interface XmlDataTreeCursor
index
- optional offset (starting at zero) into the array of repeating values are presentpublic boolean deleteBackward()
XmlDataTreeCursor
deleteBackward
in interface XmlDataTreeCursor
public boolean deleteForward()
XmlDataTreeCursor
deleteForward
in interface XmlDataTreeCursor
public boolean deleteObject()
XmlDataCursor
deleteObject
in interface XmlDataCursor
public int depth()
XmlDataTreeCursor
XmlDataTreeCursor.firstChild()
or XmlDataTreeCursor.lastChild()
that returns true, the depth increases
by one. For every invocation of XmlDataTreeCursor.parent()
that returns true, the depth decreases by one.depth
in interface XmlDataTreeCursor
public void destroy()
XmlDataCursor
destroy
in interface XmlDataCursor
public boolean first()
XmlDataCursor
first
in interface XmlDataCursor
public boolean first(XmlDataContentTag key)
XmlDataCursor
first
in interface XmlDataCursor
key
- the searched content-tagpublic boolean firstPartial(XmlDataContentTag key)
XmlDataCursor
firstPartial
in interface XmlDataCursor
key
- the searched content-tagpublic boolean firstChild()
XmlDataTreeCursor
XmlDataCursor.getValueCursor(int...)
.firstChild
in interface XmlDataTreeCursor
public boolean firstItem()
XmlDataTreeCursor
firstItem
in interface XmlDataTreeCursor
public XmlDataContentTag getAnyTag(int... index)
XmlDataTreeCursor
XmlDataCursor.getAnyTag(int...)
except that an omitted index references the current-item rather than the first and only item content.getAnyTag
in interface XmlDataCursor
getAnyTag
in interface XmlDataTreeCursor
index
- the index of the repeating valueXmlDataCursor.getAttributeNames(int...)
public XmlDataAttributeTag[] getAttributeNames(int... index)
XmlDataTreeCursor
XmlDataCursor.getAttributeNames(int...)
except that an omitted index references the current-item rather than the first and only item content.getAttributeNames
in interface XmlDataCursor
getAttributeNames
in interface XmlDataTreeCursor
index
- the index of the repeating valueXmlDataCursor.getAttributeNames(int...)
public IData getAttributes(int... index)
XmlDataTreeCursor
XmlDataCursor.getAttributes(int...)
except that an omitted index references the current-item rather than the first and only item content.getAttributes
in interface XmlDataCursor
getAttributes
in interface XmlDataTreeCursor
index
- the index of the repeating valueXmlDataCursor.getAttributes(int...)
public java.lang.String getAttributeValue(XmlDataAttributeTag attribute, int... index)
XmlDataTreeCursor
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
getAttributeValue
in interface XmlDataTreeCursor
attribute
- the tag of the attribute XmlDataAttributeTag)index
- the index of the repeating valueXmlDataCursor.getAttributeValue(XmlDataAttributeTag, int...)
public java.lang.Object getContent(int... index)
XmlDataTreeCursor
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
getContent
in interface XmlDataTreeCursor
index
- the index of the repeating valueXmlDataCursor.getContent(int...)
public java.lang.Object getComplexValueContent(int... index)
XmlDataTreeCursor
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
getComplexValueContent
in interface XmlDataTreeCursor
index
- the index of the repeating valueXmlDataCursor.getComplexValueContent(int...)
public java.lang.String getInstanceProp(java.lang.String name, int... optionalIndex)
XmlDataTreeCursor
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
getInstanceProp
in interface XmlDataTreeCursor
name
- the name of the xsi property (e.g. nil, type)optionalIndex
- the index of the repeating valueXmlDataCursor.getInstanceProp(String, int...)
public java.lang.Object getItem(int... index)
XmlDataTreeCursor
XmlDataCursor.getItem(int...)
except that an omitted index references the current-item rather than the first and only item.getItem
in interface XmlDataCursor
getItem
in interface XmlDataTreeCursor
index
- offset into the repeating content array (if repeating content is present)XmlDataCursor.getItem(int...)
public java.lang.String getNamespaceDecl(java.lang.String prefix, int... optionalIndex)
XmlDataTreeCursor
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
getNamespaceDecl
in interface XmlDataTreeCursor
prefix
- the prefixoptionalIndex
- the index of the repeating valueXmlDataCursor.getNamespaceDecl(String, int...)
public IData getNamespaceDecls(int... optionalIndex)
XmlDataTreeCursor
XmlDataCursor.getNamespaceDecls(int...)
except that an omitted index references the current-item rather than the first and only item content.getNamespaceDecls
in interface XmlDataCursor
getNamespaceDecls
in interface XmlDataTreeCursor
optionalIndex
- the index of the repeating valueXmlDataCursor.getNamespaceDecls(int...)
public XmlDataContentTag getTag()
XmlDataCursor
XmlDataElementTag
, an XmlDataAnyTag
, an XmlDataGroupTag
, or an
XmlDataSubstitutionTag
. An exception is thrown if the cursor is not positioned.getTag
in interface XmlDataCursor
public java.lang.Object getObject()
XmlDataCursor
getObject
in interface XmlDataCursor
public java.lang.Object getValue(int... index)
XmlDataTreeCursor
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
getValue
in interface XmlDataTreeCursor
index
- the offset into repeating contentXmlDataCursor.getValue(int...)
public XmlDataCursor getValueCursor(int... index)
XmlDataCursor
getValueCursor
in interface XmlDataCursor
index
- the index of the repeating valuepublic XmlDataContentTag getValueTag(int... index)
XmlDataTreeCursor
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
getValueTag
in interface XmlDataTreeCursor
index
- the index of the repeating valueXmlDataCursor.getValueTag(int...)
public boolean hasAttributes(int... index)
XmlDataTreeCursor
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
hasAttributes
in interface XmlDataTreeCursor
index
- the offset into repeating content (or no index for the current-item)XmlDataCursor.hasAttributes(int...)
public void home()
XmlDataCursor
home
in interface XmlDataCursor
public void insertItemAfter(java.lang.Object value)
XmlDataTreeCursor
XmlDataTreeCursor.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 XmlDataTreeCursor.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.insertItemAfter
in interface XmlDataTreeCursor
value
- the item to insertpublic void insertItemAfter(java.lang.Object item, int index)
XmlDataCursor
XmlData.createSubstitutionItem(XmlDataElementTag, Object)
or XmlData.createAnyItem(XmlDataContentTag, Object)
.
If the current-object is a scalar, it is promoted to an array prior to insertion of the new item. If the cursor has recast set to true, the new array is an Object[].insertItemAfter
in interface XmlDataCursor
item
- the scalar value inserted (must be simple-value, group-value, complex-value, or indirect-item)index
- The insert position after which the value is insertedpublic void insertObjectAfter(XmlDataContentTag tag, java.lang.Object value)
XmlDataCursor
insertObjectAfter
in interface XmlDataCursor
tag
- the tag of the tag/object pair to be inserted before the current cursor positionvalue
- the item or array of repeating values that is inserted (must be String, String[], IData, IData[], or Object[])public void insertObjectBefore(XmlDataContentTag tag, java.lang.Object value)
XmlDataCursor
insertObjectBefore
in interface XmlDataCursor
tag
- the tag of the tag/object pair to be inserted before the current cursor positionvalue
- the item or array of repeating values that is inserted (must be String, String[], IData, IData[], or Object[])public void insertItemBefore(java.lang.Object value)
XmlDataTreeCursor
XmlDataTreeCursor.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 XmlDataTreeCursor.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.insertItemBefore
in interface XmlDataTreeCursor
value
- the item to insertpublic void insertItemBefore(java.lang.Object value, int index)
XmlDataCursor
XmlData.createSubstitutionItem(XmlDataElementTag, Object)
or XmlData.createAnyItem(XmlDataContentTag, Object)
.
If the current-object is a scalar, it is promoted to an array prior to insertion of the new item. If the cursor has recast set to true, the new array is an Object[].insertItemBefore
in interface XmlDataCursor
value
- the scalar value inserted (must be simple-value, group-value, complex-value, or indirect-item)index
- the index position before which the value is insertedpublic void insertValueAfter(XmlDataContentTag tag, java.lang.Object value)
XmlDataTreeCursor
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.insertValueAfter
in interface XmlDataTreeCursor
tag
- 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-itempublic void insertValueAfter(XmlDataContentTag tag, java.lang.Object value, int index)
XmlDataCursor
insertValueAfter
in interface XmlDataCursor
tag
- the name of the repeating value for indirect-items (may be null if current tag is an element and group)value
- the value to insert (if the current tag is an any tag and the content tag is a substitution tag, value must be a substitution value).index
- the index of the repeating itempublic void insertValueBefore(XmlDataContentTag tag, java.lang.Object value)
XmlDataTreeCursor
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.insertValueBefore
in interface XmlDataTreeCursor
tag
- 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-itempublic void insertValueBefore(XmlDataContentTag tag, java.lang.Object value, int index)
XmlDataCursor
insertValueBefore
in interface XmlDataCursor
tag
- the tag of the value for indirect-items (may be null if current tag is an element and group tag)value
- the value to insert (if the current tag is an any tag and the content tag is a substitution tag, value must be a substitution value).index
- the index of the repeating itempublic boolean isAny()
XmlDataCursor
isAny
in interface XmlDataCursor
public boolean isComplexValue(int... index)
XmlDataTreeCursor
XmlDataCursor.isComplexValue(int...)
except that an omitted index references the current-item.isComplexValue
in interface XmlDataCursor
isComplexValue
in interface XmlDataTreeCursor
index
- the offset into repeating content (or no index for the current-item)public boolean isEmpty(int... index)
XmlDataTreeCursor
XmlDataCursor.isEmpty(int...)
except that an omitted index references the current-item.isEmpty
in interface XmlDataCursor
isEmpty
in interface XmlDataTreeCursor
index
- the offset into repeating content (or no index for the current-item)XmlDataCursor.isEmpty(int...)
public boolean isGroup()
XmlDataCursor
isGroup
in interface XmlDataCursor
XmlDataContentTag.isGroup()
public boolean isGroupValue(int... index)
XmlDataTreeCursor
XmlDataCursor.isGroupValue(int...)
except that an omitted index references the current-item.isGroupValue
in interface XmlDataCursor
isGroupValue
in interface XmlDataTreeCursor
index
- the offset into repeating content (or no index for the current-item)XmlData.isGroupValue(Object)
public boolean isHome()
XmlDataCursor
isHome
in interface XmlDataCursor
public boolean isRecast()
XmlDataCursor
isRecast
in interface XmlDataCursor
public boolean isRepeating()
XmlDataCursor
isRepeating
in interface XmlDataCursor
public boolean isSimpleValue(int... index)
XmlDataTreeCursor
XmlDataCursor.isSimpleValue(int...)
except that an omitted index references the current-item.isSimpleValue
in interface XmlDataCursor
isSimpleValue
in interface XmlDataTreeCursor
index
- the offset into repeating content (or no index for the current-item)public boolean isSubstitution()
XmlDataCursor
isSubstitution
in interface XmlDataCursor
public boolean isTop()
XmlDataTreeCursor
isTop
in interface XmlDataTreeCursor
public boolean last()
XmlDataCursor
last
in interface XmlDataCursor
public boolean last(XmlDataContentTag key)
XmlDataCursor
last
in interface XmlDataCursor
key
- the searched content-tagpublic boolean lastPartial(XmlDataContentTag key)
XmlDataCursor
lastPartial
in interface XmlDataCursor
key
- the XmlDataContentTag to be searchedpublic boolean lastChild()
XmlDataTreeCursor
XmlDataCursor.getValueCursor(int...)
.lastChild
in interface XmlDataTreeCursor
public boolean lastItem()
XmlDataTreeCursor
lastItem
in interface XmlDataTreeCursor
public XmlDataTreeCursor newCursor(IData data)
XmlDataCursor
newCursor
in interface XmlDataCursor
data
- an existing IData who's cursor factory is used to create a new XmlDataCursor instance.public boolean next()
XmlDataCursor
next
in interface XmlDataCursor
public boolean next(XmlDataContentTag key)
XmlDataCursor
next
in interface XmlDataCursor
key
- the searched content-tagpublic boolean nextPartial(XmlDataContentTag key)
XmlDataCursor
nextPartial
in interface XmlDataCursor
key
- the searched content-tagpublic java.lang.Integer nextInOrder()
XmlDataTreeCursor
nextInOrder
in interface XmlDataTreeCursor
public boolean nextItem()
XmlDataTreeCursor
nextItem
in interface XmlDataTreeCursor
public boolean nextItem(XmlDataContentTag key)
XmlDataTreeCursor
XmlDataTreeCursor.nextValueTag(XmlDataContentTag)
method.
The tag match is based on the partial-name (it does not include the particle-id).nextItem
in interface XmlDataTreeCursor
key
- the tag that is compared to item tagspublic boolean nextValueTag(XmlDataContentTag key)
XmlDataTreeCursor
XmlDataTreeCursor.nextItem(XmlDataContentTag)
.
However, for any-items and substitution-items,
the XmlDataTreeCursor.nextItem()
's value-tag is used for comparison.
This method is more easily used for a general search than the XmlDataTreeCursor.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).nextValueTag
in interface XmlDataTreeCursor
key
- the tag which is compared to item value-tagspublic boolean parent()
XmlDataTreeCursor
XmlDataTreeCursor.firstChild()
or XmlDataTreeCursor.lastChild()
had never been invoked on this cursor,
the parent() method will always return false.parent
in interface XmlDataTreeCursor
public boolean previous()
XmlDataCursor
previous
in interface XmlDataCursor
public boolean previous(XmlDataContentTag key)
XmlDataCursor
previous
in interface XmlDataCursor
key
- the searched content-tagpublic boolean previousPartial(XmlDataContentTag key)
XmlDataCursor
previousPartial
in interface XmlDataCursor
key
- the searched content-tagpublic java.lang.Integer previousInOrder()
XmlDataTreeCursor
previousInOrder
in interface XmlDataTreeCursor
public boolean previousItem()
XmlDataTreeCursor
previousItem
in interface XmlDataTreeCursor
public boolean previousItem(XmlDataContentTag key)
XmlDataTreeCursor
XmlDataTreeCursor.previousValueTag(XmlDataContentTag)
method.
The tag match is based on the partial-name (it does not include the particle-id).previousItem
in interface XmlDataTreeCursor
key
- the raw tagpublic boolean previousValueTag(XmlDataContentTag key)
XmlDataTreeCursor
XmlDataTreeCursor.previousItem(XmlDataContentTag)
.
However, for any-items and substitution-items
the XmlDataTreeCursor.previousItem()
's value-tag is used for comparison.
This method is more easily used for a general search than XmlDataTreeCursor.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).previousValueTag
in interface XmlDataTreeCursor
key
- the tag which is comparedpublic void recast(boolean mode)
XmlDataCursor
recast
in interface XmlDataCursor
mode
- true causes automatic recast; default is falsepublic boolean removeAttribute(XmlDataAttributeTag attribute, int... index)
XmlDataTreeCursor
XmlDataCursor.removeAttribute(XmlDataAttributeTag, int...)
except that an omitted index references
the current-item.removeAttribute
in interface XmlDataCursor
removeAttribute
in interface XmlDataTreeCursor
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...)
public void setAnyTag(XmlDataContentTag tag, int... index)
XmlDataTreeCursor
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
setAnyTag
in interface XmlDataTreeCursor
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...)
public void setAttributes(IData attributes, int... index)
XmlDataTreeCursor
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
setAttributes
in interface XmlDataTreeCursor
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...)
public void setAttributeValue(XmlDataAttributeTag attribute, java.lang.String value, int... index)
XmlDataTreeCursor
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
setAttributeValue
in interface XmlDataTreeCursor
attribute
- an XmlDataAttributeTagvalue
- the value to set (must be a String)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.setAttributeValue(XmlDataAttributeTag, String, int...)
public void setComplexValueContent(java.lang.Object data, int... index)
XmlDataTreeCursor
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
setComplexValueContent
in interface XmlDataTreeCursor
data
- the item contentindex
- optional offset when repeating values are presentXmlDataCursor.setComplexValueContent(Object, int...)
public void setContent(java.lang.Object data, int... index)
XmlDataTreeCursor
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
setContent
in interface XmlDataTreeCursor
data
- the item contentindex
- optional offset when repeating values are presentXmlDataCursor.setContent(Object, int...)
public void setIndex(int index)
XmlDataTreeCursor
setIndex
in interface XmlDataTreeCursor
index
- the index specifying the current-itempublic void setInstanceProp(java.lang.String name, java.lang.String value, int... index)
XmlDataCursor
setInstanceProp
in interface XmlDataCursor
setInstanceProp
in interface XmlDataTreeCursor
name
- the name of the property(e.g. 'nil')value
- the value of the property (e.g. 'true')index
- the offset index into repeating valuespublic void setNamespaceDecl(java.lang.String prefix, java.lang.String uri, int... index)
XmlDataTreeCursor
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
setNamespaceDecl
in interface XmlDataTreeCursor
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...)
public void setNamespaceDecls(IData nsDecls, int... index)
XmlDataTreeCursor
XmlDataCursor.setNamespaceDecls(IData, int...)
except that an omitted index always references the current-item rather the first and only item.setNamespaceDecls
in interface XmlDataCursor
setNamespaceDecls
in interface XmlDataTreeCursor
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...)
public void setItem(java.lang.Object object, int... index)
XmlDataTreeCursor
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
setItem
in interface XmlDataTreeCursor
object
- 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...)
public void setObject(java.lang.Object value)
XmlDataCursor
setObject
in interface XmlDataCursor
value
- the offset to be stored at the current element.public void setTag(XmlDataContentTag tag)
XmlDataCursor
setTag
in interface XmlDataCursor
tag
- is one of the XmlDataContentTags mentioned above.public void setValue(java.lang.Object object, int... index)
XmlDataTreeCursor
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
setValue
in interface XmlDataTreeCursor
object
- 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...)
public void setValueTag(XmlDataContentTag key, int... index)
XmlDataTreeCursor
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
setValueTag
in interface XmlDataTreeCursor
key
- the tag assigned to the current valueindex
- the offset into the repeating value arrayXmlDataCursor.setValueTag(XmlDataContentTag, int...)
public void top()
XmlDataTreeCursor
top
in interface XmlDataTreeCursor
public java.lang.String toString()
toString
in class java.lang.Object