org.inria.ns.reflex.xml.dom
Class DOMListOperator

java.lang.Object
  extended by org.inria.ns.reflex.xml.operator.AbstractXOperator
      extended by org.inria.ns.reflex.xml.dom.DOMListOperator
All Implemented Interfaces:
LoopOnChildren, XOperator

public class DOMListOperator
extends AbstractXOperator
implements XOperator, LoopOnChildren

XML operations on a DOM list.

Only the static methods of this class are usable directly. To use the methods of the singleton, use the master operator that ensure the type of the arguments.

Author:
Philippe Poulard
See Also:
NodeList, org.inria.ns.reflex.xml.operate.XMaster

Method Summary
 boolean booleanValueOf(Object referent)
          This implementation returns the boolean value of the referent based on its string value.
 Map getAttributes(Object referent)
          Returns the attributes of the given referent object.
 List getChildren(Object referent)
          Returns the children of the given referent object.
 QName getTypeName(Object referent)
          Return #adt:list.
 boolean isParentNode(Object referent)
          Indicate if the referent is a parent node, that is to say if it can have children.
 Number numberValueOf(Object referent)
          This implementation returns the number value of the referent based on its string value.
static void register(XMaster xmaster)
          Registers this operator to the master operator.
 String stringValueOf(Object referent)
          This implementation returns the string value of the referent.
 Object valueOf(Object referent)
          Return the first item in the list or null.
 
Methods inherited from class org.inria.ns.reflex.xml.operator.AbstractXOperator
append, append, clear, clear, clearAll, clearAll, clone, clone, getAttributeValue, getCommentAt, getElementAt, getElementById, getElementsByName, getFamilyIndex, getFamilySize, getIndex, getNamedElementAt, getNamedProcessingInstructionAt, getNameIndex, getNameSize, getNamespaces, getNext, getNodeAt, getNodeKind, getNodeType, getParent, getPrevious, getProcessingInstructionAt, getQName, getRoot, getSize, getStringAttributeValue, getStringName, getTextAt, getType, getTypeIndex, getTypeSize, getValue, getXFactory, getXMLType, getXOperator, insertAfter, insertAfter, insertBefore, insertBefore, isAttribute, isComment, isDocument, isElement, isProcessingInstruction, isText, remove, remove, removeAttribute, rename, rename, replace, replace, setAttribute, update, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.inria.ns.reflex.xml.operator.XOperator
append, append, clear, clear, clearAll, clearAll, clone, clone, getAttributeValue, getCommentAt, getElementAt, getElementById, getElementsByName, getFamilyIndex, getFamilySize, getIndex, getNamedElementAt, getNamedProcessingInstructionAt, getNameIndex, getNameSize, getNamespaces, getNext, getNodeAt, getNodeKind, getNodeType, getParent, getPrevious, getProcessingInstructionAt, getQName, getRoot, getSize, getStringAttributeValue, getStringName, getTextAt, getType, getTypeIndex, getTypeSize, getValue, getXFactory, getXMLType, insertAfter, insertAfter, insertBefore, insertBefore, isAttribute, isComment, isDocument, isElement, isProcessingInstruction, isText, remove, remove, removeAttribute, rename, rename, replace, replace, setAttribute, update, update
 

Method Detail

register

public static void register(XMaster xmaster)
Registers this operator to the master operator.

Parameters:
xmaster - The master operator.

getChildren

public List getChildren(Object referent)
Description copied from interface: XOperator
Returns the children of the given referent object.

Specified by:
getChildren in interface XOperator
Parameters:
referent - The referent object.
Returns:
The childs of the referent object.

isParentNode

public boolean isParentNode(Object referent)
Description copied from class: AbstractXOperator
Indicate if the referent is a parent node, that is to say if it can have children.

Specified by:
isParentNode in interface XOperator
Overrides:
isParentNode in class AbstractXOperator
Parameters:
referent - The referent.
Returns:
This implementation returns true if it is an element or a document, false otherwise.
See Also:
XOperator.isElement(Object), XOperator.isDocument(Object)

getAttributes

public Map getAttributes(Object referent)
Description copied from interface: XOperator
Returns the attributes of the given referent object.

Specified by:
getAttributes in interface XOperator
Parameters:
referent - The referent object.
Returns:
The attributes of the referent object.

stringValueOf

public String stringValueOf(Object referent)
Description copied from class: AbstractXOperator
This implementation returns the string value of the referent.

Specified by:
stringValueOf in interface XOperator
Overrides:
stringValueOf in class AbstractXOperator
Parameters:
referent - The referent.
Returns:
Its string value.
See Also:
Object.toString()

numberValueOf

public Number numberValueOf(Object referent)
Description copied from class: AbstractXOperator
This implementation returns the number value of the referent based on its string value. May return an arbitrary-precision signed decimal number.

Specified by:
numberValueOf in interface XOperator
Overrides:
numberValueOf in class AbstractXOperator
Parameters:
referent - The referent.
Returns:
Its number value.
See Also:
AbstractXOperator.stringValueOf(Object), NumberOperator.parseNumber(String)

booleanValueOf

public boolean booleanValueOf(Object referent)
Description copied from class: AbstractXOperator
This implementation returns the boolean value of the referent based on its string value.

Specified by:
booleanValueOf in interface XOperator
Overrides:
booleanValueOf in class AbstractXOperator
Parameters:
referent - The referent.
Returns:
Its boolean value.
See Also:
AbstractXOperator.stringValueOf(Object)

valueOf

public Object valueOf(Object referent)
Return the first item in the list or null.

Specified by:
valueOf in interface XOperator
Overrides:
valueOf in class AbstractXOperator
Parameters:
referent - The referent.
Returns:
The first item in the list or null.

getTypeName

public QName getTypeName(Object referent)
Return #adt:list.

Specified by:
getTypeName in interface XOperator
Parameters:
referent - A list.
Returns:
adt:list