org.inria.ns.reflex.xml
Class MasterXOperator

java.lang.Object
  extended by org.inria.ns.reflex.xml.MasterXOperator

Deprecated.

public class MasterXOperator
extends Object

The MasterXOperator is the entry point to access or operate on XML objects or X-operable objects; it deals directly with the invokations performed on XML object or collections, and delegate the invokations performed on X-operable objects. An X-operator provides a way to access to objects as if they were XML objects. The possible accesses are XPath navigation and XML update operations. An X-operable object is free to support all or only a few of this XML features. An X-operable object usually provides an X-operator that perform the accesses to the object in an XML way. This implementation is a master X-operator that invokes the X-operator of the underlying object, if any, or deal directly with other X-operable objects that don't have an X-operator implementation.

Author:
Philippe Poulard
See Also:
XOperable, XOperator, AbstractXOperator

Method Summary
 void append(int referent, Object parent, Object operand)
          Deprecated. Appends an object to the end of the child list of a referent object.
 void append(Object referent, Object operand)
          Deprecated. Appends an object to the end of the child list of a referent object.
 void clear(int referent, Object parent)
          Deprecated. Clear the content of a referent object.
 void clear(Object referent)
          Deprecated. Clear the content of a referent object.
 void clearAll(int referent, Object parent)
          Deprecated. Removes all the childs of a referent object.
 void clearAll(Object referent)
          Deprecated. Removes all the childs of a referent object.
 Object clone(int referent, Object parent)
          Deprecated. Clones a referent object to a new one that is a field to field copy of the referent object.
 Object clone(Object referent)
          Deprecated. Clones a referent object to a new one that is a field to field copy of the referent object.
 Iterator getAncestorAxisIterator(Object referent)
          Deprecated. Return an iterator on the ancestor axis based on parent axis.
 Iterator getAncestorOrSelfAxisIterator(Object referent)
          Deprecated. Return an iterator on the ancestor or self axis based on the self axis and the parent axis.
 Iterator getAttributeAxisIterator(Object contextNode)
          Deprecated. Retrieve an Iterator matching the attribute xpath axis.
 Map getAttributes(Object contextNode)
          Deprecated.  
 Iterator getChildAxisIterator(Object referent)
          Deprecated. Retrieve an Iterator matching the child XPath axis.
 Iterator getDescendantAxisIterator(Object referent)
          Deprecated. Return an iterator on the descendant axis based on child axis.
 Iterator getDescendantOrSelfAxisIterator(Object referent)
          Deprecated. Return an iterator on the descendant or self axis based on the descendant axis and self axis.
 Iterator getFollowingAxisIterator(Object referent)
          Deprecated. Return an iterator on the following axis based on the following sibling axis and descendant or self axis, and parent node.
 Iterator getFollowingSiblingAxisIterator(Object referent)
          Deprecated. Return an iterator on the following sibling axis based on the parent node and its child axis.
