|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DatapointModel
A container for keeping Datapoint
s, using some particular hierarchical
structure or order between those datapoints.
Its purpose is to imitate a real world datapoint layout, to build and maintain some
kind of model for it, allowing a user to create and work with an arrangement of
datapoints being adequate for the application requirements.
This interface aims to act as the base for building more complex layouts, for example
to model part of a KNX network.
DatapointMap
Method Summary | |
---|---|
void |
add(Datapoint dp)
Adds a datapoint to this model. |
boolean |
contains(Datapoint dp)
Checks whether this model contains the specified datapoint. |
boolean |
contains(GroupAddress main)
Checks whether this model contains the datapoint identified using the specified main address. |
Datapoint |
get(GroupAddress main)
Returns the datapoint identified using the specified main address,
if found in this model. |
void |
load(XMLReader r)
Loads a datapoint model from XML input into this model. |
void |
remove(Datapoint dp)
Removes the specified datapoint from this model, if that datapoint is found. |
void |
removeAll()
Removes all datapoints contained in this model. |
void |
save(XMLWriter w)
Saves the datapoint model to XML using the supplied writer. |
Method Detail |
---|
void add(Datapoint dp)
An implementation might throw KNXIllegalArgumentException if tried to add a duplicate datapoint.
dp
- datapoint to add
KNXIllegalArgumentException
- on duplicate datapointboolean contains(Datapoint dp)
dp
- datapoint to look up
true
iff such datapoint is found, false
otherwiseboolean contains(GroupAddress main)
main
address.
main
- KNX group address to look up
true
iff such datapoint is found, false
otherwiseDatapoint get(GroupAddress main)
main
address,
if found in this model.
If no datapoint is found with that address, null
is returned.
main
- KNX group address to get the datapoint for
null
void load(XMLReader r) throws KNXMLException
Datapoints already contained in this model are not required to be removed before loading, the loaded model will be added to the already existing datapoints.
r
- a XML reader
KNXMLException
- on error loading the datapoint model, or on duplicate loaded
datapointvoid remove(Datapoint dp)
dp
- datapoint to removevoid removeAll()
void save(XMLWriter w) throws KNXMLException
w
- a XML writer
KNXMLException
- on error saving the datapoint model
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |