com.biocomfort.TO.data_consumer
Class RestBloodGlucoseMeasurementProcessor
java.lang.Object
com.biocomfort.TO.data_consumer.RestMeasurementProcessor
com.biocomfort.TO.data_consumer.RestBloodGlucoseMeasurementProcessor
- All Implemented Interfaces:
- MeasurementProcessor
public class RestBloodGlucoseMeasurementProcessor
- extends RestMeasurementProcessor
Extends the class RestMeasurementProcessor and defines the
concrete transformation of measurement data of blood glucose 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_glucose_measurements".
The blood glucose measurement data is transformed into the following XML
format:
<?xml version="1.0" encoding="UTF-8"?>
<blood-glucose-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>
<glucose>
<value type="decimal">123.0</value>
</glucose>
</blood-glucose-measurement>
Constructor Summary |
RestBloodGlucoseMeasurementProcessor(java.lang.String urlPath)
Constructs a RestBloodGlucoseMeasurementProcessor
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
glucose measurement data, formated as a valid XML document. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RestBloodGlucoseMeasurementProcessor
public RestBloodGlucoseMeasurementProcessor(java.lang.String urlPath)
- Constructs a
RestBloodGlucoseMeasurementProcessor
object with specifying the URL path by the given parameter
urlPath.
- Parameters:
urlPath
- the URL path
transformDataToXmlString
protected java.lang.String transformDataToXmlString(TO data)
- Returns a String object that represents the given blood
glucose 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 glucose measurement
formated as XML
- See Also:
RestMeasurementProcessor.getXMLDateFormat()
,
RestMeasurementProcessor.getXMLStringFromDocument(Document)