public class DataGen extends Object
| Constructor and Description |
|---|
DataGen() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDataSetSingle(String uniqueName,
org.ogema.core.timeseries.InterpolationMode mode,
String label)
adds one default dataset to the dataset map
|
void |
addRecordedDataForResource(org.ogema.core.recordeddata.RecordedData recordedData,
org.ogema.core.model.Resource resource)
Add all Loggdata for the given Resource and its RecordedData into this DataGen.
|
void |
addSchedule(org.ogema.core.model.schedule.Schedule schedule)
Add all values of the given Schedule ( analog to addRecordedDataForResource() )
|
void |
changeType(String uniqueName,
String key,
boolean value)
changes a single type value for a dataset
|
String |
generateJSON()
get the datasets in json format using jackson
|
ArrayList<Object> |
getDataArray(String uniqueName)
gets the data array to add values to it
|
Map<String,Object> |
getDataSetMap()
get the whole dataset structure for json usage
|
public void addRecordedDataForResource(org.ogema.core.recordeddata.RecordedData recordedData,
org.ogema.core.model.Resource resource)
recordedData - resource - public void addSchedule(org.ogema.core.model.schedule.Schedule schedule)
schedule - public void addDataSetSingle(String uniqueName, org.ogema.core.timeseries.InterpolationMode mode, String label)
uniqueName - an unique name that is only used once. only used for intern purposesmode - points, bars or lineslabel - the name of the label on the right side of the graphpublic void changeType(String uniqueName, String key, boolean value)
uniqueName - an unique name that is only used once. only used for intern purposeskey - steps, show, fillvalue - the fitting value for the keypublic ArrayList<Object> getDataArray(String uniqueName)
uniqueName - an unique name that is only used once. only used for intern purposespublic Map<String,Object> getDataSetMap()
public String generateJSON() throws IOException
IOExceptionCopyright © 2019. All rights reserved.