public interface ICStorageElement
ICSettingsStorage
elements.
This abstract storage mechanism is used, e.g. with the ICProjectDescription
and
ICConfigurationDescription
for storing custom data in the settings file (.cproject)
or in a database.ICSettingsStorage
,
ICProjectDescription
,
ICConfigurationDescription
Modifier and Type | Method and Description |
---|---|
void |
clear()
Erases all children, attributes and any value set on this ICStorageElement
|
ICStorageElement |
createChild(String name)
Create a child ICStorageElement with the given name.
|
ICStorageElement |
createCopy()
Create a deep copy of the current ICStorageElement such that name, children, attributes and value
are the same.
|
boolean |
equals(ICStorageElement other)
Tests whether this storage element is exactly equal to other
To be equal all name, children attributes and value must be
equal between the two ICStorageElements
|
String |
getAttribute(String name)
Return the String of attribute value for name.
|
String[] |
getAttributeNames()
Returns a string array of attribute names
|
ICStorageElement[] |
getChildren()
Returns an array of the ICStorageElement children of this
ICStorageElement or an empty array if no children were found
|
ICStorageElement[] |
getChildrenByName(String name)
Returns the children ICStorageElements with name name
|
String |
getName()
Returns the name of this ICStorageElement
|
ICStorageElement |
getParent()
Return the parent IStorageElement or null if this
ICStorageElement doesn't have a parent
|
String |
getValue()
Returns the String value of this element or null if there is no String value set.
|
boolean |
hasAttribute(String name)
Return whether this ICStorageElement contains an attribute value
for name
|
boolean |
hasChildren()
Returns true if this storage element has child ICStorageElements
|
ICStorageElement |
importChild(ICStorageElement element)
Imports an existing ICStorageElemtn as a child of this ICStorageElement
|
void |
removeAttribute(String name)
Remove an attribute from this ICStorageElement
|
void |
removeChild(ICStorageElement el)
Removes the ICStorageElement from the set of child ICSotrageElements
|
void |
setAttribute(String name,
String value)
Set an attribute on this ICStorageElement
|
void |
setValue(String value)
Sets a String value on the ICStorageElement
|
String getAttribute(String name)
name
- boolean hasAttribute(String name)
name
- String[] getAttributeNames()
ICStorageElement getParent()
void setAttribute(String name, String value)
name
- value
- void removeAttribute(String name)
name
- ICStorageElement createChild(String name)
name
- ICStorageElement[] getChildren()
ICStorageElement[] getChildrenByName(String name)
name
- String name of children to be returnedboolean hasChildren()
void clear()
String getName()
void removeChild(ICStorageElement el)
el
- String getValue()
void setValue(String value)
value
- ICStorageElement importChild(ICStorageElement element) throws UnsupportedOperationException
element
- UnsupportedOperationException
ICStorageElement createCopy() throws UnsupportedOperationException, org.eclipse.core.runtime.CoreException
UnsupportedOperationException
org.eclipse.core.runtime.CoreException
boolean equals(ICStorageElement other)
other
- Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.