BEAST
eu.baltrad.beast.system.XmlSystemStatusGenerator Class Reference

Classes

class  GroupItem
 
interface  StatusItem
 
class  ValueItem
 Each status is represented as component | value | status.
 

Public Member Functions

 XmlSystemStatusGenerator ()
 Default constructor Essentially the same as calling the constructor with '<?xml version='1.0' encoding='UTF-8'?>'.
 
void add (String component, String value, Set< SystemStatus > status)
 Adds one component to the status report.
 
void add (String component, Map< Object, SystemStatus > mapping)
 Adds a value mapping where each individual value maps to a status.
 
String getXmlString ()
 
String getXmlString (String encoding)
 Returns the string representation.
 
Document toDocument ()
 

Protected Member Functions

String generateStatusString (Set< SystemStatus > status)
 Generates a status string.
 

Detailed Description

Author
Anders Henja

Constructor & Destructor Documentation

◆ XmlSystemStatusGenerator()

eu.baltrad.beast.system.XmlSystemStatusGenerator.XmlSystemStatusGenerator ( )
inline

Default constructor Essentially the same as calling the constructor with '<?xml version='1.0' encoding='UTF-8'?>'.

Member Function Documentation

◆ add() [1/2]

void eu.baltrad.beast.system.XmlSystemStatusGenerator.add ( String component,
Map< Object, SystemStatus > mapping )
inline

Adds a value mapping where each individual value maps to a status.

Useful when querying for example peers for connectivity

Parameters
componentthe component queried
mappingthe value - status mapping

◆ add() [2/2]

void eu.baltrad.beast.system.XmlSystemStatusGenerator.add ( String component,
String value,
Set< SystemStatus > status )
inline

Adds one component to the status report.

Parameters
componentthe component
valuethe value of the component
statusthe status of the component with specified value

◆ generateStatusString()

String eu.baltrad.beast.system.XmlSystemStatusGenerator.generateStatusString ( Set< SystemStatus > status)
inlineprotected

Generates a status string.

Parameters
statusthe system status set
Returns
the status string with | between each unique status

◆ getXmlString() [1/2]

String eu.baltrad.beast.system.XmlSystemStatusGenerator.getXmlString ( )
inline
Returns
the xml string with UTF-8 encoding

◆ getXmlString() [2/2]

String eu.baltrad.beast.system.XmlSystemStatusGenerator.getXmlString ( String encoding)
inline

Returns the string representation.

Parameters
encodingthe encoding to use
Returns
the string representation

◆ toDocument()

Document eu.baltrad.beast.system.XmlSystemStatusGenerator.toDocument ( )
inline
Returns
the dom document

The documentation for this class was generated from the following file: