tuwien.auto.eibpoints
Class PointList
java.lang.Object
tuwien.auto.eibpoints.PointList
public class PointList
extends java.lang.Object
The PointList class facilitates the integration of a variety of EIB/KNX
points. This class provides methods for adding and removing as well as lookup
of EIB/KNX points by different parameters. Finally the whole configuration
can be saved and restored in XML format.
PointList() - Default constructor.
|
PointList(InputStream _XMLStream) - This constructor restores a PointList configuration, by parsing a XML
structure.
|
PointList(String _DeviceFile) - This constructor initializes this object by parsing a configuration file
in XML format.
|
void | addPoint(Point _Point) - Add a EIB/KNX point to the actual configuration.
|
Point[] | getAllPoints() - Returns a array with all EIB/KNX points contained in the point list.
|
Point | getPoint(String _PointName) - Get a reference to the point with the specified name.
|
Point | getPoint(EIB_Address _Address) - Searches the list and returns the point with the specified group address.
|
String[] | getPointDescriptions() - Get a description containing the name and address string from all points
contained in this object.
|
void | removePoint(Point _Point) - Removes this EIB/KNX point.
|
void | toFile(String FileName) - Stores the current configuration at the specified file location, in XML
format.
|
OutputStream | toStream() - Saves the configuration in XML file to an output stream.
|
PointList
public PointList()
Default constructor. Use this to construct an empty list.
PointList
public PointList(InputStream _XMLStream)
throws EICLException
This constructor restores a PointList configuration, by parsing a XML
structure. If the XML structure is not the expected an EICLException is
thrown.
_XMLStream
- The XML file as InputStream
EICLException
- The EICLException is thrown if the passed structure does not
conform to the expected.
PointList
public PointList(String _DeviceFile)
throws EICLException
This constructor initializes this object by parsing a configuration file
in XML format.
_DeviceFile
- The file in which the configuration is stored
EICLException
- If the structure does not correspond to the expected, or the
Point constructor throws an Exception
addPoint
public void addPoint(Point _Point)
throws EICLException
Add a EIB/KNX point to the actual configuration.
_Point
- The EIB/KNX point reference.
getAllPoints
public Point[] getAllPoints()
Returns a array with all EIB/KNX points contained in the point list. Note
that all parameters are passed as references.
- The array containing all points
getPoint
public Point getPoint(String _PointName)
throws EICLException
Get a reference to the point with the specified name.
_PointName
- The EIB/KNX point name.
- the point Returns the corresponding point.
EICLException
- The EICLException is thrown if no point with this name can be
found.
getPoint
public Point getPoint(EIB_Address _Address)
throws EICLException
Searches the list and returns the point with the specified group address.
_Address
- The EIB group address.
- the point The EIB/KNX point with the specified address.
EICLException
- The EICLException is thrown if none can be found.
getPointDescriptions
public String[] getPointDescriptions()
Get a description containing the name and address string from all points
contained in this object.
- A point description of all points.
removePoint
public void removePoint(Point _Point)
Removes this EIB/KNX point.
_Point
- The reference to the point to be removed.
toFile
public void toFile(String FileName)
throws EICLException
Stores the current configuration at the specified file location, in XML
format.
FileName
- The file location.
toStream
public OutputStream toStream()
throws EICLException
Saves the configuration in XML file to an output stream.
- The output stream containing the point list configuration in XML
format.