static MasterXOperator getInstance()
          Deprecated. Get a singleton MasterXOperator for efficiency.
 Iterator getNamespaceAxisIterator(Object contextNode)
          Deprecated. Retrieve an Iterator matching the namespace xpath axis.
 Map getNamespaces(Object contextNode)
          Deprecated. Get the namespaces defined explicitely by a given node.
 Object getParent(Object referent)
          Deprecated. Returns the parent of the given context node.
 Iterator getParentAxisIterator(Object referent)
          Deprecated. Return an iterator on the parent axis based on the parent of the referent object.
 Iterator getPrecedingAxisIterator(Object referent)
          Deprecated. Return an iterator on the preceding axis based on the self axis, the child axis, the preceding sibling axis, and the parent node.
 Iterator getPrecedingSiblingAxisIterator(Object referent)
          Deprecated. Return an iterator on the preceding sibling axis based on the parent node and its child axis.
 QName getQName(Object referent)
          Deprecated. Retrieve the qualified name of the referent object if any, or null.
 Iterator getSelfAxisIterator(Object referent)
          Deprecated. Retrieve an Iterator matching the self XPath axis.
 String getStringName(Object referent)
          Deprecated. Retrieve the string name of the referent object if any, or null.
 String getStringValue(Object referent)
          Deprecated. Retrieve the string value of the referent object, or null.
 short getXMLType(Object node)
          Deprecated. Returns a number that identifies the type of node that the given object represents.
 XType getXType(Object o)
          Deprecated. Returns the type of the object given.
 void insertAfter(int referent, Object parent, Object operand)
          Deprecated. Inserts an object after the referent object given.
 void insertAfter(Object referent, Object parent, Object operand)
          Deprecated. Inserts an object after the referent object given.
 void insertBefore(int referent, Object parent, Object operand)
          Deprecated. Inserts an object before the referent object given.
 void insertBefore(Object referent, Object parent, Object operand)
          Deprecated. Inserts an object before the referent object given.
 void remove(int referent, Object parent)
          Deprecated. Removes a referent object from its parent.
 void remove(Object referent, Object parent)
          Deprecated. Removes an item from its parent.
 void rename(int referent, Object parent, QName newName)
          Deprecated. Renames a referent object.
 void rename(Object referent, Object parent, QName newName)
          Deprecated. Renames a referent object.
 void replace(int referent, Object parent, Object operand)
          Deprecated. Replaces a referent object by another object from its parent.
 void replace(Object referent, Object parent, Object value)
          Deprecated. Replaces a referent object by another object from its parent.
 void setAttribute(Object referent, QName name, Object value)
          Deprecated. Appends an object to the end of the child list of a referent object.
 void update(int referent, Object parent, Object value)
          Deprecated. Updates a referent object with a value.
 void update(Object referent, Object value)
          Deprecated. Updates a referent object with a value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MasterXOperator getInstance()
Deprecated. 
Get a singleton MasterXOperator for efficiency.

Returns:
A singleton instance of a UniversalXOperator.

getChildAxisIterator

public Iterator getChildAxisIterator(Object referent)
                              throws UnsupportedAxisException
Deprecated. 
Retrieve an Iterator matching the child XPath axis.

Parameters:
referent - The origin context node.
Returns:
An Iterator capable of traversing the axis.
Throws:
UnsupportedAxisException - is the semantics of this axis are not supported by this object model.

getAttributeAxisIterator

public Iterator getAttributeAxisIterator(Object contextNode)
                                  throws UnsupportedAxisException
Deprecated. 
Retrieve an Iterator matching the attribute xpath axis.

Parameters:
contextNode - The origin context node.
Returns:
An Iterator capable of traversing the axis.
Throws:
UnsupportedAxisException - is the semantics of this axis are not supported by this object model.

getAttributes

public Map getAttributes(Object contextNode)
Deprecated. 

getDescendantAxisIterator

public Iterator getDescendantAxisIterator(Object referent)
                                   throws UnsupportedAxisException
Deprecated. 
Return an iterator on the descendant axis based on child axis.

Parameters:
referent - The referent X-operable object used as context.
Returns:
An iterator on the descendant axis.
Throws:
UnsupportedAxisException - If this axis is not supported by the referent object.

getAncestorAxisIterator

public Iterator getAncestorAxisIterator(Object referent)
                                 throws UnsupportedAxisException
Deprecated. 
Return an iterator on the ancestor axis based on parent axis.

Parameters:
referent - The referent X-operable object used as context.
Returns:
An iterator on the ancestor axis.
Throws:
UnsupportedAxisException - If this axis is not supported by the referent object.

getFollowingSiblingAxisIterator

public Iterator getFollowingSiblingAxisIterator(Object referent)
                                         throws UnsupportedAxisException
Deprecated. 
Return an iterator on the following sibling axis based on the parent node and its child axis.

