|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hackystat.projectbrowser.page.trajectory.datapanel.TrajectoryChartDataModel
public class TrajectoryChartDataModel
Data model to hold state of the telemetry chart.
Constructor Summary | |
---|---|
TrajectoryChartDataModel()
|
Method Summary | |
---|---|
void |
addStreamToChart(SelectableTrajectoryStream stream,
double minimum,
double maximum,
java.lang.Integer maxStreamLength,
GoogleChart googleChart)
Add the given stream to the google chart. |
void |
addStreamToDTWChart(SelectableTrajectoryStream stream,
java.util.List<java.lang.Double> list,
double minimum,
double maximum,
java.lang.Integer maxStreamLength,
GoogleChart googleChart)
Add the given stream to the google chart. |
java.util.List<java.lang.Double> |
addStreamToNormalizedChart(SelectableTrajectoryStream stream,
double minimum,
double maximum,
java.lang.Integer maxStreamLength,
GoogleChart googleChart)
Add the given stream to the google chart and return the normalized data. |
void |
cancelDataLoading()
Cancel the data loading process. |
void |
changeSelectionForAll(boolean flag)
Change all selected flags of streams to the given flag. |
java.util.List<java.lang.String> |
getDateList(java.util.List<org.hackystat.telemetry.service.resource.chart.jaxb.TelemetryPoint> points)
Return the date list within the list of points. |
java.lang.String |
getDTWChart()
|
java.lang.String |
getDTWChartURL(java.util.List<SelectableTrajectoryStream> streams)
Return the google chart url that present normalized streams. |
java.lang.String |
getDTWStatistics()
Get the DTW statistics. |
int |
getHeight()
|
java.util.List<java.lang.String> |
getMarkersList()
Return the date list inside this model. |
java.lang.String |
getNormalizedTSChart()
|
java.lang.String |
getNormalizedTSChartURL(java.util.List<SelectableTrajectoryStream> streams)
Return the google chart url that present normalized streams. |
java.lang.String |
getParameterAsString()
Return the comma-separated list of parameters in String. |
java.lang.String |
getProcessingMessage()
|
java.lang.String |
getProject1EndDateString()
Returns the end date in yyyy-MM-dd format. |
java.lang.String |
getProject1StartDateString()
Returns the start date in yyyy-MM-dd format. |
java.lang.String |
getProject2EndDateString()
Returns the end date in yyyy-MM-dd format. |
java.lang.String |
getProject2StartDateString()
Returns the start date in yyyy-MM-dd format. |
java.lang.String |
getSelectedChart()
|
java.util.List<ProjectRecord> |
getSelectedProjects()
|
java.lang.String |
getStream1Statistics()
Return statistics for the stream1. |
java.lang.String |
getStream2Statistics()
Return statistics for the stream2. |
java.lang.String |
getTelemetryChartURL(java.util.List<SelectableTrajectoryStream> streams)
Return the google chart url that present all streams within the given list. |
java.lang.String |
getTelemetryName()
|
java.util.List<SelectableTrajectoryStream> |
getTrajectoryStream(org.hackystat.sensorbase.resource.projects.jaxb.Project project)
Return the list of TelemetryStream associated with the given project. |
java.lang.String |
getWarningMessage()
|
int |
getWidth()
|
boolean |
isChartEmpty()
|
boolean |
isComplete()
|
boolean |
isDTWChartEmpty()
|
boolean |
isEmpty()
Returns true if this model does not contain any data. |
boolean |
isInProcess()
|
boolean |
isNormalizedTSChartEmpty()
|
void |
loadData()
Load data from Hackystat service. |
void |
setHeight(int height)
|
void |
setModel(ProjectRecord selectedProject1,
ProjectRecord selectedProject2,
java.lang.String telemetryName,
java.lang.String granularity,
java.util.List<org.apache.wicket.model.IModel> parameters)
Set all the parameters for the current chart. |
void |
setWarningMessage(java.lang.String message)
Set the paramErrorMessage. |
void |
setWidth(int width)
|
boolean |
updateDTWChart()
Extract the time series from the selectedChart, normalize those and chart them. |
boolean |
updateNormalizedTSChart()
Extract the time series from the selectedChart, normalize those and chart them. |
boolean |
updateSelectedChart()
update the selectedChart. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TrajectoryChartDataModel()
Method Detail |
---|
public void setModel(ProjectRecord selectedProject1, ProjectRecord selectedProject2, java.lang.String telemetryName, java.lang.String granularity, java.util.List<org.apache.wicket.model.IModel> parameters)
selectedProject1
- The trajectory project1.selectedProject2
- The trajectory project2.telemetryName
- The selected telemetry stream name.granularity
- The seleceted granularity.parameters
- Additional telemetry parameters.public void loadData()
public void cancelDataLoading()
public java.lang.String getProject1StartDateString()
public java.lang.String getProject1EndDateString()
public java.lang.String getProject2StartDateString()
public java.lang.String getProject2EndDateString()
public java.lang.String getTelemetryName()
public boolean isEmpty()
public java.util.List<SelectableTrajectoryStream> getTrajectoryStream(org.hackystat.sensorbase.resource.projects.jaxb.Project project)
project
- the given project.
public java.lang.String getSelectedChart()
public boolean isChartEmpty()
public java.lang.String getNormalizedTSChart()
public boolean isNormalizedTSChartEmpty()
public java.lang.String getDTWChart()
public boolean isDTWChartEmpty()
public boolean updateSelectedChart()
public boolean updateNormalizedTSChart()
public boolean updateDTWChart()
public java.lang.String getDTWStatistics()
public java.lang.String getTelemetryChartURL(java.util.List<SelectableTrajectoryStream> streams)
streams
- the given stream list.
public java.lang.String getNormalizedTSChartURL(java.util.List<SelectableTrajectoryStream> streams)
streams
- the given stream list.
public java.lang.String getDTWChartURL(java.util.List<SelectableTrajectoryStream> streams)
streams
- the given stream list.
public void addStreamToChart(SelectableTrajectoryStream stream, double minimum, double maximum, java.lang.Integer maxStreamLength, GoogleChart googleChart)
stream
- the given stream.maximum
- the maximum value of the range this stream will be associated to.minimum
- the minimum value of the range this stream will be associated to.maxStreamLength
- the plotted stream length on X axis.googleChart
- the google chart.public java.util.List<java.lang.Double> addStreamToNormalizedChart(SelectableTrajectoryStream stream, double minimum, double maximum, java.lang.Integer maxStreamLength, GoogleChart googleChart)
stream
- the given stream.maximum
- the maximum value of the range this stream will be associated to.minimum
- the minimum value of the range this stream will be associated to.maxStreamLength
- the plotted stream length on X axis.googleChart
- the google chart.
public void addStreamToDTWChart(SelectableTrajectoryStream stream, java.util.List<java.lang.Double> list, double minimum, double maximum, java.lang.Integer maxStreamLength, GoogleChart googleChart)
stream
- the given stream.list
- the chart data.maximum
- the maximum value of the range this stream will be associated to.minimum
- the minimum value of the range this stream will be associated to.maxStreamLength
- the plotted stream length on X axis.googleChart
- the google chart.public java.util.List<java.lang.String> getDateList(java.util.List<org.hackystat.telemetry.service.resource.chart.jaxb.TelemetryPoint> points)
points
- the point list.
public java.util.List<java.lang.String> getMarkersList()
public java.util.List<ProjectRecord> getSelectedProjects()
public java.lang.String getParameterAsString()
public void setWidth(int width)
width
- the width to setpublic int getWidth()
public void setHeight(int height)
height
- the height to setpublic int getHeight()
public java.lang.String getStream1Statistics()
public java.lang.String getStream2Statistics()
public void changeSelectionForAll(boolean flag)
flag
- the boolean flag.public boolean isInProcess()
isInProcess
in interface Processable
public boolean isComplete()
isComplete
in interface Processable
public java.lang.String getProcessingMessage()
getProcessingMessage
in interface Processable
public void setWarningMessage(java.lang.String message)
message
- the message.public java.lang.String getWarningMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |