- public static HistorySamplerItem createHistorySamplerItem(ReadGraph graph, Resource subscriptionItem) throws DatabaseException {\r
- \r
- try {\r
-\r
- Resource model = graph.syncRequest(new PossibleModel(subscriptionItem));\r
- if ( model == null ) {\r
- throw new DatabaseException("There is no model for " + subscriptionItem);\r
- }\r
-\r
- Key chartDataKey = ChartKeys.chartSourceKey(model);\r
+ public static HistorySamplerItem createHistorySamplerItem(ReadGraph graph, Variable run, Resource subscriptionItem) throws DatabaseException {\r
+ IExperiment exp = (IExperiment) run.getPropertyValue(graph, "iExperiment");\r
+ ITrendSupport support = exp.getService(ITrendSupport.class);\r
+ ChartData data = support.getChartData();\r
+ return createHistorySamplerItem(graph, subscriptionItem, data);\r
+ }\r