Parameters:
referent - The referent X-operable object used as context.
Returns:
An iterator on the following sibling axis.
Throws:
UnsupportedAxisException - If this axis is not supported by the referent object.

getPrecedingSiblingAxisIterator

public Iterator getPrecedingSiblingAxisIterator(Object referent)
                                         throws UnsupportedAxisException
Deprecated. 
Return an iterator on the preceding sibling axis based on the parent node and its child axis.

Parameters:
referent - The referent X-operable object used as context.
Returns:
An iterator on the preceding sibling axis.
Throws:
UnsupportedAxisException - If this axis is not supported by the referent object.

getFollowingAxisIterator

public Iterator getFollowingAxisIterator(Object referent)
                                  throws UnsupportedAxisException
Deprecated. 
Return an iterator on the following axis based on the following sibling axis and descendant or self axis, and parent node.

Parameters:
referent - The referent X-operable object used as context.
Returns:
An iterator on the following axis.
Throws:
UnsupportedAxisException - If this axis is not supported by the referent object.

getPrecedingAxisIterator

public Iterator getPrecedingAxisIterator(Object referent)
                                  throws UnsupportedAxisException
Deprecated. 
Return an iterator on the preceding axis based on the self axis, the child axis, the preceding sibling axis, and the parent node.

Parameters:
referent - The referent X-operable object used as context.
Returns:
An iterator on the preceding axis.
Throws:
UnsupportedAxisException - If this axis is not supported by the referent object.

getDescendantOrSelfAxisIterator

public Iterator getDescendantOrSelfAxisIterator(Object referent)
                                         throws UnsupportedAxisException
Deprecated. 
Return an iterator on the descendant or self axis based on the descendant axis and self axis.

Parameters:
referent - The referent X-operable object used as context.
Returns:
An iterator on the descendant or self axis.
Throws:
UnsupportedAxisException - If this axis is not supported by the referent object.

getAncestorOrSelfAxisIterator

public Iterator getAncestorOrSelfAxisIterator(Object referent)
                                       throws UnsupportedAxisException
Deprecated. 
Return an iterator on the ancestor or self axis based on the self axis and the parent axis.

Parameters:
referent - The referent X-operable object used as context.
Returns:
An iterator on the ancestor or self axis.
Throws:
UnsupportedAxisException - If this axis is not supported by the referent object.

getNamespaceAxisIterator

public Iterator getNamespaceAxisIterator(Object contextNode)
                                  throws UnsupportedAxisException
Deprecated. 
Retrieve an Iterator matching the namespace xpath axis.

Parameters:
contextNode - The origin context node.
Returns:
An Iterator capable of traversing the axis.
Throws:
UnsupportedAxisException - is the semantics of this axis are not supported by this object model.

getNamespaces

public Map getNamespaces(Object contextNode)
Deprecated. 
Get the namespaces defined explicitely by a given node.

Parameters:
contextNode - The origin context node.
Returns:
The map of namespaces.
Throws:
UnsupportedAxisException - is the semantics of this axis are not supported by this object model.

getSelfAxisIterator

public Iterator getSelfAxisIterator(Object referent)
                             throws UnsupportedAxisException
Deprecated. 
Retrieve an Iterator matching the self XPath axis.

Parameters:
referent - The origin context node.
Returns:
An Iterator capable of traversing the axis.
Throws:
UnsupportedAxisException - is the semantics of this axis are not supported by this object model.

getParentAxisIterator

public Iterator getParentAxisIterator(Object referent)
                               throws UnsupportedAxisException
Deprecated. 
Return an iterator on the parent axis based on the parent of the referent object.

Parameters:
referent - The referent X-operable object used as context.
Returns:
An iterator on the parent axis.
Throws:
UnsupportedAxisException - If this axis is not supported by the referent object. This implementation doesn't throw the exception.

getParent

public Object getParent(Object referent)
Deprecated. 
Returns the parent of the given context node.

