]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
First take on jfreechart ontology
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 22 Nov 2011 13:31:13 +0000 (13:31 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 22 Nov 2011 13:31:13 +0000 (13:31 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@23323 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.jfreechart.ontology/.classpath [new file with mode: 0644]
org.simantics.jfreechart.ontology/.project [new file with mode: 0644]
org.simantics.jfreechart.ontology/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.simantics.jfreechart.ontology/META-INF/MANIFEST.MF [new file with mode: 0644]
org.simantics.jfreechart.ontology/build.properties [new file with mode: 0644]
org.simantics.jfreechart.ontology/graph.tg [new file with mode: 0644]
org.simantics.jfreechart.ontology/graph/JFreeChart.pgraph [new file with mode: 0644]
org.simantics.jfreechart.ontology/src/org/simantics/sysdyn/JFreeChartResource.java [new file with mode: 0644]

diff --git a/org.simantics.jfreechart.ontology/.classpath b/org.simantics.jfreechart.ontology/.classpath
new file mode 100644 (file)
index 0000000..8a8f166
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<classpath>\r
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
+       <classpathentry kind="src" path="src"/>\r
+       <classpathentry kind="output" path="bin"/>\r
+</classpath>\r
diff --git a/org.simantics.jfreechart.ontology/.project b/org.simantics.jfreechart.ontology/.project
new file mode 100644 (file)
index 0000000..36a196b
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>org.simantics.jfreechart.ontology</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.simantics.graph.builder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.jdt.core.javabuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.ManifestBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.SchemaBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.eclipse.pde.PluginNature</nature>\r
+               <nature>org.eclipse.jdt.core.javanature</nature>\r
+               <nature>org.simantics.graph.nature</nature>\r
+       </natures>\r
+</projectDescription>\r
diff --git a/org.simantics.jfreechart.ontology/.settings/org.eclipse.jdt.core.prefs b/org.simantics.jfreechart.ontology/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..8fdbeb7
--- /dev/null
@@ -0,0 +1,8 @@
+#Mon Nov 14 12:29:34 EET 2011\r
+eclipse.preferences.version=1\r
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6\r
+org.eclipse.jdt.core.compiler.compliance=1.6\r
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
+org.eclipse.jdt.core.compiler.source=1.6\r
diff --git a/org.simantics.jfreechart.ontology/META-INF/MANIFEST.MF b/org.simantics.jfreechart.ontology/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..6ab2f81
--- /dev/null
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: JFreeChart
+Bundle-SymbolicName: org.simantics.jfreechart.ontology
+Bundle-Version: 0.1.0.qualifier
+Require-Bundle: org.simantics.layer0,
+ org.simantics.layer0x.ontology;bundle-version="1.0.0",
+ org.simantics.g2d.ontology;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.simantics.sysdyn
diff --git a/org.simantics.jfreechart.ontology/build.properties b/org.simantics.jfreechart.ontology/build.properties
new file mode 100644 (file)
index 0000000..022de17
--- /dev/null
@@ -0,0 +1,6 @@
+source.. = src/\r
+output.. = bin/\r
+bin.includes = plugin.xml,\\r
+               META-INF/,\\r
+               .,\\r
+               graph.tg\r
diff --git a/org.simantics.jfreechart.ontology/graph.tg b/org.simantics.jfreechart.ontology/graph.tg
new file mode 100644 (file)
index 0000000..352e312
Binary files /dev/null and b/org.simantics.jfreechart.ontology/graph.tg differ
diff --git a/org.simantics.jfreechart.ontology/graph/JFreeChart.pgraph b/org.simantics.jfreechart.ontology/graph/JFreeChart.pgraph
new file mode 100644 (file)
index 0000000..d1291d3
--- /dev/null
@@ -0,0 +1,152 @@
+L0 = <http://www.simantics.org/Layer0-1.0>
+L0X = <http://www.simantics.org/Layer0X-1.0>
+G2D = <http://www.simantics.org/G2D-1.0>
+
+//#####################################################################
+// Ontology for defining JFreeChart charts
+//#####################################################################
+
+JFREE = <http://www.simantics.org/JFreeChart-1.0> : L0.Ontology
+    @L0.new
+    L0.HasResourceClass "org.simantics.sysdyn.JFreeChartResource"
+
+//#####################################################################
+// Charts
+//#####################################################################
+JFREE.Chart <T L0.Entity
+    @L0.optionalProperty JFREE.HasTitle
+    @L0.optionalProperty JFREE.HasSubtitles
+    @L0.optionalProperty JFREE.HasVisibleBorder
+    @L0.optionalProperty JFREE.HasBorderColor
+    @L0.optionalProperty JFREE.HasBorderWidth
+
+//#####################################################################
+// Titles
+//#####################################################################
+JFREE.HasSubtitles <R L0.DependsOn : L0.FunctionalRelation
+    L0.HasDomain JFREE.Chart
+    L0.HasRange JFREE.Title
+    
+JFREE.Subtitles <T L0.OrderedSet <R L0.HasNext
+
+JFREE.Title <T L0.Entity
+    @L0.optionalProperty JFREE.HasPosition
+    @L0.optionalProperty JFREE.IsVisible
+    
+JFREE.TextTitle <T JFREE.Title
+JFREE.ImageTitle <T JFREE.Title
+JFREE.LegendTitle <T JFREE.Title
+JFREE.PaintScaleLegend <T JFREE.Title
+JFREE.CompositeTitle <T JFREE.Title
+
+
+//#####################################################################
+// Plots
+//#####################################################################
+
+JFREE.Plot <T L0.Entity
+    @L0.optionalProperty JFREE.HasBackgroundColor
+    @L0.optionalProperty JFREE.HasVisibleGrid    
+    
+JFREE.CategoryPlot <T JFREE.Plot
+JFREE.XYPlot <T JFREE.Plot
+JFREE.PiePlot <T JFREE.Plot
+
+//#####################################################################
+// Axis
+//#####################################################################
+
+JFREE.Axis <T L0.Entity
+    @L0.optionalProperty JFREE.HasVisibleTickLabels
+    @L0.optionalProperty JFREE.HasVisibleTickMarks
+    
+JFREE.HasDomainAxis <R L0.HasProperty
+    L0.HasDomain JFREE.Plot
+    L0.HasRange JFREE.Axis   
+    
+JFREE.HasRangeAxis <R L0.HasProperty
+    L0.HasDomain JFREE.Plot
+    L0.HasRange JFREE.Axis         
+    
+JFREE.MapToDomainAxis <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasDomain JFREE.Dataset
+    L0.HasRange JFREE.Axis   
+    
+JFREE.MapToRangeAxis <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasDomain JFREE.Dataset
+    L0.HasRange JFREE.Axis      
+    
+JFREE.CategoryAxis <T JFREE.Axis
+JFREE.ValueAxis <T JFREE.Axis
+JFREE.NumberAxis <T JFREE.Axis
+
+//#####################################################################
+// Datasets
+//#####################################################################
+JFREE.Dataset <T L0.Entity
+
+JFREE.XYDataset <T JFREE.Dataset
+JFREE.CategoryDataset <T JFREE.Dataset
+JFREE.PieDataset <T JFREE.Dataset
+
+//#####################################################################
+// Series
+//#####################################################################
+
+JFREE.Series <T L0.Entity
+    @L0.property JFREE.HasVariableRVI 
+    @L0.optionalProperty JFREE.HasColor
+    @L0.optionalProperty JFREE.HasLineWidth
+
+JFREE.HasVariableRVI <R L0.HasProperty
+    L0.HasDomain JFREE.Dataset
+    L0.HasRange L0.String
+    
+//#####################################################################
+// Visuals
+//#####################################################################
+// Universal
+JFREE.HasColor <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange G2D.Color 
+JFREE.IsVisible <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange L0.Boolean    
+JFREE.HasVisibleLabel <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange L0.Boolean        
+
+// Border
+JFREE.HasVisibleBorder <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange L0.Boolean
+JFREE.HasBorderColor <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange G2D.Color 
+JFREE.HasBorderWidth <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange L0.Double     
+
+// Position
+JFREE.HasPosition <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange JFREE.Position
+JFREE.Position <T L0.Entity
+JFREE.Bottom <T JFREE.Position
+JFREE.Top <T JFREE.Position
+JFREE.Left <T JFREE.Position
+JFREE.Right <T JFREE.Position
+
+// Series
+JFREE.HasLineWidth <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange L0.Integer   
+
+// Background
+JFREE.HasBackgroundColor <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange G2D.Color 
+JFREE.HasVisibleGrid <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange L0.Boolean    
+    
+// Ticks
+JFREE.HasVisibleTickLabels <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange L0.Boolean
+JFREE.HasVisibleTickMarks <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange L0.Boolean    
+
+// Legend    
+JFREE.HasVisibleLegend <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasRange L0.Boolean        
+        
\ No newline at end of file
diff --git a/org.simantics.jfreechart.ontology/src/org/simantics/sysdyn/JFreeChartResource.java b/org.simantics.jfreechart.ontology/src/org/simantics/sysdyn/JFreeChartResource.java
new file mode 100644 (file)
index 0000000..3edd162
--- /dev/null
@@ -0,0 +1,249 @@
+package org.simantics.sysdyn;\r
+\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.request.Read;\r
+import org.simantics.db.Session;\r
+import org.simantics.db.exception.DatabaseException;\r
+\r
+public class JFreeChartResource {\r
+    \r
+    public final Resource Axis;\r
+    public final Resource Bottom;\r
+    public final Resource CategoryAxis;\r
+    public final Resource CategoryDataset;\r
+    public final Resource CategoryPlot;\r
+    public final Resource Chart;\r
+    public final Resource CompositeTitle;\r
+    public final Resource Dataset;\r
+    public final Resource HasBackgroundColor;\r
+    public final Resource HasBackgroundColor_Inverse;\r
+    public final Resource HasBorderColor;\r
+    public final Resource HasBorderColor_Inverse;\r
+    public final Resource HasBorderWidth;\r
+    public final Resource HasBorderWidth_Inverse;\r
+    public final Resource HasColor;\r
+    public final Resource HasColor_Inverse;\r
+    public final Resource HasDomainAxis;\r
+    public final Resource HasDomainAxis_Inverse;\r
+    public final Resource HasLineWidth;\r
+    public final Resource HasLineWidth_Inverse;\r
+    public final Resource HasPosition;\r
+    public final Resource HasPosition_Inverse;\r
+    public final Resource HasRangeAxis;\r
+    public final Resource HasRangeAxis_Inverse;\r
+    public final Resource HasSubtitles;\r
+    public final Resource HasSubtitles_Inverse;\r
+    public final Resource HasTitle;\r
+    public final Resource HasVariableRVI;\r
+    public final Resource HasVariableRVI_Inverse;\r
+    public final Resource HasVisibleBorder;\r
+    public final Resource HasVisibleBorder_Inverse;\r
+    public final Resource HasVisibleGrid;\r
+    public final Resource HasVisibleGrid_Inverse;\r
+    public final Resource HasVisibleLabel;\r
+    public final Resource HasVisibleLabel_Inverse;\r
+    public final Resource HasVisibleLegend;\r
+    public final Resource HasVisibleLegend_Inverse;\r
+    public final Resource HasVisibleTickLabels;\r
+    public final Resource HasVisibleTickLabels_Inverse;\r
+    public final Resource HasVisibleTickMarks;\r
+    public final Resource HasVisibleTickMarks_Inverse;\r
+    public final Resource ImageTitle;\r
+    public final Resource IsVisible;\r
+    public final Resource IsVisible_Inverse;\r
+    public final Resource Left;\r
+    public final Resource LegendTitle;\r
+    public final Resource MapToDomainAxis;\r
+    public final Resource MapToDomainAxis_Inverse;\r
+    public final Resource MapToRangeAxis;\r
+    public final Resource MapToRangeAxis_Inverse;\r
+    public final Resource NumberAxis;\r
+    public final Resource PaintScaleLegend;\r
+    public final Resource PieDataset;\r
+    public final Resource PiePlot;\r
+    public final Resource Plot;\r
+    public final Resource Position;\r
+    public final Resource Right;\r
+    public final Resource Series;\r
+    public final Resource Subtitles;\r
+    public final Resource Subtitles_Inverse;\r
+    public final Resource TextTitle;\r
+    public final Resource Title;\r
+    public final Resource Top;\r
+    public final Resource ValueAxis;\r
+    public final Resource XYDataset;\r
+    public final Resource XYPlot;\r
+        \r
+    public static class URIs {\r
+        public static final String Axis = "http://www.simantics.org/JFreeChart-1.0/Axis";\r
+        public static final String Bottom = "http://www.simantics.org/JFreeChart-1.0/Bottom";\r
+        public static final String CategoryAxis = "http://www.simantics.org/JFreeChart-1.0/CategoryAxis";\r
+        public static final String CategoryDataset = "http://www.simantics.org/JFreeChart-1.0/CategoryDataset";\r
+        public static final String CategoryPlot = "http://www.simantics.org/JFreeChart-1.0/CategoryPlot";\r
+        public static final String Chart = "http://www.simantics.org/JFreeChart-1.0/Chart";\r
+        public static final String CompositeTitle = "http://www.simantics.org/JFreeChart-1.0/CompositeTitle";\r
+        public static final String Dataset = "http://www.simantics.org/JFreeChart-1.0/Dataset";\r
+        public static final String HasBackgroundColor = "http://www.simantics.org/JFreeChart-1.0/HasBackgroundColor";\r
+        public static final String HasBackgroundColor_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasBackgroundColor/Inverse";\r
+        public static final String HasBorderColor = "http://www.simantics.org/JFreeChart-1.0/HasBorderColor";\r
+        public static final String HasBorderColor_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasBorderColor/Inverse";\r
+        public static final String HasBorderWidth = "http://www.simantics.org/JFreeChart-1.0/HasBorderWidth";\r
+        public static final String HasBorderWidth_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasBorderWidth/Inverse";\r
+        public static final String HasColor = "http://www.simantics.org/JFreeChart-1.0/HasColor";\r
+        public static final String HasColor_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasColor/Inverse";\r
+        public static final String HasDomainAxis = "http://www.simantics.org/JFreeChart-1.0/HasDomainAxis";\r
+        public static final String HasDomainAxis_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasDomainAxis/Inverse";\r
+        public static final String HasLineWidth = "http://www.simantics.org/JFreeChart-1.0/HasLineWidth";\r
+        public static final String HasLineWidth_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasLineWidth/Inverse";\r
+        public static final String HasPosition = "http://www.simantics.org/JFreeChart-1.0/HasPosition";\r
+        public static final String HasPosition_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasPosition/Inverse";\r
+        public static final String HasRangeAxis = "http://www.simantics.org/JFreeChart-1.0/HasRangeAxis";\r
+        public static final String HasRangeAxis_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasRangeAxis/Inverse";\r
+        public static final String HasSubtitles = "http://www.simantics.org/JFreeChart-1.0/HasSubtitles";\r
+        public static final String HasSubtitles_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasSubtitles/Inverse";\r
+        public static final String HasTitle = "http://www.simantics.org/JFreeChart-1.0/HasTitle";\r
+        public static final String HasVariableRVI = "http://www.simantics.org/JFreeChart-1.0/HasVariableRVI";\r
+        public static final String HasVariableRVI_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasVariableRVI/Inverse";\r
+        public static final String HasVisibleBorder = "http://www.simantics.org/JFreeChart-1.0/HasVisibleBorder";\r
+        public static final String HasVisibleBorder_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasVisibleBorder/Inverse";\r
+        public static final String HasVisibleGrid = "http://www.simantics.org/JFreeChart-1.0/HasVisibleGrid";\r
+        public static final String HasVisibleGrid_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasVisibleGrid/Inverse";\r
+        public static final String HasVisibleLabel = "http://www.simantics.org/JFreeChart-1.0/HasVisibleLabel";\r
+        public static final String HasVisibleLabel_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasVisibleLabel/Inverse";\r
+        public static final String HasVisibleLegend = "http://www.simantics.org/JFreeChart-1.0/HasVisibleLegend";\r
+        public static final String HasVisibleLegend_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasVisibleLegend/Inverse";\r
+        public static final String HasVisibleTickLabels = "http://www.simantics.org/JFreeChart-1.0/HasVisibleTickLabels";\r
+        public static final String HasVisibleTickLabels_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasVisibleTickLabels/Inverse";\r
+        public static final String HasVisibleTickMarks = "http://www.simantics.org/JFreeChart-1.0/HasVisibleTickMarks";\r
+        public static final String HasVisibleTickMarks_Inverse = "http://www.simantics.org/JFreeChart-1.0/HasVisibleTickMarks/Inverse";\r
+        public static final String ImageTitle = "http://www.simantics.org/JFreeChart-1.0/ImageTitle";\r
+        public static final String IsVisible = "http://www.simantics.org/JFreeChart-1.0/IsVisible";\r
+        public static final String IsVisible_Inverse = "http://www.simantics.org/JFreeChart-1.0/IsVisible/Inverse";\r
+        public static final String Left = "http://www.simantics.org/JFreeChart-1.0/Left";\r
+        public static final String LegendTitle = "http://www.simantics.org/JFreeChart-1.0/LegendTitle";\r
+        public static final String MapToDomainAxis = "http://www.simantics.org/JFreeChart-1.0/MapToDomainAxis";\r
+        public static final String MapToDomainAxis_Inverse = "http://www.simantics.org/JFreeChart-1.0/MapToDomainAxis/Inverse";\r
+        public static final String MapToRangeAxis = "http://www.simantics.org/JFreeChart-1.0/MapToRangeAxis";\r
+        public static final String MapToRangeAxis_Inverse = "http://www.simantics.org/JFreeChart-1.0/MapToRangeAxis/Inverse";\r
+        public static final String NumberAxis = "http://www.simantics.org/JFreeChart-1.0/NumberAxis";\r
+        public static final String PaintScaleLegend = "http://www.simantics.org/JFreeChart-1.0/PaintScaleLegend";\r
+        public static final String PieDataset = "http://www.simantics.org/JFreeChart-1.0/PieDataset";\r
+        public static final String PiePlot = "http://www.simantics.org/JFreeChart-1.0/PiePlot";\r
+        public static final String Plot = "http://www.simantics.org/JFreeChart-1.0/Plot";\r
+        public static final String Position = "http://www.simantics.org/JFreeChart-1.0/Position";\r
+        public static final String Right = "http://www.simantics.org/JFreeChart-1.0/Right";\r
+        public static final String Series = "http://www.simantics.org/JFreeChart-1.0/Series";\r
+        public static final String Subtitles = "http://www.simantics.org/JFreeChart-1.0/Subtitles";\r
+        public static final String Subtitles_Inverse = "http://www.simantics.org/JFreeChart-1.0/Subtitles/Inverse";\r
+        public static final String TextTitle = "http://www.simantics.org/JFreeChart-1.0/TextTitle";\r
+        public static final String Title = "http://www.simantics.org/JFreeChart-1.0/Title";\r
+        public static final String Top = "http://www.simantics.org/JFreeChart-1.0/Top";\r
+        public static final String ValueAxis = "http://www.simantics.org/JFreeChart-1.0/ValueAxis";\r
+        public static final String XYDataset = "http://www.simantics.org/JFreeChart-1.0/XYDataset";\r
+        public static final String XYPlot = "http://www.simantics.org/JFreeChart-1.0/XYPlot";\r
+    }\r
+    \r
+    public static Resource getResourceOrNull(ReadGraph graph, String uri) {\r
+        try {\r
+            return graph.getResource(uri);\r
+        } catch(DatabaseException e) {\r
+            System.err.println(e.getMessage());\r
+            return null;\r
+        }\r
+    }\r
+    \r
+    public JFreeChartResource(ReadGraph graph) {\r
+        Axis = getResourceOrNull(graph, URIs.Axis);\r
+        Bottom = getResourceOrNull(graph, URIs.Bottom);\r
+        CategoryAxis = getResourceOrNull(graph, URIs.CategoryAxis);\r
+        CategoryDataset = getResourceOrNull(graph, URIs.CategoryDataset);\r
+        CategoryPlot = getResourceOrNull(graph, URIs.CategoryPlot);\r
+        Chart = getResourceOrNull(graph, URIs.Chart);\r
+        CompositeTitle = getResourceOrNull(graph, URIs.CompositeTitle);\r
+        Dataset = getResourceOrNull(graph, URIs.Dataset);\r
+        HasBackgroundColor = getResourceOrNull(graph, URIs.HasBackgroundColor);\r
+        HasBackgroundColor_Inverse = getResourceOrNull(graph, URIs.HasBackgroundColor_Inverse);\r
+        HasBorderColor = getResourceOrNull(graph, URIs.HasBorderColor);\r
+        HasBorderColor_Inverse = getResourceOrNull(graph, URIs.HasBorderColor_Inverse);\r
+        HasBorderWidth = getResourceOrNull(graph, URIs.HasBorderWidth);\r
+        HasBorderWidth_Inverse = getResourceOrNull(graph, URIs.HasBorderWidth_Inverse);\r
+        HasColor = getResourceOrNull(graph, URIs.HasColor);\r
+        HasColor_Inverse = getResourceOrNull(graph, URIs.HasColor_Inverse);\r
+        HasDomainAxis = getResourceOrNull(graph, URIs.HasDomainAxis);\r
+        HasDomainAxis_Inverse = getResourceOrNull(graph, URIs.HasDomainAxis_Inverse);\r
+        HasLineWidth = getResourceOrNull(graph, URIs.HasLineWidth);\r
+        HasLineWidth_Inverse = getResourceOrNull(graph, URIs.HasLineWidth_Inverse);\r
+        HasPosition = getResourceOrNull(graph, URIs.HasPosition);\r
+        HasPosition_Inverse = getResourceOrNull(graph, URIs.HasPosition_Inverse);\r
+        HasRangeAxis = getResourceOrNull(graph, URIs.HasRangeAxis);\r
+        HasRangeAxis_Inverse = getResourceOrNull(graph, URIs.HasRangeAxis_Inverse);\r
+        HasSubtitles = getResourceOrNull(graph, URIs.HasSubtitles);\r
+        HasSubtitles_Inverse = getResourceOrNull(graph, URIs.HasSubtitles_Inverse);\r
+        HasTitle = getResourceOrNull(graph, URIs.HasTitle);\r
+        HasVariableRVI = getResourceOrNull(graph, URIs.HasVariableRVI);\r
+        HasVariableRVI_Inverse = getResourceOrNull(graph, URIs.HasVariableRVI_Inverse);\r
+        HasVisibleBorder = getResourceOrNull(graph, URIs.HasVisibleBorder);\r
+        HasVisibleBorder_Inverse = getResourceOrNull(graph, URIs.HasVisibleBorder_Inverse);\r
+        HasVisibleGrid = getResourceOrNull(graph, URIs.HasVisibleGrid);\r
+        HasVisibleGrid_Inverse = getResourceOrNull(graph, URIs.HasVisibleGrid_Inverse);\r
+        HasVisibleLabel = getResourceOrNull(graph, URIs.HasVisibleLabel);\r
+        HasVisibleLabel_Inverse = getResourceOrNull(graph, URIs.HasVisibleLabel_Inverse);\r
+        HasVisibleLegend = getResourceOrNull(graph, URIs.HasVisibleLegend);\r
+        HasVisibleLegend_Inverse = getResourceOrNull(graph, URIs.HasVisibleLegend_Inverse);\r
+        HasVisibleTickLabels = getResourceOrNull(graph, URIs.HasVisibleTickLabels);\r
+        HasVisibleTickLabels_Inverse = getResourceOrNull(graph, URIs.HasVisibleTickLabels_Inverse);\r
+        HasVisibleTickMarks = getResourceOrNull(graph, URIs.HasVisibleTickMarks);\r
+        HasVisibleTickMarks_Inverse = getResourceOrNull(graph, URIs.HasVisibleTickMarks_Inverse);\r
+        ImageTitle = getResourceOrNull(graph, URIs.ImageTitle);\r
+        IsVisible = getResourceOrNull(graph, URIs.IsVisible);\r
+        IsVisible_Inverse = getResourceOrNull(graph, URIs.IsVisible_Inverse);\r
+        Left = getResourceOrNull(graph, URIs.Left);\r
+        LegendTitle = getResourceOrNull(graph, URIs.LegendTitle);\r
+        MapToDomainAxis = getResourceOrNull(graph, URIs.MapToDomainAxis);\r
+        MapToDomainAxis_Inverse = getResourceOrNull(graph, URIs.MapToDomainAxis_Inverse);\r
+        MapToRangeAxis = getResourceOrNull(graph, URIs.MapToRangeAxis);\r
+        MapToRangeAxis_Inverse = getResourceOrNull(graph, URIs.MapToRangeAxis_Inverse);\r
+        NumberAxis = getResourceOrNull(graph, URIs.NumberAxis);\r
+        PaintScaleLegend = getResourceOrNull(graph, URIs.PaintScaleLegend);\r
+        PieDataset = getResourceOrNull(graph, URIs.PieDataset);\r
+        PiePlot = getResourceOrNull(graph, URIs.PiePlot);\r
+        Plot = getResourceOrNull(graph, URIs.Plot);\r
+        Position = getResourceOrNull(graph, URIs.Position);\r
+        Right = getResourceOrNull(graph, URIs.Right);\r
+        Series = getResourceOrNull(graph, URIs.Series);\r
+        Subtitles = getResourceOrNull(graph, URIs.Subtitles);\r
+        Subtitles_Inverse = getResourceOrNull(graph, URIs.Subtitles_Inverse);\r
+        TextTitle = getResourceOrNull(graph, URIs.TextTitle);\r
+        Title = getResourceOrNull(graph, URIs.Title);\r
+        Top = getResourceOrNull(graph, URIs.Top);\r
+        ValueAxis = getResourceOrNull(graph, URIs.ValueAxis);\r
+        XYDataset = getResourceOrNull(graph, URIs.XYDataset);\r
+        XYPlot = getResourceOrNull(graph, URIs.XYPlot);\r
+    }\r
+    \r
+    public static JFreeChartResource getInstance(ReadGraph graph) {\r
+        Session session = graph.getSession();\r
+        JFreeChartResource ret = session.peekService(JFreeChartResource.class);\r
+        if(ret == null) {\r
+            ret = new JFreeChartResource(graph);\r
+            session.registerService(JFreeChartResource.class, ret);\r
+        }\r
+        return ret;\r
+    }\r
+    \r
+    public static JFreeChartResource getInstance(Session session) throws DatabaseException {\r
+        JFreeChartResource ret = session.peekService(JFreeChartResource.class);\r
+        if(ret == null) {\r
+            ret = session.syncRequest(new Read<JFreeChartResource>() {\r
+                public JFreeChartResource perform(ReadGraph graph) throws DatabaseException {\r
+                    return new JFreeChartResource(graph);\r
+                }\r
+            });\r
+            session.registerService(JFreeChartResource.class, ret);\r
+        }\r
+        return ret;\r
+    }\r
+    \r
+}\r
+\r