org.inria.ns.reflex.xml
Class XComponent

java.lang.Object
  extended by org.inria.ns.reflex.xml.XComponent
All Implemented Interfaces:
NamedType, ChildItem, Renamable, XOperable
Direct Known Subclasses:
XApplication, XRequest, XResponse, XResult, XService, XSession

public class XComponent
extends Object

An X-component that has a list as content.

Author:
Philippe Poulard

Constructor Summary
XComponent()
          Create an empty component
XComponent(EntryMap attributes)
          Create a new component initialized with the given attributes.
XComponent(List content)
          Create a new component initialized with the given content.
XComponent(List content, EntryMap attributes)
          Create a new component initialized with the given content and attributes.
 
Method Summary
 EntryMap getAttributes()
           
 List getChildren()
           
 Object getParent()
          Return the parent of this child.
 QName getQName()
           
 QName getTypeName()
          Return the type of this component.
 XOperator getXOperator()
          Return the XOperator of this object.
 void rename(QName newName)
          Rename this object.
 void setAttributes(EntryMap attributes)
           
 void setTypeName(QName typeName)
          Set the type of this component.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XComponent

public XComponent()
Create an empty component


XComponent

public XComponent(EntryMap attributes)
Create a new component initialized with the given attributes.


XComponent

public XComponent(List content)
Create a new component initialized with the given content.


XComponent

public XComponent(List content,
                  EntryMap attributes)
Create a new component initialized with the given content and attributes.

Method Detail

getXOperator

public XOperator getXOperator()
Return the XOperator of this object.

Specified by:
getXOperator in interface XOperable
Returns:
The XOperator of this object.
See Also:
XOperable.getXOperator()

setAttributes

public void setAttributes(EntryMap attributes)
See Also:
Configurable.setAttributes(java.util.Map)

getAttributes

public EntryMap getAttributes()
See Also:
Configurable.getAttributes()

getChildren

public List getChildren()

rename

public void rename(QName newName)
Description copied from interface: Renamable
Rename this object.

Specified by:
rename in interface Renamable
Parameters:
newName - The new name of the object.

getQName

public QName getQName()

getTypeName

public QName getTypeName()
Return the type of this component.

Specified by:
getTypeName in interface NamedType
Returns:
This default implementation returns the name of the class.

setTypeName

public void setTypeName(QName typeName)
Set the type of this component.

Parameters:
typeName - The name of the type.
Throws:
IllegalStateException - When the type has been already set.

getParent

public Object getParent()
Description copied from interface: ChildItem
Return the parent of this child.

Specified by:
getParent in interface ChildItem
Returns:
Its parent, that may be null for an orphan.