public class TimeSeriesOntologyModel extends OntologyModel
Constructor and Description |
---|
TimeSeriesOntologyModel(TimeSeriesChart timeSeriesChart,
TimeSeriesDataModel parentDataModel)
Instantiates a new time series ontology model.
|
Modifier and Type | Method and Description |
---|---|
void |
addOrUpdateValuePair(int seriesIndex,
java.lang.Number key,
java.lang.Number value)
Adds or updates a value pair.
|
void |
addSeries(DataSeries series)
Adds a data series.
|
void |
exchangeSeries(int seriesIndex,
DataSeries dataSeries)
Exchange data series.
|
jade.util.leap.List |
getChartData()
Gets the chart data.
|
ChartSettingsGeneral |
getChartSettings()
Gets the chart settings for this chart.
|
protected int |
getIndexByKey(int seriesIndex,
java.lang.Number key)
Gets the index of the value pair with the given key of the series with the given index.
|
TimeSeries |
getSeries(int seriesIndex)
Gets the data series.
|
int |
getSeriesCount()
Gets the number of current data series.
|
jade.util.leap.List |
getSeriesData(int seriesIndex)
Gets the list of value pairs for the data series with the specified index.
|
TimeSeriesChart |
getTimeSeriesChart()
Gets the complete ontology representation (data and visualization settings) for this chart.
|
TimeSeriesChartRealTimeWrapper |
getTimeSeriesChartRealTimeWrapper()
Gets the time series chart real time wrapper.
|
void |
removeSeries(int seriesIndex)
Removes a data series.
|
void |
removeValuePair(int seriesIndex,
java.lang.Number key)
Removes a value pair.
|
void |
setTimeFormat(java.lang.String timeFormat)
Sets the time format in the settings object.
|
void |
setTimeSeriesChart(TimeSeriesChart timeSeriesChart) |
void |
updateKey(java.lang.Number oldKey,
java.lang.Number newKey)
Exchanges one key in all series that contain it
|
public TimeSeriesOntologyModel(TimeSeriesChart timeSeriesChart, TimeSeriesDataModel parentDataModel)
timeSeriesChart
- the time series chartparentDataModel
- the parent data modelpublic ChartSettingsGeneral getChartSettings()
OntologyModel
getChartSettings
in class OntologyModel
public TimeSeriesChart getTimeSeriesChart()
public void setTimeSeriesChart(TimeSeriesChart timeSeriesChart)
timeSeriesChart
- The timeSeriesChart to setprotected int getIndexByKey(int seriesIndex, java.lang.Number key) throws NoSuchSeriesException
seriesIndex
- The series indexkey
- The keyNoSuchSeriesException
- Thrown if there is no series with the specified indexpublic void removeValuePair(int seriesIndex, java.lang.Number key) throws NoSuchSeriesException
seriesIndex
- the series indexkey
- the keyNoSuchSeriesException
- the no such series exceptionpublic void addOrUpdateValuePair(int seriesIndex, java.lang.Number key, java.lang.Number value) throws NoSuchSeriesException
seriesIndex
- the series indexkey
- the keyvalue
- the valueNoSuchSeriesException
- the no such series exceptionpublic void updateKey(java.lang.Number oldKey, java.lang.Number newKey)
oldKey
- The old keynewKey
- The new keypublic void addSeries(DataSeries series)
OntologyModel
addSeries
in class OntologyModel
series
- the seriespublic void removeSeries(int seriesIndex) throws NoSuchSeriesException
OntologyModel
removeSeries
in class OntologyModel
seriesIndex
- the series indexNoSuchSeriesException
- the no such series exceptionpublic int getSeriesCount()
OntologyModel
getSeriesCount
in class OntologyModel
public jade.util.leap.List getChartData()
OntologyModel
getChartData
in class OntologyModel
public TimeSeries getSeries(int seriesIndex) throws NoSuchSeriesException
OntologyModel
getSeries
in class OntologyModel
seriesIndex
- the series indexNoSuchSeriesException
- the no such series exceptionpublic void exchangeSeries(int seriesIndex, DataSeries dataSeries) throws NoSuchSeriesException
OntologyModel
exchangeSeries
in class OntologyModel
seriesIndex
- the series indexdataSeries
- the data seriesNoSuchSeriesException
- the no such series exceptionpublic jade.util.leap.List getSeriesData(int seriesIndex) throws NoSuchSeriesException
OntologyModel
getSeriesData
in class OntologyModel
seriesIndex
- The series indexNoSuchSeriesException
- Thrown if there is no series with the specified indexpublic void setTimeFormat(java.lang.String timeFormat)
timeFormat
- the new time formatpublic TimeSeriesChartRealTimeWrapper getTimeSeriesChartRealTimeWrapper()