|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.taursys.xml.Component
com.taursys.xml.Container
com.taursys.xml.DispatchingContainer
com.taursys.xml.ElementDelegate
ElementDelegate serves as a delegate for Elements by providing a full implementation of the Element interface.
| Constructor Summary | |
ElementDelegate(Element c)
Constructs a new ElementDelegate for the given Element |
|
| Method Summary | |
void |
addAttribute(Attribute attribute)
Add the given Attribute to this Element. |
void |
addTextNode(TextNode t)
Add the given TextNode to this Element. |
Attribute |
createAttribute(java.lang.String attributeName)
Creates and binds an Attribute with the given name to this Element. |
Attribute |
createAttribute(java.lang.String attributeName,
int dataType)
Creates and binds an Attribute of the given type with the given name to this Element. |
Attribute |
createAttribute(java.lang.String attributeName,
java.lang.String propertyName,
ValueHolder holder)
Creates and binds an Attribute with the given name to this Element. |
Attribute |
createBoundAttribute(java.lang.String attributeName,
java.lang.String propertyName)
Creates and binds an Attribute with the given name to this Element. |
TextNode |
createBoundTextNode(java.lang.String propertyName)
Creates and binds a TextNode with the given name to this Element. |
TextNode |
createTextNode()
Creates and binds a TextNode to this Element. |
TextNode |
createTextNode(int dataType)
Creates and binds a TextNode of the given type to this Element. |
TextNode |
createTextNode(java.lang.String propertyName,
ValueHolder holder)
Creates and binds a TextNode with the given name to this Element. |
Attribute |
getAttribute(java.lang.String attributeName)
Gets an Attribute by name or null if it does not exist |
java.lang.String |
getAttributeText(java.lang.String attributeName)
Gets an Attribute's text value by name or null if it does not exist |
java.lang.Object |
getAttributeValue(java.lang.String attributeName)
Gets an Attribute's Object value by name or null if it does not exist |
java.lang.String |
getId()
Get the Id of the this container's parent return the Id of the this container's parent |
Container |
getParent()
Returns the parent container of this component else null. |
TextNode |
getTextNode()
Gets the TextNode or null if it does not exist |
java.lang.String |
getTextNodeText()
Gets the TextNode's text value or null if it does not exist |
java.lang.Object |
getTextNodeValue()
Gets the TextNode's Object value or null if it does not exist |
void |
removeAttribute(Attribute attribute)
Removes the given Attribute from this Element and sets its parent to null. |
void |
removeAttribute(java.lang.String attributeName)
Removes the Attribute with the given name from this Container if found. |
void |
removeTextNode()
Removes the TextNode from this Container if exists. |
void |
removeTextNode(TextNode t)
Removes the given TextNode from this Element and sets its parent to null. |
void |
setAttributeText(java.lang.String attributeName,
java.lang.String value)
Sets an Attribute's text value by name or does nothing if it does not exist. |
void |
setAttributeValue(java.lang.String attributeName,
java.lang.Object value)
Sets an Attribute's Object value by name or does nothing if it does not exist. |
void |
setId(java.lang.String newId)
Un-implemented method - do not call - use parent's method instead. |
void |
setTextNodeText(java.lang.String value)
Sets the TextNode's text value or does nothing if it does not exist. |
void |
setTextNodeValue(java.lang.Object value)
Sets the TextNode's Object value or does nothing if it does not exist. |
void |
setValueHolder(ValueHolder valueHolder)
Sets the given ValueHolder for this ElementDelegate and sets the ValueHolder of each of its bound Attributes and TextNodes. |
| Methods inherited from class com.taursys.xml.Container |
addDispatcher, contains, get, getComponents, getDispatcher, getDispatchers, getDocumentAdapter, getInputDispatcher, getParameterDispatcher, getRecycleDispatcher, getRenderDispatcher, getTriggerDispatcher, remove, removeDispatcher, setComponents |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ElementDelegate(Element c)
| Method Detail |
public Container getParent()
getParent in class Componentpublic java.lang.String getId()
getId in interface DocumentComponentpublic void setId(java.lang.String newId)
setId in interface DocumentComponentnewId - unused parameterpublic void addAttribute(Attribute attribute)
Element
addAttribute in interface Elementattribute - the Attribute to addpublic void removeAttribute(java.lang.String attributeName)
Element
removeAttribute in interface ElementattributeName - to removepublic void removeAttribute(Attribute attribute)
Element
removeAttribute in interface Elementattribute - the Attribute to removepublic Attribute getAttribute(java.lang.String attributeName)
Element
getAttribute in interface ElementattributeName - the name of the Attribute
public java.lang.String getAttributeText(java.lang.String attributeName)
throws ModelException
Element
getAttributeText in interface ElementattributeName - the name of the Attribute
ModelException
public void setAttributeText(java.lang.String attributeName,
java.lang.String value)
throws ModelException
Element
setAttributeText in interface ElementattributeName - the name of the Attributevalue - the new String value for the Attribute
ModelException
public java.lang.Object getAttributeValue(java.lang.String attributeName)
throws ModelException
Element
getAttributeValue in interface ElementattributeName -
ModelException
public void setAttributeValue(java.lang.String attributeName,
java.lang.Object value)
throws ModelException
Element
setAttributeValue in interface ElementattributeName - value -
ModelExceptionpublic Attribute createAttribute(java.lang.String attributeName)
Element
createAttribute in interface ElementattributeName - name of the new Attribute
public Attribute createAttribute(java.lang.String attributeName,
int dataType)
Element
createAttribute in interface ElementattributeName - name of the new AttributedataType - the data type for the new Attribute
DataTypes
public Attribute createBoundAttribute(java.lang.String attributeName,
java.lang.String propertyName)
Element
createBoundAttribute in interface ElementattributeName - name of the new AttributepropertyName - for the new Attribute
public Attribute createAttribute(java.lang.String attributeName,
java.lang.String propertyName,
ValueHolder holder)
Element
createAttribute in interface ElementattributeName - name of the new AttributepropertyName - for the new Attributeholder - ValueHolder for the new Attribute
public void addTextNode(TextNode t)
Element
addTextNode in interface Elementpublic void removeTextNode(TextNode t)
Element
removeTextNode in interface Elementpublic void removeTextNode()
Element
removeTextNode in interface Elementpublic TextNode getTextNode()
Element
getTextNode in interface Element
public java.lang.String getTextNodeText()
throws ModelException
Element
getTextNodeText in interface ElementModelException
public void setTextNodeText(java.lang.String value)
throws ModelException
Element
setTextNodeText in interface Elementvalue - the new String value for the TextNode
ModelException
public java.lang.Object getTextNodeValue()
throws ModelException
Element
getTextNodeValue in interface ElementModelException
public void setTextNodeValue(java.lang.Object value)
throws ModelException
Element
setTextNodeValue in interface Elementvalue - the new Object value for the TextNode
ModelExceptionpublic TextNode createTextNode()
Element
createTextNode in interface Elementpublic TextNode createTextNode(int dataType)
Element
createTextNode in interface ElementdataType - the data type for the new TextNode
DataTypespublic TextNode createBoundTextNode(java.lang.String propertyName)
Element
createBoundTextNode in interface ElementpropertyName - for the new TextNode
public TextNode createTextNode(java.lang.String propertyName,
ValueHolder holder)
Element
createTextNode in interface ElementpropertyName - for the new TextNodeholder - ValueHolder for the new TextNode
public void setValueHolder(ValueHolder valueHolder)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||