|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XOperator
The X-operator of an X-operable object allows to perform XML updates operations and XPath navigation on this object. An X-operable object is free to support all or only a few of this XML features. An X-operable object must not be invoked directly by its X-operator, but by using the MasterXOperator responsible of X-operators invokation.
There is a single instance for each type which is X-operable.
XOperable,
AbstractXOperator,
XMaster| Method Summary | |
|---|---|
void |
append(int referent,
Object parent,
Object operand)
Appends an object to the end of the child list of a referent object. |
void |
append(Object referent,
Object operand)
Appends an object to the end of the child list of a referent object. |
boolean |
booleanValueOf(Object referent)
Return the boolean evaluation of a value, given by the XPath boolean() function. |
void |
clear(int referent,
Object parent)
Clear the content of a referent object. |
void |
clear(Object referent)
Clear the content of a referent object. |
void |
clearAll(int referent,
Object parent)
Removes all the childs of a referent object. |
void |
clearAll(Object referent)
Removes all the childs of a referent object. |
Object |
clone(int referent,
Object parent)
Clones a referent object to a new one that is a field to field copy of the referent object. |
Object |
clone(Object referent)
Clones a referent object to a new one that is a field to field copy of the referent object. |
Map |
getAttributes(Object referent)
Returns the attributes of the given referent object. |
Object |
getAttributeValue(Object referent,
QName attribute)
Returns the attribute value hosted by the given referent object. |
List |
getChildren(Object referent)
Returns the children of the given referent object. |
Object |
getCommentAt(Object referent,
int index)
Return the child comment at the position specified. |
Object |
getElementAt(Object referent,
int index)
Return the child element at the position specified. |
Object |
getElementById(QName id,
Object referent)
Return an object by its ID. |
Iterator |
getElementsByName(Object referent,
QName name)
Return the children elements that have the given name. |
int |
getFamilyIndex(Object referent)
Return the intrinsic position of the referent amongs items of the same family ; for an element <f:foo>, the XPath pattern f:*[n] would use this method in order to test its position. |
int |
getFamilySize(Object referent)
Return the intrinsic size of the referent's collection of items of the same family ; for an element <f:foo>, the XPath pattern f:*[last()] would use this method in order to test its position. |
int |
getIndex(Object referent)
Return the intrinsic position of the referent ; for an element <foo>, the XPath pattern node()[n] would use this method in order to test its position. |
Object |
getNamedElementAt(Object referent,
int index,
QName qname)
Return the child element at the position specified with a specific name. |
Object |
getNamedProcessingInstructionAt(Object referent,
int index,
QName target)
Return the child processing instruction at the position specified with a specific target. |
int |
getNameIndex(Object referent)
Return the intrinsic position of the referent amongs items of the same name ; for an element <foo>, the XPath pattern foo[n] would use this method in order to test its position. |
int |
getNameSize(Object referent)
Return the intrinsic size of the referent's collection of items of the same name ; for an element <foo>, the XPath pattern foo[last()] would use this method in order to test its position. |
Map |
getNamespaces(Object referent)
Returns the namespaces of the given referent object. |
Object |
getNext(Object referent)
Returns the next object. |
Object |
getNodeAt(Object referent,
int index)
Return the child item at the position specified. |
String |
getNodeKind(Object referent)
|
short |
getNodeType(Object referent)
Returns the type of node that the given referent object represents. |
Object |
getParent(Object referent)
Returns the parent of the given referent object. |
Object |
getPrevious(Object referent)
Returns the previous object. |
Object |
getProcessingInstructionAt(Object referent,
int index)
Return the child processing instruction at the position specified. |
QName |
getQName(Object referent)
Retrieve the qualified name of the referent object if any, or null. |
Object |
getRoot(Object referent)
Return the root in the hierarchy. |
int |
getSize(Object referent)
Return the intrinsic size of the collection to which belongs the referent ; for an element <foo>, the XPath pattern node()[last()] would use this method in order to test its size. |
String |
getStringAttributeValue(Object referent,
QName attribute)
Returns the string attribute value hosted by the given referent object. |
String |
getStringName(Object referent)
Retrieve the string name of the referent object if any, or null. |
Object |
getTextAt(Object referent,
int index)
Return the child text at the position specified. |
Type |
getType(Object referent)
Returns the type of the given referent object. |
int |
getTypeIndex(Object referent)
Return the intrinsic position of the referent amongs items of the same type ; for an element <foo>, the XPath pattern *[n] would use this method in order to test its position. |
QName |
getTypeName(Object referent)
Return the type name of the referent. |
int |
getTypeSize(Object referent)
Return the intrinsic size of the referent's collection of items of the same type ; for an element <foo>, the XPath pattern *[last()] would use this method in order to test its position. |
Object |
getValue(Object referent)
Retrieve the value of the referent object, or null. |
XFactory |
getXFactory()
Return the factory that built this X-operator. |
short |
getXMLType(Object referent)
|
void |
insertAfter(int referent,
Object parent,
Object operand)
Inserts an object after the referent object given. |
void |
insertAfter(Object referent,
Object parent,
Object operand)
Inserts an object after the referent object given. |
void |
insertBefore(int referent,
Object parent,
Object operand)
Inserts an object before the referent object given. |
void |
insertBefore(Object referent,
Object parent,
Object operand)
Inserts an object before the referent object given. |
boolean |
isAttribute(Object referent)
|
boolean |
isComment(Object referent)
|
boolean |
isDocument(Object referent)
|
boolean |
isElement(Object referent)
|
boolean |
isParentNode(Object referent)
Indicate if the referent is a parent node, that is to say if it can have children. |
boolean |
isProcessingInstruction(Object referent)
|
boolean |
isText(Object referent)
|
Number |
numberValueOf(Object referent)
Return the number evaluation of a value, given by the XPath number() function. |
void |
remove(int referent,
Object parent)
Removes a referent object from its parent. |
void |
remove(Object referent,
Object parent)
Removes a referent object from its parent. |
boolean |
removeAttribute(Object referent,
QName attribute)
Removes an attribute hosted by the given referent object. |
void |
rename(int referent,
Object parent,
QName newName)
Renames a referent object. |
void |
rename(Object referent,
Object parent,
QName newName)
Renames a referent object. |
void |
replace(int referent,
Object parent,
Object operand)
Replaces a referent object by another object from its parent. |
void |
replace(Object referent,
Object parent,
Object operand)
Replaces a referent object by another object from its parent. |
void |
setAttribute(Object referent,
QName attribute,
Object value)
Sets the attribute value hosted by the given referent object. |
String |
stringValueOf(Object referent)
Return the string evaluation of a value, given by the XPath string() function. |
void |
update(int referent,
Object parent,
Object value)
Updates a referent object with a value. |
void |
update(Object referent,
Object value)
Updates a referent object with a value. |
Object |
valueOf(Object referent)
|
| Method Detail |
|---|
XFactory getXFactory()
void append(Object referent,
Object operand)
throws UnsupportedOperationException
referent - The referent object to append to.operand - The object to append.
UnsupportedOperationException - When the operation is not supported.
void append(int referent,
Object parent,
Object operand)
throws UnsupportedOperationException
referent - The position of the referent object to append to.parent - The non null parent object of the referent.operand - The object to append.
UnsupportedOperationException - When the operation is not supported.
void clear(Object referent)
throws UnsupportedOperationException
referent - The referent object to clear.
UnsupportedOperationException - When the operation is not supported.
void clear(int referent,
Object parent)
throws UnsupportedOperationException
referent - The position of the referent object to clear.parent - The non null parent object of the referent.
UnsupportedOperationException - When the operation is not supported.
void clearAll(Object referent)
throws UnsupportedOperationException
referent - The referent object to clear all.
UnsupportedOperationException - When the operation is not supported.
void clearAll(int referent,
Object parent)
throws UnsupportedOperationException
referent - The position of the referent object to clear all.parent - The non null parent object of the referent.
UnsupportedOperationException - When the operation is not supported.
Object clone(Object referent)
throws UnsupportedOperationException
referent - The referent object to clone.
UnsupportedOperationException - When the operation is not supported.
Object clone(int referent,
Object parent)
throws UnsupportedOperationException
referent - The position of the referent object to clone.parent - The non null parent object of the referent.
UnsupportedOperationException - When the operation is not supported.
void insertAfter(Object referent,
Object parent,
Object operand)
throws UnsupportedOperationException
referent - The referent object where to insert after.parent - The parent object of the referent, or null if the
referent is able to retrieve it by itself.operand - The object to insert.
UnsupportedOperationException - When the operation is not supported.
void insertAfter(int referent,
Object parent,
Object operand)
throws UnsupportedOperationException
referent - The position of the referent object where to insert after.parent - The non null parent object of the referent.operand - The object to insert.
UnsupportedOperationException - When the operation is not supported.
void insertBefore(Object referent,
Object parent,
Object operand)
throws UnsupportedOperationException
referent - The referent object where to insert before.parent - The parent object of the referent, or null if the
referent is able to retrieve it by itself.operand - The object to insert.
UnsupportedOperationException - When the operation is not supported.
void insertBefore(int referent,
Object parent,
Object operand)
throws UnsupportedOperationException
referent - The position of the referent object where to insert before.parent - The non null parent object of the referent.operand - The object to insert.
UnsupportedOperationException - When the operation is not supported.
void remove(Object referent,
Object parent)
throws UnsupportedOperationException
referent - The referent object to remove.parent - The parent object of the referent, or null if the
referent is able to retrieve it by itself.
UnsupportedOperationException - When the operation is not supported.
void remove(int referent,
Object parent)
throws UnsupportedOperationException
referent - The position of the referent object to remove.parent - The non null parent object of the referent.
UnsupportedOperationException - When the operation is not supported.
void rename(Object referent,
Object parent,
QName newName)
throws UnsupportedOperationException
referent - The referent object to rename.parent - The parent object of the referent, or null if the
referent is able to retrieve it by itself or may be renamed
without involving its parent.newName - The new name of the referent object. If the referent object
only support String, the QName should be built with an NCName.
UnsupportedOperationException - When the operation is not supported.
void rename(int referent,
Object parent,
QName newName)
throws UnsupportedOperationException
referent - The position of the referent object to rename.parent - The non null parent object of the referent.newName - The new name of the referent object. If the referent object
only support String, the QName should be built with an NCName.
UnsupportedOperationException - When the operation is not supported.
void replace(Object referent,
Object parent,
Object operand)
throws UnsupportedOperationException
referent - The referent object to replace.parent - The parent object of the referent, or null if the
referent is able to retrieve it by itself.operand - The object that will replace the referent object.
UnsupportedOperationException - When the operation is not supported.
void replace(int referent,
Object parent,
Object operand)
throws UnsupportedOperationException
referent - The position of the referent object to replace.parent - The non null parent object of the referent.operand - The object that will replace the referent object.
UnsupportedOperationException - When the operation is not supported.
void update(Object referent,
Object value)
throws UnsupportedOperationException
referent - The referent object to update.value - The new value of the referent.
UnsupportedOperationException - When the operation is not supported.
void update(int referent,
Object parent,
Object value)
throws UnsupportedOperationException
referent - The position of the referent object to update.parent - The non null parent object of the referent.value - The new value of the referent.
UnsupportedOperationException - When the operation is not supported.List getChildren(Object referent)
referent - The referent object.
Object getParent(Object referent)
The parent returned is not the structural parent of the object, but the functional parent ; for example, if a component stores its attributes in a Map, the parent of an attribute of the component is not the Map that hold the attributes but the component itself.
referent - The referent object.
Object getNext(Object referent)
referent - The referent object.
Object getPrevious(Object referent)
referent - The referent object.
Map getAttributes(Object referent)
referent - The referent object.
Map getNamespaces(Object referent)
referent - The referent object.
Type getType(Object referent)
referent - The referent object.
QName getTypeName(Object referent)
referent - The referent object.
QName getQName(Object referent)
referent - The referent object.
String getStringName(Object referent)
referent - The referent object.
Object getValue(Object referent)
referent - The referent object.
short getNodeType(Object referent)
referent - The referent object.XType
Object getAttributeValue(Object referent,
QName attribute)
referent - The referent object.attribute - The name of the attribute.
String getStringAttributeValue(Object referent,
QName attribute)
referent - The referent object.attribute - The name of the attribute.
void setAttribute(Object referent,
QName attribute,
Object value)
throws UnsupportedOperationException
referent - The referent object.attribute - The name of the attribute.value - The value of the attribute.
UnsupportedOperationException - When the operation is not supported.
boolean removeAttribute(Object referent,
QName attribute)
referent - The referent object.attribute - The name of the attribute to remove.
int getIndex(Object referent)
referent - The referent object.
int getTypeIndex(Object referent)
referent - The referent object.
int getFamilyIndex(Object referent)
referent - The referent object.
int getNameIndex(Object referent)
referent - The referent object.
int getSize(Object referent)
referent - The referent object.
int getTypeSize(Object referent)
referent - The referent object.
int getFamilySize(Object referent)
referent - The referent object.
int getNameSize(Object referent)
referent - The referent object.
Object getElementById(QName id,
Object referent)
id - The ID.referent - The referent.
null.
Iterator getElementsByName(Object referent,
QName name)
referent - The referent.name - The name.
null iterator on the elements that has the name given.
Object getElementAt(Object referent,
int index)
referent - The parent node.index - The index.
null.
Object getNodeAt(Object referent,
int index)
referent - The parent node.index - The index.
null.
Object getTextAt(Object referent,
int index)
referent - The parent node.index - The index.
null.
Object getCommentAt(Object referent,
int index)
referent - The parent node.index - The index.
null.
Object getProcessingInstructionAt(Object referent,
int index)
referent - The parent node.index - The index.
null.
Object getNamedElementAt(Object referent,
int index,
QName qname)
referent - The parent node.index - The index.qname - The name of the element to count.
null.
Object getNamedProcessingInstructionAt(Object referent,
int index,
QName target)
referent - The parent node.index - The index.target - The target of the PI to count, as an NCName.
null.boolean isDocument(Object referent)
referent -
boolean isElement(Object referent)
referent -
boolean isAttribute(Object referent)
referent -
boolean isText(Object referent)
referent -
boolean isComment(Object referent)
referent -
boolean isProcessingInstruction(Object referent)
referent -
short getXMLType(Object referent)
String getNodeKind(Object referent)
boolean isParentNode(Object referent)
referent - The referent.
true if it is a parent node, false otherwise.String stringValueOf(Object referent)
string() function. Objects other than those usually
processed by the XPath string() function are converted
with their own toString() method.
referent - The object to convert to string.
null string value of the object.Number numberValueOf(Object referent)
number() function. Objects other than those usually
processed by the XPath number() function are converted
with their own toString() method then with the
number() function to the result string.
referent - The object to convert to number.
null number value of the object, can be NaN.boolean booleanValueOf(Object referent)
boolean() function. Objects other than those usually
processed by the XPath boolean() function are converted
with their own toString() method then with the
boolean() function to the result string.
referent - The object to convert to boolean.
Object getRoot(Object referent)
referent - An item in the hierarchy.
null, null
is returned.Object valueOf(Object referent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||