Parameters:
referent - The context node.
Returns:
The parent of the context node.

getQName

public QName getQName(Object referent)
Deprecated. 
Retrieve the qualified name of the referent object if any, or null.

Parameters:
referent - The referent object.
Returns:
The qualified name of the referent object.

getStringName

public String getStringName(Object referent)
Deprecated. 
Retrieve the string name of the referent object if any, or null.

Parameters:
referent - The referent object.
Returns:
The string name of the referent object.

getStringValue

public String getStringValue(Object referent)
Deprecated. 
Retrieve the string value of the referent object, or null.

Parameters:
referent - The referent object.
Returns:
The string value of the referent object.

getXType

public XType getXType(Object o)
Deprecated. 
Returns the type of the object given.

Parameters:
o - The object.
Returns:
XType Its type.

getXMLType

public short getXMLType(Object node)
Deprecated. 
Returns a number that identifies the type of node that the given object represents.


append

public void append(Object referent,
                   Object operand)
            throws UnsupportedOperationException
Deprecated. 
Appends an object to the end of the child list of a referent object. This implementation support XML objects and XOperable objects.

Parameters:
referent - The referent object to append to.
operand - The object to append.
Throws:
UnsupportedOperationException - When the operation is not supported.

setAttribute

public void setAttribute(Object referent,
                         QName name,
                         Object value)
                  throws UnsupportedOperationException
Deprecated. 
Appends an object to the end of the child list of a referent object. This implementation support XML objects and XOperable objects.

Parameters:
referent - The referent object to append to.
operand - The object to append.
Throws:
UnsupportedOperationException - When the operation is not supported.

append

public void append(int referent,
                   Object parent,
                   Object operand)
            throws UnsupportedOperationException
Deprecated. 
Appends an object to the end of the child list of a referent object. This implementation support XML objects and XOperable objects.

Parameters:
referent - The position of the referent object to append to.
parent - The non null parent object of the referent.
operand - The object to append.
Throws:
UnsupportedOperationException - When the operation is not supported.

clear

public void clear(Object referent)
           throws UnsupportedOperationException
Deprecated. 
Clear the content of a referent object. This implementation support XML objects and XOperable objects.

Parameters:
referent - The referent object to clear.
Throws:
UnsupportedOperationException - When the operation is not supported.

clear

public void clear(int referent,
                  Object parent)
           throws UnsupportedOperationException
Deprecated. 
Clear the content of a referent object. This implementation support XML objects and XOperable objects.

Parameters:
referent - The position of the referent object to append to.
parent - The non null parent object of the referent.
Throws:
UnsupportedOperationException - When the operation is not supported.

clearAll

public void clearAll(Object referent)
              throws UnsupportedOperationException
Deprecated. 
Removes all the childs of a referent object. This implementation support XML objects and XOperable objects.

Parameters:
referent - The referent object to clear all.
Throws:
UnsupportedOperationException - When the operation is not supported.

clearAll

public void clearAll(int referent,
                     Object parent)
              throws UnsupportedOperationException
Deprecated. 
Removes all the childs of a referent object. This implementation support XML objects and XOperable objects.

Parameters:
referent - The position of the referent object to append to.
parent - The non null parent object of the referent.
Throws:
UnsupportedOperationException - When the operation is not supported.

clone

public Object clone(Object referent)
             throws UnsupportedOperationException
Deprecated. 
Clones a referent object to a new one that is a field to field copy of the referent object. This implementation support XML objects and XOperable objects.

Parameters:
referent - The referent object to clone.
Throws:
UnsupportedOperationException - When the operation is not supported.

clone

public Object clone(int referent,
                    Object parent)
             throws UnsupportedOperationException
Deprecated. 
Clones a referent object to a new one that is a field to field copy of the referent object. This implementation support XML objects and XOperable objects.

