com.biocomfort.TO.data_consumer
Class RestBloodPressureMeasurementProcessor

java.lang.Object
  extended by com.biocomfort.TO.data_consumer.RestMeasurementProcessor
      extended by com.biocomfort.TO.data_consumer.RestBloodPressureMeasurementProcessor
All Implemented Interfaces:
MeasurementProcessor

public class RestBloodPressureMeasurementProcessor
extends RestMeasurementProcessor

Extends the class RestMeasurementProcessor and defines the concrete transformation of measurement data of blood pressure monitors into XML strings. Also the URL path postfix of the restful web service to which the measurement data will be send is defined by this class. By default it is defined as "blood_pressure_measurements".

The blood pressure measurement data is transformed into the following XML format:

 
 <?xml version="1.0" encoding="UTF-8"?>
 <blood-pressure-measurement>
     <manually-entered type="boolean">false</manually-entered>
     <timestamp type="datetime">2008-05-13T12:00:00+00:00</timestamp>
     <user-id type="integer">1</user-id>
     <systolic>
         <value type="decimal">121.0</value>
     </systolic>
     <diastolic>
         <value type="decimal">82.0</value>
     </diastolic>
     <pulse>
         <value type="integer">93</value>
     </pulse>
 </blood-pressure-measurement>
 
 


Constructor Summary
RestBloodPressureMeasurementProcessor(java.lang.String urlPath)
          Constructs a RestBloodPressureMeasurementProcessor object with specifying the URL path by the given parameter urlPath.
 
Method Summary
protected  java.lang.String transformDataToXmlString(TO data)
          Returns a String object that represents the given blood pressure measurement data, formated as a valid XML document.
 
Methods inherited from class com.biocomfort.TO.data_consumer.RestMeasurementProcessor
getXMLDateFormat, getXMLStringFromDocument, processMeasurementAndWait
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestBloodPressureMeasurementProcessor

public RestBloodPressureMeasurementProcessor(java.lang.String urlPath)
Constructs a RestBloodPressureMeasurementProcessor object with specifying the URL path by the given parameter urlPath.

Parameters:
urlPath - the URL path
Method Detail

transformDataToXmlString

protected java.lang.String transformDataToXmlString(TO data)
Returns a String object that represents the given blood pressure measurement data, formated as a valid XML document. See above for more details.

Specified by:
transformDataToXmlString in class RestMeasurementProcessor
Parameters:
data - the received measurement data
Returns:
a string representation of the blood pressure measurement formated as XML
See Also:
RestMeasurementProcessor.getXMLDateFormat(), RestMeasurementProcessor.getXMLStringFromDocument(Document)