|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.base.apps.xml.elem.impl.BaseElement
public class BaseElement
Default implementation of Element.
| Constructor Summary | |
|---|---|
BaseElement()
|
|
| Method Summary | |
|---|---|
Element |
addAttribute(Attr attr)
Adds the specified attribute. |
Element |
addChild(Element elem)
Adds the specified child Element. |
Element |
appendText(String text)
Appends text to this element's character content. |
Attr |
getAttribute(String name)
Fetches an attribute by name. |
protected Map<String,Attr> |
getAttributeMap()
|
Iterator<Attr> |
getAttributes()
Fetches this Element's attributes. |
protected StringBuffer |
getBuffer()
|
Element |
getChild(int index)
Fetches a child Element by index. |
protected List<Element> |
getChildList()
|
Iterator<Element> |
getChildren()
Returns this Element's children. |
ElementContext |
getContext()
Returns the context of this Element. |
Element |
getParent()
Returns the element's parent, which may be null. |
Tag |
getTag()
Returns the element tag. |
String |
getText()
Returns the character content of this Element. |
Element |
removeAttribute(Attr attr)
Remove the given attribute. |
Element |
removeAttribute(String name)
Remove an attribute by name. |
Element |
removeChild(Element elem)
Remove the specified child Element. |
Element |
removeChild(int index)
Remove a child Element by index. |
protected void |
setAttributeMap(Map<String,Attr> attributeMap)
|
protected void |
setBuffer(StringBuffer buffer)
|
protected void |
setChildList(List<Element> childList)
|
Element |
setContext(ElementContext ctx)
Sets the context of this Element. |
Element |
setParent(Element parent)
Sets the parent of this Element. |
protected void |
setTag(Tag tag)
|
Element |
setText(String text)
Sets the character content of this Element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseElement()
| Method Detail |
|---|
public Tag getTag()
Element
getTag in interface ElementElement.getTag()public Element addAttribute(Attr attr)
Element
addAttribute in interface Elementattr - The attribute to add.
ElementElement.addAttribute(org.base.apps.xml.elem.Attr)public Attr getAttribute(String name)
Element
getAttribute in interface Elementname - The attribute name.
null, if no attribute with the given name existsElement.getAttribute(java.lang.String)public Iterator<Attr> getAttributes()
ElementElement's attributes.
getAttributes in interface ElementElement's attributes.Element.getAttributes()public Element removeAttribute(Attr attr)
Element
removeAttribute in interface Elementattr - The attribute to remove
ElementElement.removeAttribute(org.base.apps.xml.elem.Attr)public Element removeAttribute(String name)
Element
removeAttribute in interface Elementname - The name of the attribute to remove
ElementElement.removeAttribute(java.lang.String)public Element addChild(Element elem)
ElementElement.
addChild in interface Elementelem - The child to add.
ElementElement.addChild(org.base.apps.xml.elem.Element)public Element getChild(int index)
ElementElement by index.
getChild in interface Elementindex - The index of the child to fetch
null, if no child with the given name existsElement.getChild(int)public Iterator<Element> getChildren()
ElementElement's children.
getChildren in interface ElementElement's childrenElement.getChildren()public Element removeChild(Element elem)
ElementElement.
removeChild in interface Elementelem - The child to remove.
ElementElement.removeChild(org.base.apps.xml.elem.Element)public Element removeChild(int index)
ElementElement by index.
removeChild in interface Elementindex - The index of the child to remove
ElementElement.removeChild(int)public Element getParent()
Elementnull.
getParent in interface Elementnull.Element.getParent()public Element setParent(Element parent)
ElementElement.
setParent in interface Elementparent - The parent to set
ElementElement.setParent(org.base.apps.xml.elem.Element)public ElementContext getContext()
ElementElement.
getContext in interface ElementElement.Element.getContext()public Element setContext(ElementContext ctx)
ElementElement.
setContext in interface Elementctx - The context to set
ElementElement.setContext(org.base.apps.xml.elem.ElementContext)public Element appendText(String text)
Element
appendText in interface Elementtext - The content to append.
ElementElement.appendText(java.lang.String)public String getText()
ElementElement.
getText in interface ElementElement.Element.getText()public Element setText(String text)
ElementElement.
setText in interface Elementtext - The character content to set
ElementElement.setText(java.lang.String)protected Map<String,Attr> getAttributeMap()
protected void setAttributeMap(Map<String,Attr> attributeMap)
attributeMap - the attributeMap to setprotected List<Element> getChildList()
protected StringBuffer getBuffer()
protected void setBuffer(StringBuffer buffer)
buffer - the buffer to setprotected void setChildList(List<Element> childList)
childList - the child list to setprotected void setTag(Tag tag)
tag - the tag to set
|
Please visit Base Apps, hosted on Sourceforge.net. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||