|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.cinnamon.config.shared.ElementWrapper
public abstract class ElementWrapper
Wrapper for XML elements hiding the XML DOM API in use. Since Cinnamons builtin XML configuration parser uses XOM while Spring uses the W3C DOM API, this wrapper hides the API so that the two common parser classes contained in this package can share the same logic for both configuration modes. Implements only the logic needed for reading XML attributes and iterating over child nodes.
| Constructor Summary | |
|---|---|
ElementWrapper()
|
|
| Method Summary | |
|---|---|
abstract String |
getAttribute(String name)
Returns the value for the attribute with the given name. |
String |
getAttribute(String name,
String defaultValue)
Returns the value vor the attribute with the given name. |
abstract Iterator<ElementWrapper> |
getChildren(String name)
Returns an Iterator for all child elements with the given name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ElementWrapper()
| Method Detail |
|---|
public abstract String getAttribute(String name)
name - the name of the attribute
public String getAttribute(String name,
String defaultValue)
name - the name of the attributedefaultValue - the default value to use if the attribute does not exist
public abstract Iterator<ElementWrapper> getChildren(String name)
name - the name of the child elements to include in the Iterator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||