Top Description Methods
net.sf.ehcache.config.generator.model

public Interface NodeElement

Known Direct Implementers
net.sf.ehcache.config.generator.model.AbstractNodeElement
Imports
java.util.List

Interface that abstracts the idea of an element. An element has a name, list of NodeAttribute's, a parent element and child elements
Author
Abhishek Sanoujam

Method Summary

Modifier and TypeMethod and Description
public void
accept(NodeElementVisitor
the visitor whose visit methods will be called
visitor
)

Accepts an NodeElementVisitor

public void
addAttribute(NodeAttribute
add an attribute
attribute
)

Add an attribute

public void
addChildElement(NodeElement
adds a child element
childElement
)

Adds a child element.

public List<NodeAttribute>

Returns:

list of attributes of this element
getAttributes
()

List of attributes of this element

public List<NodeElement>

Returns:

the list of child elements
getChildElements
()

Returns the list of child elements.

public String

Returns:

the fully qualified name of this element
getFQName
()

Same as calling getFQName(String) with the string "."

public String

Returns:

the fully qualified name of this element separated by delimiter
getFQName
(String delimiter)

The fully qualified name of the element.

public String

Returns:

inner content of this element as string. This does not include the child elements
getInnerContent
()

The inner content of this element as string.

public String

Returns:

Name of the element
getName
()

The name of the element

public NodeElement

Returns:

parent of this element. May be null.
getParent
()

Returns the parent of this element.

public boolean

Returns:

true if there is at least one child, otherwise false
hasChildren
()

Returns true if there is at least one child

public boolean

Returns:

true if this element is optional
isOptional
()

Returns true if this element is optional

public void
setInnerContent(String content)

Sets the inner content of this element

public void
setOptional(boolean optional)

Sets optional or not

Method Detail

acceptback to summary
public void accept(NodeElementVisitor visitor)

Accepts an NodeElementVisitor

Parameters
visitor:NodeElementVisitor

the visitor whose visit methods will be called

addAttributeback to summary
public void addAttribute(NodeAttribute attribute)

Add an attribute

Parameters
attribute:NodeAttribute

add an attribute

addChildElementback to summary
public void addChildElement(NodeElement childElement)

Adds a child element.

Parameters
childElement:NodeElement

adds a child element

getAttributesback to summary
public List<NodeAttribute> getAttributes()

List of attributes of this element

Returns:List<NodeAttribute>

list of attributes of this element

getChildElementsback to summary
public List<NodeElement> getChildElements()

Returns the list of child elements.

Returns:List<NodeElement>

the list of child elements

getFQNameback to summary
public String getFQName()

Same as calling getFQName(String) with the string "."

Returns:String

the fully qualified name of this element

getFQNameback to summary
public String getFQName(String delimiter)

The fully qualified name of the element. The fully qualified name of the name is the name from the root element till this element separated by the delimiter string

Returns:String

the fully qualified name of this element separated by delimiter

getInnerContentback to summary
public String getInnerContent()

The inner content of this element as string. Does not include the child elements

Returns:String

inner content of this element as string. This does not include the child elements

getNameback to summary
public String getName()

The name of the element

Returns:String

Name of the element

getParentback to summary
public NodeElement getParent()

Returns the parent of this element. May be null.

Returns:NodeElement

parent of this element. May be null.

hasChildrenback to summary
public boolean hasChildren()

Returns true if there is at least one child

Returns:boolean

true if there is at least one child, otherwise false

isOptionalback to summary
public boolean isOptional()

Returns true if this element is optional

Returns:boolean

true if this element is optional

setInnerContentback to summary
public void setInnerContent(String content)

Sets the inner content of this element

setOptionalback to summary
public void setOptional(boolean optional)

Sets optional or not