|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A node of a system information hierarchy. Because the main purpose of this class is to build a system information tree upon internal knowledge, this class has no methods to read the tree itself. It is only possible to read local information of a node which was given or created by the user.
| Field Summary | |
static java.lang.String |
ID_ATTRIBUTE
Special attribute: An id for the described element. |
static java.lang.String |
ID_REF_ATTRIBUTE
Special attribute: A reference as id of another element. |
static java.lang.String |
VALUE_ATTRIBUTE
Special attribute: The value of the described element. |
| Method Summary | |
SystemInfoNode |
createChild(java.lang.String type)
Creates a new child SystemInfoNode with the given type. |
SystemInfoNode |
findChildById(java.lang.String id,
boolean deep)
Returns the child SystemInfoNode for the id given. |
java.lang.String[] |
getAllAttributes()
Returns an array with all attribute names. |
java.lang.String |
getAttribute(java.lang.String name)
Returns the attribute value of the attribute with the given name. |
int |
getAttributeCount()
Returns the number of attributes of this SystemInfoNode. |
SystemInfoNode |
getChild(int index)
Returns the child SystemInfoNode at the given index. |
int |
getChildCount()
Returns the number of child SystemInformationNodes of this one. |
java.lang.String |
getId()
Returns the id attribute ( ID_ATTRIBUTE value. |
java.lang.String |
getIdRef()
Returns the id attribute ( ID_REF_ATTRIBUTE value. |
java.lang.String |
getType()
Returns the type of this SystemInfoNode. |
java.lang.String |
getValue()
Returns the id attribute ( VALUE_ATTRIBUTE value. |
void |
remove()
Removes this SystemInfoNode from it's parent. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Defines the attribute value of the attribute with the given name. |
void |
setId(java.lang.String value)
Sets the id attribute ( ID_ATTRIBUTE to the given value. |
void |
setIdRef(java.lang.String value)
Sets the id-ref attribute ( ID_REF_ATTRIBUTE to the given value. |
void |
setValue(java.lang.String value)
Sets the value attribute ( VALUE_ATTRIBUTE to the given value. |
| Field Detail |
public static final java.lang.String ID_ATTRIBUTE
public static final java.lang.String ID_REF_ATTRIBUTE
public static final java.lang.String VALUE_ATTRIBUTE
| Method Detail |
public java.lang.String getType()
SystemInfoNode.
public void remove()
SystemInfoNode from it's parent.
public SystemInfoNode createChild(java.lang.String type)
SystemInfoNode with the given type.
type - the type of the SystemInfoNode to create
SystemInfoNodepublic int getChildCount()
SystemInformationNodes of this one.
public SystemInfoNode getChild(int index)
SystemInfoNode at the given index.
index - the child index (0 to getChildCount(); order like
created)
SystemInfoNode at the given index
java.lang.IllegalArgumentException - if the index is invalidpublic java.lang.String getAttribute(java.lang.String name)
name - the name of the attribute
null, if no attribute with the given name exists.
public void setAttribute(java.lang.String name,
java.lang.String value)
name - the name of the attributevalue - the attribute value of the attribute with the given name.public java.lang.String[] getAllAttributes()
public void setId(java.lang.String value)
ID_ATTRIBUTE to the given value.
value - the value to setpublic java.lang.String getId()
ID_ATTRIBUTE value.
public void setIdRef(java.lang.String value)
ID_REF_ATTRIBUTE to the given value.
value - the value to setpublic java.lang.String getIdRef()
ID_REF_ATTRIBUTE value.
public void setValue(java.lang.String value)
VALUE_ATTRIBUTE to the given value.
value - the value to setpublic java.lang.String getValue()
VALUE_ATTRIBUTE value.
public int getAttributeCount()
SystemInfoNode.
public SystemInfoNode findChildById(java.lang.String id,
boolean deep)
SystemInfoNode for the id given. If
deep is true, this method will search
the whole subtree.
id - the id to look for (see setId(String))deep - if true, search whole subtree
SystemInfoNode with the id or null,
if not found
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||