|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
An Element is a type of Component which binds to the Document and can have Attributes.
| 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 |
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 |
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. |
| Methods inherited from interface com.taursys.xml.DocumentComponent |
getId, setId |
| Method Detail |
public void addAttribute(Attribute attribute)
attribute - the Attribute to addpublic void removeAttribute(Attribute attribute)
attribute - the Attribute to removepublic Attribute getAttribute(java.lang.String attributeName)
attributeName - the name of the Attribute
public java.lang.String getAttributeText(java.lang.String attributeName)
throws ModelException
attributeName - the name of the Attribute
ModelException
public void setAttributeText(java.lang.String attributeName,
java.lang.String value)
throws ModelException
attributeName - the name of the Attributevalue - the new String value for the Attribute
ModelException
public java.lang.Object getAttributeValue(java.lang.String attributeName)
throws ModelException
attributeName -
ModelException
public void setAttributeValue(java.lang.String attributeName,
java.lang.Object value)
throws ModelException
attributeName - value -
ModelExceptionpublic Attribute createAttribute(java.lang.String attributeName)
attributeName - name of the new Attribute
public Attribute createAttribute(java.lang.String attributeName,
int dataType)
attributeName - name of the new AttributedataType - the data type for the new Attribute
DataTypes
public Attribute createBoundAttribute(java.lang.String attributeName,
java.lang.String propertyName)
attributeName - name of the new AttributepropertyName - for the new Attribute
public Attribute createAttribute(java.lang.String attributeName,
java.lang.String propertyName,
ValueHolder holder)
attributeName - name of the new AttributepropertyName - for the new Attributeholder - ValueHolder for the new Attribute
public void removeAttribute(java.lang.String attributeName)
attributeName - to removepublic void addTextNode(TextNode t)
public void removeTextNode(TextNode t)
public void removeTextNode()
public TextNode getTextNode()
public java.lang.String getTextNodeText()
throws ModelException
ModelException
public void setTextNodeText(java.lang.String value)
throws ModelException
value - the new String value for the TextNode
ModelException
public java.lang.Object getTextNodeValue()
throws ModelException
ModelException
public void setTextNodeValue(java.lang.Object value)
throws ModelException
value - the new Object value for the TextNode
ModelExceptionpublic TextNode createTextNode()
public TextNode createTextNode(int dataType)
dataType - the data type for the new TextNode
DataTypespublic TextNode createBoundTextNode(java.lang.String propertyName)
propertyName - for the new TextNode
public TextNode createTextNode(java.lang.String propertyName,
ValueHolder holder)
propertyName - for the new TextNodeholder - ValueHolder for the new TextNode
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||