\r
import org.simantics.db.ReadGraph;\r
import org.simantics.db.Resource;\r
+import org.simantics.db.exception.DatabaseException;\r
\r
\r
/**\r
\r
protected Resource resource;\r
\r
- public AbstractDataset(ReadGraph graph, Resource resource) {\r
+ public AbstractDataset(ReadGraph graph, Resource resource) throws DatabaseException {\r
this.resource = resource;\r
}\r
\r
private IRenderer renderer;\r
private DefaultCategoryDataset dataset;\r
\r
- public CategoryDataset(ReadGraph graph, Resource resource) {\r
+ public CategoryDataset(ReadGraph graph, Resource resource) throws DatabaseException {\r
super(graph, resource);\r
\r
- try {\r
+ \r
Layer0 l0 = Layer0.getInstance(graph);\r
ModelingResources mr = ModelingResources.getInstance(graph);\r
JFreeChartResource jfree = JFreeChartResource.getInstance(graph);\r
Resource rendererResource = graph.getPossibleObject(resource, jfree.Dataset_renderer);\r
renderer = graph.adapt(rendererResource, IRenderer.class);\r
\r
- } catch (DatabaseException e) {\r
- e.printStackTrace();\r
- }\r
+ \r
}\r
\r
private DatasetListener listener;\r
private HashMap<String, Color> colorMap;\r
private HashMap<String, Boolean> explodedMap;\r
\r
- public PieDataset(ReadGraph graph, Resource resource) {\r
+ public PieDataset(ReadGraph graph, Resource resource) throws DatabaseException {\r
super(graph, resource);\r
\r
- try {\r
+ \r
Layer0 l0 = Layer0.getInstance(graph);\r
ModelingResources mr = ModelingResources.getInstance(graph);\r
JFreeChartResource jfree = JFreeChartResource.getInstance(graph);\r
if(seriesList != null) {\r
this.seriesList = ListUtils.toList(graph, seriesList);\r
}\r
- } catch (DatabaseException e) {\r
- e.printStackTrace();\r
- }\r
+ \r
\r
}\r
\r
\r
private IRenderer renderer;\r
\r
- public XYDataset(ReadGraph graph, final Resource datasetResource) {\r
+ public XYDataset(ReadGraph graph, final Resource datasetResource) throws DatabaseException {\r
super(graph, datasetResource);\r
}\r
\r