Parameters:
referent - The position of the referent object to clone.
parent - The non null parent object of the referent.
Throws:
UnsupportedOperationException - When the operation is not supported.

insertAfter

public void insertAfter(Object referent,
                        Object parent,
                        Object operand)
                 throws UnsupportedOperationException
Deprecated. 
Inserts an object after the referent object given. This implementation support XML objects and XOperable objects.

Parameters:
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.
Throws:
UnsupportedOperationException - When the operation is not supported.

insertAfter

public void insertAfter(int referent,
                        Object parent,
                        Object operand)
                 throws UnsupportedOperationException
Deprecated. 
Inserts an object after the referent object given. This implementation support XML objects and XOperable objects.

Parameters:
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.
Throws:
UnsupportedOperationException - When the operation is not supported.

insertBefore

public void insertBefore(Object referent,
                         Object parent,
                         Object operand)
                  throws UnsupportedOperationException
Deprecated. 
Inserts an object before the referent object given. This implementation support XML objects and XOperable objects.

Parameters:
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.
Throws:
UnsupportedOperationException - When the operation is not supported.

insertBefore

public void insertBefore(int referent,
                         Object parent,
                         Object operand)
                  throws UnsupportedOperationException
Deprecated. 
Inserts an object before the referent object given. This implementation support XML objects and XOperable objects.

Parameters:
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.
Throws:
UnsupportedOperationException - When the operation is not supported.

remove

public void remove(Object referent,
                   Object parent)
            throws UnsupportedOperationException
Deprecated. 
Removes an item from its parent. This implementation support XML objects and XOperable objects.

Parameters:
referent - The referent object to remove.
parent - The parent object of the referent, or null if implied.
Throws:
UnsupportedOperationException - When this operation is not supported.

remove

public void remove(int referent,
                   Object parent)
            throws UnsupportedOperationException
Deprecated. 
Removes a referent object from its parent. This implementation support XML objects and XOperable objects.

Parameters:
referent - The position of the referent object to remove.
parent - The non null parent object of the referent.
Throws:
UnsupportedOperationException - If not overriden, this operation is not supported.

rename

public void rename(Object referent,
                   Object parent,
                   QName newName)
            throws UnsupportedOperationException
Deprecated. 
Renames a referent object. This implementation support DOM objects and XOperable objects.

Parameters:
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.
Throws:
UnsupportedOperationException - When the operation is not supported.

rename

public void rename(int referent,
                   Object parent,
                   QName newName)
            throws UnsupportedOperationException
Deprecated. 
Renames a referent object. This implementation support XML objects and XOperable objects.

Parameters:
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.
Throws:
UnsupportedOperationException - When the operation is not supported.

replace

public void replace(Object referent,
                    Object parent,
                    Object value)
             throws UnsupportedOperationException
Deprecated. 
Replaces a referent object by another object from its parent. This implementation support XML objects and XOperable objects.

Parameters:
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.
Throws:
UnsupportedOperationException - When the operation is not supported.

replace

public void replace(int referent,
                    Object parent,
                    Object operand)
             throws UnsupportedOperationException
Deprecated. 
Replaces a referent object by another object from its parent. This implementation support XML objects and XOperable objects.

Parameters:
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.
Throws:
UnsupportedOperationException - When the operation is not supported.

update

public void update(Object referent,
                   Object value)
            throws UnsupportedOperationException
Deprecated. 
Updates a referent object with a value. This implementation support XML objects and XOperable objects.

Parameters:
referent - The position of the referent object to update.
value - The new value of the referent.
Throws:
UnsupportedOperationException - When the operation is not supported.

update

public void update(int referent,
                   Object parent,
                   Object value)
            throws UnsupportedOperationException
Deprecated. 
Updates a referent object with a value. This implementation support XML objects and XOperable objects.

Parameters:
referent - The referent object to update.
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.
value - The new value of the referent.
Throws:
UnsupportedOperationException - When the operation is not supported.