|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.management.config.xml.BaseElement
public class BaseElement
This class represents Element Nodes in a XML and provides various methods for manipulating the XML.
| Field Summary | |
|---|---|
protected org.w3c.dom.Element |
element
This is the element that represents this object in the XML |
static boolean |
isServer
|
| Constructor Summary | |
|---|---|
BaseElement()
This constructor should only be used by the Template class |
|
BaseElement(org.w3c.dom.Element element)
This constructor requires an XML element. |
|
| Method Summary | |
|---|---|
BaseElement |
addSubTag(BaseElement be)
Add a new sub tag. |
java.lang.String |
getAttribute(java.lang.String name)
Method used to get the value of an attribute. |
org.w3c.dom.Element |
getElement()
Returns the XML Element Node of this BaseElement Class. |
java.util.Properties |
getProperties()
Convert the attributes (parameters) into a properties object. |
java.util.Vector |
getSubTagsByName(java.lang.String name)
Returns the list of sub-tags as tag classes matching given tag value For eg., in order to view the subtags such as Device in an XML file getSubTagsByName("Device") can be used. |
boolean |
hasAttribute(java.lang.String name)
Returns true when an attribute with a given name is already present on this element or has a default value, false otherwise. |
void |
removeSubTagsByName(java.lang.String name)
This method is used to remove the subTags specified by the name. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Method used to add an attribute. |
void |
setProperties(java.util.Properties properties)
Convert the properties object into attributes (parameters). |
java.lang.String |
toString()
Returns the XML by transforming the Element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected org.w3c.dom.Element element
public static boolean isServer
| Constructor Detail |
|---|
public BaseElement()
public BaseElement(org.w3c.dom.Element element)
throws InvalidTemplateException
element - the root element on which the BaseElement is to be constructed.
InvalidTemplateException - if the element is null.| Method Detail |
|---|
public java.lang.String getAttribute(java.lang.String name)
name - name of the property whose value is requested.
public void setAttribute(java.lang.String name,
java.lang.String value)
name - name of the attribute that needs to be added.value - attribute's valuepublic boolean hasAttribute(java.lang.String name)
name - name of the attribute to look for.
public java.util.Vector getSubTagsByName(java.lang.String name)
throws InvalidTemplateException
name - sub-tag's name.
InvalidTemplateException - if any of the sub-tag objects could not be got.public BaseElement addSubTag(BaseElement be)
be - the BaseElement of the tag to be added.
public void removeSubTagsByName(java.lang.String name)
name - name of the sub-tag that's to be removed.public java.lang.String toString()
toString in class java.lang.Objectpublic org.w3c.dom.Element getElement()
public java.util.Properties getProperties()
public void setProperties(java.util.Properties properties)
properties - the properties list that have to be converted into attributes.
|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||