DataEndPoint
Says where and how the measurements of a study are stored or uploaded.
Set it as SmartphoneStudyProtocol.dataEndPoint. At runtime, the DataManagerRegistry creates the DataManager whose DataManagerFactory.type matches type, and that data manager stores or uploads each Measurement.
Key points:
- type selects the data manager, see DataEndPointTypes.
- dataFormat selects the DataTransformerSchema used to transform data before it is stored, e.g. NameSpace.OMH.
- Subclass it to add settings for your own data manager, e.g. FileDataEndPoint or SQLiteDataEndPoint.
- Inheritance
-
- Object
- Serializable
- DataEndPoint
- Implementers
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
DataEndPoint.fromJson
DataEndPoint
Creates a DataEndPoint of type (see DataEndPointTypes).
dataFormat is a NameSpace. Default is NameSpace.CARP.
Properties
dataFormat
The preferred format of the data to be uploaded according to NameSpace. Default using the NameSpace.CARP.
fromJsonFunction
The function which can convert a JSON string to an object of this type.
type
The type of endpoint as enumerated in DataEndPointTypes.
Methods
toJson
Return a JSON encoding of this object.
toString
A string representation of this object.
Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.
Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.