|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Attributable
Interfaces an object that contains a hierarchy of attributes. This interface defines methods for accessing and modifying this hierarchy.
AttributeTypesManager| Method Summary | |
|---|---|
void |
addAttribute(Attribute attr,
String path)
Adds attr to the attributes at position indicated by path. |
void |
addBoolean(String path,
String id,
boolean value)
Adds a BooleanAttribute with the given value and id to a
CollectionAttribute at path. |
void |
addByte(String path,
String id,
byte value)
Adds an ByteAttribute with the given value and id to a CollectionAttribute at path. |
void |
addDouble(String path,
String id,
double value)
Adds a DoubleAttribute with the given value and
id to a CollectionAttribute at
path. |
void |
addFloat(String path,
String id,
float value)
Adds a FloatAttribute with the given value and
id to a CollectionAttribute at
path. |
void |
addInteger(String path,
String id,
int value)
Adds an IntegerAttribute with the given value and id to a
CollectionAttribute at path. |
void |
addLong(String path,
String id,
long value)
Adds an LongAttribute with the given value and id to a CollectionAttribute at path. |
void |
addShort(String path,
String id,
short value)
Adds an ShortAttribute with the given value and id to a CollectionAttribute at path. |
void |
addString(String path,
String id,
String value)
Adds an StringAttribute with the given value and id to a CollectionAttribute at path. |
void |
changeBoolean(String path,
boolean value)
Changes the Attribute at the given path to the given
value. |
void |
changeByte(String path,
byte value)
Changes the Attribute at the given path to the given
value. |
void |
changeDouble(String path,
double value)
Changes the Attribute at the given path to the given
value. |
void |
changeFloat(String path,
float value)
Changes the Attribute at the given path to the given
value. |
void |
changeInteger(String path,
int value)
Changes the Attribute at the given path to the given
value. |
void |
changeLong(String path,
long value)
Changes the Attribute at the given path to the given
value. |
void |
changeShort(String path,
short value)
Changes the Attribute at the given path to the given
value. |
void |
changeString(String path,
String value)
Changes the Attribute at the given path to the given
value. |
boolean |
containsAttribute(String path)
Returns if the given path contains an Attribute of any kind. |
Attribute |
getAttribute(String path)
Returns the Attribute located at the given path. |
CollectionAttribute |
getAttributes()
Returns the attributes of the current object in the base hierarchie in a CollectionAttribute. |
boolean |
getBoolean(String path)
Returns the value of the Attribute at the given path. |
byte |
getByte(String path)
Returns the value of the Attribute at the given path. |
double |
getDouble(String path)
Returns the value of the Attribute at the given path. |
float |
getFloat(String path)
Returns the value of the Attribute at the given path. |
int |
getInteger(String path)
Returns the value of the Attribute at the given path. |
ListenerManager |
getListenerManager()
Returns the ListenerManager asscociated to this
Attributable. |
long |
getLong(String path)
Returns the value of the Attribute at the given path. |
short |
getShort(String path)
Returns the value of the Attribute at the given path. |
String |
getString(String path)
Returns the value of the Attribute at the given path. |
void |
removeAttribute(String path)
Deletes the Attribute located at the given path from the
attributes. |
void |
setBoolean(String path,
boolean value)
Sets the Attribute at the given path to the given value. |
void |
setByte(String path,
byte value)
Sets the Attribute at the given path to the given value. |
void |
setDouble(String path,
double value)
Sets the Attribute at the given path to the given value. |
void |
setFloat(String path,
float value)
Sets the Attribute at the given path to the given value. |
void |
setInteger(String path,
int value)
Sets the Attribute at the given path to the given value. |
void |
setLong(String path,
long value)
Sets the Attribute at the given path to the given value. |
void |
setShort(String path,
short value)
Sets the Attribute at the given path to the given value. |
void |
setString(String path,
String value)
Sets the Attribute at the given path to the given value. |
| Method Detail |
|---|
Attribute getAttribute(String path)
throws AttributeNotFoundException
Attribute located at the given path.
path - the path to the Attribute.
AttributeNotFoundException - if there is no
Attribute at the location specified by
path.CollectionAttribute getAttributes()
CollectionAttribute.
void setBoolean(String path,
boolean value)
Attribute at the given path to the given value.
The Attribute is created at the given location, if it does
not yet exist.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
boolean getBoolean(String path)
throws AttributeNotFoundException
Attribute at the given path.
path - the path to search for the Attribute.
Attribute at the given path.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void setByte(String path,
byte value)
Attribute at the given path to the given value.
The Attribute is created at the given location, if it does
not yet exist.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
byte getByte(String path)
throws AttributeNotFoundException
Attribute at the given path.
path - the path to search for the Attribute.
Attribute at the given path.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void setDouble(String path,
double value)
Attribute at the given path to the given value.
The attribute is created at the given location, if it does not yet exist.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
double getDouble(String path)
throws AttributeNotFoundException
Attribute at the given path.
path - the path to search for the Attribute.
Attribute at the given path.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void setFloat(String path,
float value)
Attribute at the given path to the given value.
The attribute is created at the given location, if it does not yet exist.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
float getFloat(String path)
throws AttributeNotFoundException
Attribute at the given path.
path - the path to search for the Attribute.
Attribute at the given path.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void setInteger(String path,
int value)
Attribute at the given path to the given value.
The Attribute is created at the given location, if it does
not yet exist.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
int getInteger(String path)
throws AttributeNotFoundException
Attribute at the given path.
path - the path to search for the Attribute.
Attribute at the given path.
AttributeNotFoundException - if there is no
Attribute at the specified location.ListenerManager getListenerManager()
ListenerManager asscociated to this
Attributable.
ListenerManager asscociated to this
Attributable.
void setLong(String path,
long value)
Attribute at the given path to the given value.
The Attribute is created at the given location, if it does
not yet exist.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
long getLong(String path)
throws AttributeNotFoundException
Attribute at the given path.
path - the path to search for the Attribute.
Attribute at the given path.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void setShort(String path,
short value)
Attribute at the given path to the given value.
The Attribute is created at the given location, if it does
not yet exist.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
short getShort(String path)
throws AttributeNotFoundException
Attribute at the given path.
path - the path to search for the Attribute.
Attribute at the given path.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void setString(String path,
String value)
Attribute at the given path to the given value.
The Attribute is created at the given location, if it does
not yet exist.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
String getString(String path)
throws AttributeNotFoundException
Attribute at the given path.
path - the path to search for the Attribute.
Attribute at the given path.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void addAttribute(Attribute attr,
String path)
throws AttributeExistsException,
NoCollectionAttributeException,
FieldAlreadySetException
attr to the attributes at position indicated by path.
Informs the ListenerManager about the change: calls
preAttributeAdded and postAttributeAdded in
the ListenManager. Also sets the parent and the
attributable of attr.
Implementation Notes:path specifies the location
of the CollectionAttribute or (in case path is the empty
string) the Attributable attr should be added to. Usage
should look as follows:
Graph g = new Graph(..);
CollectionAttribute ca = new CollectionAttribute("root");
//add ca to the attributable g as root attribute
g.addAttribute(ca, "");
IntegerAttribute ia = new IntegerAttribute("int", 10);
//add ia as child of root
g.addAttribute(ia, "root");
attr - the Attribute to be added.
AttributeExistsException - if there is already an
Attribute with the same id as
attr at location path.
NoCollectionAttributeException - if the Attribute
at location path is not a
CollectionAttribute.
FieldAlreadySetException
void addBoolean(String path,
String id,
boolean value)
throws NoCollectionAttributeException,
AttributeExistsException,
FieldAlreadySetException
BooleanAttribute with the given value and id to a
CollectionAttribute at path.
path - the path to the CollectionAttribute the new
IntegerAttribute should be added to.id - the id of the newly created Attribute.value - the value of the newly created Attribute.
NoCollectionAttributeException - if the Attribute
at the location specified by path is no
CollectionAttribute.
AttributeExistsException - if there is already an
Attribute with the given id at
the given path.
FieldAlreadySetException
void addByte(String path,
String id,
byte value)
throws NoCollectionAttributeException,
AttributeExistsException,
FieldAlreadySetException
CollectionAttribute at path.
path - the path to the CollectionAttribute the new
ByteAttribute should be added to.id - the id of the new ByteAttribute.value - the value of the new ByteAttribute.
NoCollectionAttributeException - if the Attribute
at the location specified by path is no
CollectionAttribute.
AttributeExistsException - if there is already an
Attribute with the given id at
the given path.
FieldAlreadySetException
void addDouble(String path,
String id,
double value)
throws NoCollectionAttributeException,
AttributeExistsException,
FieldAlreadySetException
DoubleAttribute with the given value and
id to a CollectionAttribute at
path.
path - the path to the CollectionAttribute the new
IntegerAttribute should be added to.id - the id of the newly created Attribute.value - the value of the newly created Attribute.
NoCollectionAttributeException - if the Attribute
at the location specified by path is no
CollectionAttribute.
AttributeExistsException - if there is already an
Attribute with the given id at
the given path.
FieldAlreadySetException
void addFloat(String path,
String id,
float value)
throws NoCollectionAttributeException,
AttributeExistsException,
FieldAlreadySetException
FloatAttribute with the given value and
id to a CollectionAttribute at
path.
path - the path to the CollectionAttribute the new
IntegerAttribute should be added to.id - the id of the newly created Attribute.value - the value of the newly created Attribute.
NoCollectionAttributeException - if the Attribute
at the location specified by path is no
CollectionAttribute.
AttributeExistsException - if there is already an
Attribute with the given id at
the given path.
FieldAlreadySetException
void addInteger(String path,
String id,
int value)
throws NoCollectionAttributeException,
AttributeExistsException,
FieldAlreadySetException
id to a
CollectionAttribute at path.
path - the path to the CollectionAttribute the new
IntegerAttribute should be added to.id - the id of the new IntegerAttribute.value - the value of the new IntegerAttribute.
NoCollectionAttributeException - if the Attribute
at the location specified by path is no
CollectionAttribute.
AttributeExistsException - if there is already an
Attribute with the given id at
the given path.
FieldAlreadySetException
void addLong(String path,
String id,
long value)
throws NoCollectionAttributeException,
AttributeExistsException,
FieldAlreadySetException
CollectionAttribute at path.
path - the path to the CollectionAttribute the new
LongAttribute should be added to.id - the id of the new LongAttribute.value - the value of the new LongAttribute.
NoCollectionAttributeException - if the Attribute
at the location specified by path is no
CollectionAttribute.
AttributeExistsException - if there is already an
Attribute with the given id at
the given path.
FieldAlreadySetException
void addShort(String path,
String id,
short value)
throws NoCollectionAttributeException,
AttributeExistsException,
FieldAlreadySetException
CollectionAttribute at path.
path - the path to the CollectionAttribute the new
ShortAttribute should be added to.id - the id of the new ShortAttribute.value - the value of the new ShortAttribute.
NoCollectionAttributeException - if the Attribute
at the location specified by path is no
CollectionAttribute.
AttributeExistsException - if there is already an
Attribute with the given id at
the given path.
FieldAlreadySetException
void addString(String path,
String id,
String value)
throws NoCollectionAttributeException,
AttributeExistsException,
FieldAlreadySetException
CollectionAttribute at path.
path - the path to the CollectionAttribute the new
IntegerAttribute should be added to.id - the id of the newly created Attribute.value - the value of the newly created Attribute.
NoCollectionAttributeException - if the Attribute
at the location specified by path is no
CollectionAttribute.
AttributeExistsException - if there is already an
Attribute with the given id at
the given path.
FieldAlreadySetException
void changeBoolean(String path,
boolean value)
throws AttributeNotFoundException
Attribute at the given path to the given
value.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void changeByte(String path,
byte value)
throws AttributeNotFoundException
Attribute at the given path to the given
value.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void changeDouble(String path,
double value)
throws AttributeNotFoundException
Attribute at the given path to the given
value.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void changeFloat(String path,
float value)
throws AttributeNotFoundException
Attribute at the given path to the given
value.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void changeInteger(String path,
int value)
throws AttributeNotFoundException
Attribute at the given path to the given
value.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void changeLong(String path,
long value)
throws AttributeNotFoundException
Attribute at the given path to the given
value.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void changeShort(String path,
short value)
throws AttributeNotFoundException
Attribute at the given path to the given
value.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void changeString(String path,
String value)
throws AttributeNotFoundException
Attribute at the given path to the given
value.
path - the path to search for the Attribute.value - the value to set to the Attribute to.
AttributeNotFoundException - if there is no
Attribute at the specified location.
void removeAttribute(String path)
throws AttributeNotFoundException
Attribute located at the given path from the
attributes. Informs the ListenerManager about the change: calls
pre-/postAttributeRemoved in the ListenerManager.
path - the path of the Attribute to be removed.
AttributeNotFoundException - if there is no
Attribute at the location specified by
path.boolean containsAttribute(String path)
Attribute of any kind.
path - The path of the Attribute to be tested.
true, if an Attribute is saved in the
given path, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||