]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.spreadsheet.ontology/src/org/simantics/spreadsheet/resource/SpreadsheetResource.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.spreadsheet.ontology / src / org / simantics / spreadsheet / resource / SpreadsheetResource.java
1 package org.simantics.spreadsheet.resource;\r
2 \r
3 import org.simantics.db.RequestProcessor;\r
4 import org.simantics.db.Resource;\r
5 import org.simantics.db.ReadGraph;\r
6 import org.simantics.db.request.Read;\r
7 import org.simantics.db.Session;\r
8 import org.simantics.db.exception.DatabaseException;\r
9 import org.simantics.db.service.QueryControl;\r
10 \r
11 public class SpreadsheetResource {\r
12     \r
13     public final Resource Attribute;\r
14     public final Resource Book;\r
15     public final Resource Book_HasDefaultInitialCondition;\r
16     public final Resource BrowseContext;\r
17     public final Resource Cell;\r
18     public final Resource Cell_HasStyle;\r
19     public final Resource Cell_StyleOf;\r
20     public final Resource Cell_align;\r
21     public final Resource Cell_align_Inverse;\r
22     public final Resource Cell_background;\r
23     public final Resource Cell_background_Inverse;\r
24     public final Resource Cell_border;\r
25     public final Resource Cell_border_Inverse;\r
26     public final Resource Cell_columnSpan;\r
27     public final Resource Cell_columnSpan_Inverse;\r
28     public final Resource Cell_content;\r
29     public final Resource Cell_content_Inverse;\r
30     public final Resource Cell_editable;\r
31     public final Resource Cell_editable_Inverse;\r
32     public final Resource Cell_font;\r
33     public final Resource Cell_font_Inverse;\r
34     public final Resource Cell_foreground;\r
35     public final Resource Cell_foreground_Inverse;\r
36     public final Resource Cell_formatIndex;\r
37     public final Resource Cell_formatIndex_Inverse;\r
38     public final Resource Cell_formatString;\r
39     public final Resource Cell_formatString_Inverse;\r
40     public final Resource Cell_label;\r
41     public final Resource Cell_label_Inverse;\r
42     public final Resource Cell_locked;\r
43     public final Resource Cell_locked_Inverse;\r
44     public final Resource Cell_rowSpan;\r
45     public final Resource Cell_rowSpan_Inverse;\r
46     public final Resource Cell_style;\r
47     public final Resource Cell_style_Inverse;\r
48     public final Resource CompositeTemplate;\r
49     public final Resource Dimensions;\r
50     public final Resource Dimensions_columnCount;\r
51     public final Resource Dimensions_columnCount_Inverse;\r
52     public final Resource Dimensions_fitColumns;\r
53     public final Resource Dimensions_fitColumns_Inverse;\r
54     public final Resource Dimensions_fitRows;\r
55     public final Resource Dimensions_fitRows_Inverse;\r
56     public final Resource Dimensions_rowCount;\r
57     public final Resource Dimensions_rowCount_Inverse;\r
58     public final Resource DoubleArrayCell;\r
59     public final Resource DoubleArrayCell_HasDoubleArray;\r
60     public final Resource DoubleArrayCell_HasDoubleArray_Inverse;\r
61     public final Resource DoubleArrayCell_HasWidth;\r
62     public final Resource DoubleArrayCell_HasWidth_Inverse;\r
63     public final Resource DoubleArrayRange;\r
64     public final Resource DoubleArrayRange_array;\r
65     public final Resource DoubleArrayRange_array_Inverse;\r
66     public final Resource Element;\r
67     public final Resource Element_immutable;\r
68     public final Resource Element_immutable_Inverse;\r
69     public final Resource ExcelCell;\r
70     public final Resource Experiment;\r
71     public final Resource ExpressionRange;\r
72     public final Resource ExpressionRange_cells;\r
73     public final Resource ExpressionRange_cells_Inverse;\r
74     public final Resource ForCompositeTemplate;\r
75     public final Resource ForCompositeTemplate_Inverse;\r
76     public final Resource Functions;\r
77     public final Resource Functions_cellLabel;\r
78     public final Resource Functions_contentDisplayValueAccessor;\r
79     public final Resource Functions_contentValueAccessor;\r
80     public final Resource Functions_defaultLineCells;\r
81     public final Resource Functions_defaultSheetCellEditor;\r
82     public final Resource Functions_doubleArrayChildren;\r
83     public final Resource Functions_lineNodeKeys;\r
84     public final Resource Functions_queryRangeChildren;\r
85     public final Resource Functions_sclValue;\r
86     public final Resource Functions_sheetRunDomainChildren;\r
87     public final Resource Functions_spreadsheetChildren;\r
88     public final Resource Functions_spreadsheetInput;\r
89     public final Resource Functions_spreadsheetLinesChildren;\r
90     public final Resource Functions_spreadsheetRunInput;\r
91     public final Resource Functions_spreadsheetSession;\r
92     public final Resource Functions_stringArrayChildren;\r
93     public final Resource Functions_textCellEditor;\r
94     public final Resource Functions_variableCellEditor;\r
95     public final Resource HasInitialCondition;\r
96     public final Resource HasInitialCondition_Inverse;\r
97     public final Resource HasLocation;\r
98     public final Resource HasLocation_Inverse;\r
99     public final Resource HasMicrosoftExcelDocumentData;\r
100     public final Resource HasMicrosoftExcelDocumentData_Inverse;\r
101     public final Resource HasRVI;\r
102     public final Resource HasRVI_Inverse;\r
103     public final Resource HasSheet;\r
104     public final Resource Headers;\r
105     public final Resource Headers_columnLabels;\r
106     public final Resource Headers_columnLabels_Inverse;\r
107     public final Resource Headers_columnWidths;\r
108     public final Resource Headers_columnWidths_Inverse;\r
109     public final Resource Headers_rowHeights;\r
110     public final Resource Headers_rowHeights_Inverse;\r
111     public final Resource Headers_rowLabels;\r
112     public final Resource Headers_rowLabels_Inverse;\r
113     public final Resource InitialCondition;\r
114     public final Resource InitialCondition_ConditionOf;\r
115     public final Resource InitialCondition_ConditionOf_Inverse;\r
116     public final Resource InitialCondition_DefaultConditionOf;\r
117     public final Resource InitialCondition_bytes;\r
118     public final Resource InitialCondition_bytes_Inverse;\r
119     public final Resource IsSheetOf;\r
120     public final Resource Line;\r
121     public final Resource LineContent;\r
122     public final Resource LineNode;\r
123     public final Resource LineNode_keys;\r
124     public final Resource LineNode_keys_Inverse;\r
125     public final Resource Line_content;\r
126     public final Resource Line_content_Inverse;\r
127     public final Resource Lines;\r
128     public final Resource MicrosoftExcelDocument;\r
129     public final Resource MicrosoftExcelDocumentData;\r
130     public final Resource ModelSourceContribution;\r
131     public final Resource Range;\r
132     public final Resource Range_heightBound;\r
133     public final Resource Range_heightBound_Inverse;\r
134     public final Resource Range_location;\r
135     public final Resource Range_location_Inverse;\r
136     public final Resource Range_widthBound;\r
137     public final Resource Range_widthBound_Inverse;\r
138     public final Resource Run;\r
139     public final Resource SCLCell;\r
140     public final Resource SCLCell_Expression;\r
141     public final Resource SCLCell_Expression_Inverse;\r
142     public final Resource SCLMain;\r
143     public final Resource SCLValue;\r
144     public final Resource SheetSourceContribution;\r
145     public final Resource SourceContribution;\r
146     public final Resource SourceContribution_function;\r
147     public final Resource SourceContribution_function_Inverse;\r
148     public final Resource SourceContribution_labeler;\r
149     public final Resource SourceContribution_labeler_Inverse;\r
150     public final Resource Spreadsheet;\r
151     public final Resource SpreadsheetElement;\r
152     public final Resource StringArrayCell;\r
153     public final Resource StringArrayCell_HasStringArray;\r
154     public final Resource StringArrayCell_HasStringArray_Inverse;\r
155     public final Resource StringArrayCell_HasWidth;\r
156     public final Resource StringArrayCell_HasWidth_Inverse;\r
157     public final Resource StringArrayRange;\r
158     public final Resource StringArrayRange_array;\r
159     public final Resource StringArrayRange_array_Inverse;\r
160     public final Resource Style;\r
161     public final Resource Style_id;\r
162     public final Resource Style_id_Inverse;\r
163     public final Resource TextCell;\r
164     public final Resource cellEditor;\r
165     public final Resource cellEditor_Inverse;\r
166     public final Resource scl;\r
167     public final Resource sclValue;\r
168     public final Resource session;\r
169     public final Resource session_Inverse;\r
170         \r
171     public static class URIs {\r
172         public static final String Attribute = "http://www.simantics.org/Spreadsheet-1.2/Attribute";\r
173         public static final String Book = "http://www.simantics.org/Spreadsheet-1.2/Book";\r
174         public static final String Book_HasDefaultInitialCondition = "http://www.simantics.org/Spreadsheet-1.2/Book/HasDefaultInitialCondition";\r
175         public static final String BrowseContext = "http://www.simantics.org/Spreadsheet-1.2/BrowseContext";\r
176         public static final String Cell = "http://www.simantics.org/Spreadsheet-1.2/Cell";\r
177         public static final String Cell_HasStyle = "http://www.simantics.org/Spreadsheet-1.2/Cell/HasStyle";\r
178         public static final String Cell_StyleOf = "http://www.simantics.org/Spreadsheet-1.2/Cell/StyleOf";\r
179         public static final String Cell_align = "http://www.simantics.org/Spreadsheet-1.2/Cell/align";\r
180         public static final String Cell_align_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/align/Inverse";\r
181         public static final String Cell_background = "http://www.simantics.org/Spreadsheet-1.2/Cell/background";\r
182         public static final String Cell_background_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/background/Inverse";\r
183         public static final String Cell_border = "http://www.simantics.org/Spreadsheet-1.2/Cell/border";\r
184         public static final String Cell_border_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/border/Inverse";\r
185         public static final String Cell_columnSpan = "http://www.simantics.org/Spreadsheet-1.2/Cell/columnSpan";\r
186         public static final String Cell_columnSpan_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/columnSpan/Inverse";\r
187         public static final String Cell_content = "http://www.simantics.org/Spreadsheet-1.2/Cell/content";\r
188         public static final String Cell_content_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/content/Inverse";\r
189         public static final String Cell_editable = "http://www.simantics.org/Spreadsheet-1.2/Cell/editable";\r
190         public static final String Cell_editable_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/editable/Inverse";\r
191         public static final String Cell_font = "http://www.simantics.org/Spreadsheet-1.2/Cell/font";\r
192         public static final String Cell_font_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/font/Inverse";\r
193         public static final String Cell_foreground = "http://www.simantics.org/Spreadsheet-1.2/Cell/foreground";\r
194         public static final String Cell_foreground_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/foreground/Inverse";\r
195         public static final String Cell_formatIndex = "http://www.simantics.org/Spreadsheet-1.2/Cell/formatIndex";\r
196         public static final String Cell_formatIndex_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/formatIndex/Inverse";\r
197         public static final String Cell_formatString = "http://www.simantics.org/Spreadsheet-1.2/Cell/formatString";\r
198         public static final String Cell_formatString_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/formatString/Inverse";\r
199         public static final String Cell_label = "http://www.simantics.org/Spreadsheet-1.2/Cell/label";\r
200         public static final String Cell_label_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/label/Inverse";\r
201         public static final String Cell_locked = "http://www.simantics.org/Spreadsheet-1.2/Cell/locked";\r
202         public static final String Cell_locked_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/locked/Inverse";\r
203         public static final String Cell_rowSpan = "http://www.simantics.org/Spreadsheet-1.2/Cell/rowSpan";\r
204         public static final String Cell_rowSpan_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/rowSpan/Inverse";\r
205         public static final String Cell_style = "http://www.simantics.org/Spreadsheet-1.2/Cell/style";\r
206         public static final String Cell_style_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Cell/style/Inverse";\r
207         public static final String CompositeTemplate = "http://www.simantics.org/Spreadsheet-1.2/CompositeTemplate";\r
208         public static final String Dimensions = "http://www.simantics.org/Spreadsheet-1.2/Dimensions";\r
209         public static final String Dimensions_columnCount = "http://www.simantics.org/Spreadsheet-1.2/Dimensions/columnCount";\r
210         public static final String Dimensions_columnCount_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Dimensions/columnCount/Inverse";\r
211         public static final String Dimensions_fitColumns = "http://www.simantics.org/Spreadsheet-1.2/Dimensions/fitColumns";\r
212         public static final String Dimensions_fitColumns_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Dimensions/fitColumns/Inverse";\r
213         public static final String Dimensions_fitRows = "http://www.simantics.org/Spreadsheet-1.2/Dimensions/fitRows";\r
214         public static final String Dimensions_fitRows_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Dimensions/fitRows/Inverse";\r
215         public static final String Dimensions_rowCount = "http://www.simantics.org/Spreadsheet-1.2/Dimensions/rowCount";\r
216         public static final String Dimensions_rowCount_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Dimensions/rowCount/Inverse";\r
217         public static final String DoubleArrayCell = "http://www.simantics.org/Spreadsheet-1.2/DoubleArrayCell";\r
218         public static final String DoubleArrayCell_HasDoubleArray = "http://www.simantics.org/Spreadsheet-1.2/DoubleArrayCell/HasDoubleArray";\r
219         public static final String DoubleArrayCell_HasDoubleArray_Inverse = "http://www.simantics.org/Spreadsheet-1.2/DoubleArrayCell/HasDoubleArray/Inverse";\r
220         public static final String DoubleArrayCell_HasWidth = "http://www.simantics.org/Spreadsheet-1.2/DoubleArrayCell/HasWidth";\r
221         public static final String DoubleArrayCell_HasWidth_Inverse = "http://www.simantics.org/Spreadsheet-1.2/DoubleArrayCell/HasWidth/Inverse";\r
222         public static final String DoubleArrayRange = "http://www.simantics.org/Spreadsheet-1.2/DoubleArrayRange";\r
223         public static final String DoubleArrayRange_array = "http://www.simantics.org/Spreadsheet-1.2/DoubleArrayRange/array";\r
224         public static final String DoubleArrayRange_array_Inverse = "http://www.simantics.org/Spreadsheet-1.2/DoubleArrayRange/array/Inverse";\r
225         public static final String Element = "http://www.simantics.org/Spreadsheet-1.2/Element";\r
226         public static final String Element_immutable = "http://www.simantics.org/Spreadsheet-1.2/Element/immutable";\r
227         public static final String Element_immutable_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Element/immutable/Inverse";\r
228         public static final String ExcelCell = "http://www.simantics.org/Spreadsheet-1.2/ExcelCell";\r
229         public static final String Experiment = "http://www.simantics.org/Spreadsheet-1.2/Experiment";\r
230         public static final String ExpressionRange = "http://www.simantics.org/Spreadsheet-1.2/ExpressionRange";\r
231         public static final String ExpressionRange_cells = "http://www.simantics.org/Spreadsheet-1.2/ExpressionRange/cells";\r
232         public static final String ExpressionRange_cells_Inverse = "http://www.simantics.org/Spreadsheet-1.2/ExpressionRange/cells/Inverse";\r
233         public static final String ForCompositeTemplate = "http://www.simantics.org/Spreadsheet-1.2/ForCompositeTemplate";\r
234         public static final String ForCompositeTemplate_Inverse = "http://www.simantics.org/Spreadsheet-1.2/ForCompositeTemplate/Inverse";\r
235         public static final String Functions = "http://www.simantics.org/Spreadsheet-1.2/Functions";\r
236         public static final String Functions_cellLabel = "http://www.simantics.org/Spreadsheet-1.2/Functions/cellLabel";\r
237         public static final String Functions_contentDisplayValueAccessor = "http://www.simantics.org/Spreadsheet-1.2/Functions/contentDisplayValueAccessor";\r
238         public static final String Functions_contentValueAccessor = "http://www.simantics.org/Spreadsheet-1.2/Functions/contentValueAccessor";\r
239         public static final String Functions_defaultLineCells = "http://www.simantics.org/Spreadsheet-1.2/Functions/defaultLineCells";\r
240         public static final String Functions_defaultSheetCellEditor = "http://www.simantics.org/Spreadsheet-1.2/Functions/defaultSheetCellEditor";\r
241         public static final String Functions_doubleArrayChildren = "http://www.simantics.org/Spreadsheet-1.2/Functions/doubleArrayChildren";\r
242         public static final String Functions_lineNodeKeys = "http://www.simantics.org/Spreadsheet-1.2/Functions/lineNodeKeys";\r
243         public static final String Functions_queryRangeChildren = "http://www.simantics.org/Spreadsheet-1.2/Functions/queryRangeChildren";\r
244         public static final String Functions_sclValue = "http://www.simantics.org/Spreadsheet-1.2/Functions/sclValue";\r
245         public static final String Functions_sheetRunDomainChildren = "http://www.simantics.org/Spreadsheet-1.2/Functions/sheetRunDomainChildren";\r
246         public static final String Functions_spreadsheetChildren = "http://www.simantics.org/Spreadsheet-1.2/Functions/spreadsheetChildren";\r
247         public static final String Functions_spreadsheetInput = "http://www.simantics.org/Spreadsheet-1.2/Functions/spreadsheetInput";\r
248         public static final String Functions_spreadsheetLinesChildren = "http://www.simantics.org/Spreadsheet-1.2/Functions/spreadsheetLinesChildren";\r
249         public static final String Functions_spreadsheetRunInput = "http://www.simantics.org/Spreadsheet-1.2/Functions/spreadsheetRunInput";\r
250         public static final String Functions_spreadsheetSession = "http://www.simantics.org/Spreadsheet-1.2/Functions/spreadsheetSession";\r
251         public static final String Functions_stringArrayChildren = "http://www.simantics.org/Spreadsheet-1.2/Functions/stringArrayChildren";\r
252         public static final String Functions_textCellEditor = "http://www.simantics.org/Spreadsheet-1.2/Functions/textCellEditor";\r
253         public static final String Functions_variableCellEditor = "http://www.simantics.org/Spreadsheet-1.2/Functions/variableCellEditor";\r
254         public static final String HasInitialCondition = "http://www.simantics.org/Spreadsheet-1.2/HasInitialCondition";\r
255         public static final String HasInitialCondition_Inverse = "http://www.simantics.org/Spreadsheet-1.2/HasInitialCondition/Inverse";\r
256         public static final String HasLocation = "http://www.simantics.org/Spreadsheet-1.2/HasLocation";\r
257         public static final String HasLocation_Inverse = "http://www.simantics.org/Spreadsheet-1.2/HasLocation/Inverse";\r
258         public static final String HasMicrosoftExcelDocumentData = "http://www.simantics.org/Spreadsheet-1.2/HasMicrosoftExcelDocumentData";\r
259         public static final String HasMicrosoftExcelDocumentData_Inverse = "http://www.simantics.org/Spreadsheet-1.2/HasMicrosoftExcelDocumentData/Inverse";\r
260         public static final String HasRVI = "http://www.simantics.org/Spreadsheet-1.2/HasRVI";\r
261         public static final String HasRVI_Inverse = "http://www.simantics.org/Spreadsheet-1.2/HasRVI/Inverse";\r
262         public static final String HasSheet = "http://www.simantics.org/Spreadsheet-1.2/HasSheet";\r
263         public static final String Headers = "http://www.simantics.org/Spreadsheet-1.2/Headers";\r
264         public static final String Headers_columnLabels = "http://www.simantics.org/Spreadsheet-1.2/Headers/columnLabels";\r
265         public static final String Headers_columnLabels_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Headers/columnLabels/Inverse";\r
266         public static final String Headers_columnWidths = "http://www.simantics.org/Spreadsheet-1.2/Headers/columnWidths";\r
267         public static final String Headers_columnWidths_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Headers/columnWidths/Inverse";\r
268         public static final String Headers_rowHeights = "http://www.simantics.org/Spreadsheet-1.2/Headers/rowHeights";\r
269         public static final String Headers_rowHeights_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Headers/rowHeights/Inverse";\r
270         public static final String Headers_rowLabels = "http://www.simantics.org/Spreadsheet-1.2/Headers/rowLabels";\r
271         public static final String Headers_rowLabels_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Headers/rowLabels/Inverse";\r
272         public static final String InitialCondition = "http://www.simantics.org/Spreadsheet-1.2/InitialCondition";\r
273         public static final String InitialCondition_ConditionOf = "http://www.simantics.org/Spreadsheet-1.2/InitialCondition/ConditionOf";\r
274         public static final String InitialCondition_ConditionOf_Inverse = "http://www.simantics.org/Spreadsheet-1.2/InitialCondition/ConditionOf/Inverse";\r
275         public static final String InitialCondition_DefaultConditionOf = "http://www.simantics.org/Spreadsheet-1.2/InitialCondition/DefaultConditionOf";\r
276         public static final String InitialCondition_bytes = "http://www.simantics.org/Spreadsheet-1.2/InitialCondition/bytes";\r
277         public static final String InitialCondition_bytes_Inverse = "http://www.simantics.org/Spreadsheet-1.2/InitialCondition/bytes/Inverse";\r
278         public static final String IsSheetOf = "http://www.simantics.org/Spreadsheet-1.2/IsSheetOf";\r
279         public static final String Line = "http://www.simantics.org/Spreadsheet-1.2/Line";\r
280         public static final String LineContent = "http://www.simantics.org/Spreadsheet-1.2/LineContent";\r
281         public static final String LineNode = "http://www.simantics.org/Spreadsheet-1.2/LineNode";\r
282         public static final String LineNode_keys = "http://www.simantics.org/Spreadsheet-1.2/LineNode/keys";\r
283         public static final String LineNode_keys_Inverse = "http://www.simantics.org/Spreadsheet-1.2/LineNode/keys/Inverse";\r
284         public static final String Line_content = "http://www.simantics.org/Spreadsheet-1.2/Line/content";\r
285         public static final String Line_content_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Line/content/Inverse";\r
286         public static final String Lines = "http://www.simantics.org/Spreadsheet-1.2/Lines";\r
287         public static final String MicrosoftExcelDocument = "http://www.simantics.org/Spreadsheet-1.2/MicrosoftExcelDocument";\r
288         public static final String MicrosoftExcelDocumentData = "http://www.simantics.org/Spreadsheet-1.2/MicrosoftExcelDocumentData";\r
289         public static final String ModelSourceContribution = "http://www.simantics.org/Spreadsheet-1.2/ModelSourceContribution";\r
290         public static final String Range = "http://www.simantics.org/Spreadsheet-1.2/Range";\r
291         public static final String Range_heightBound = "http://www.simantics.org/Spreadsheet-1.2/Range/heightBound";\r
292         public static final String Range_heightBound_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Range/heightBound/Inverse";\r
293         public static final String Range_location = "http://www.simantics.org/Spreadsheet-1.2/Range/location";\r
294         public static final String Range_location_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Range/location/Inverse";\r
295         public static final String Range_widthBound = "http://www.simantics.org/Spreadsheet-1.2/Range/widthBound";\r
296         public static final String Range_widthBound_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Range/widthBound/Inverse";\r
297         public static final String Run = "http://www.simantics.org/Spreadsheet-1.2/Run";\r
298         public static final String SCLCell = "http://www.simantics.org/Spreadsheet-1.2/SCLCell";\r
299         public static final String SCLCell_Expression = "http://www.simantics.org/Spreadsheet-1.2/SCLCell/Expression";\r
300         public static final String SCLCell_Expression_Inverse = "http://www.simantics.org/Spreadsheet-1.2/SCLCell/Expression/Inverse";\r
301         public static final String SCLMain = "http://www.simantics.org/Spreadsheet-1.2/SCLMain";\r
302         public static final String SCLValue = "http://www.simantics.org/Spreadsheet-1.2/SCLValue";\r
303         public static final String SheetSourceContribution = "http://www.simantics.org/Spreadsheet-1.2/SheetSourceContribution";\r
304         public static final String SourceContribution = "http://www.simantics.org/Spreadsheet-1.2/SourceContribution";\r
305         public static final String SourceContribution_function = "http://www.simantics.org/Spreadsheet-1.2/SourceContribution/function";\r
306         public static final String SourceContribution_function_Inverse = "http://www.simantics.org/Spreadsheet-1.2/SourceContribution/function/Inverse";\r
307         public static final String SourceContribution_labeler = "http://www.simantics.org/Spreadsheet-1.2/SourceContribution/labeler";\r
308         public static final String SourceContribution_labeler_Inverse = "http://www.simantics.org/Spreadsheet-1.2/SourceContribution/labeler/Inverse";\r
309         public static final String Spreadsheet = "http://www.simantics.org/Spreadsheet-1.2/Spreadsheet";\r
310         public static final String SpreadsheetElement = "http://www.simantics.org/Spreadsheet-1.2/SpreadsheetElement";\r
311         public static final String StringArrayCell = "http://www.simantics.org/Spreadsheet-1.2/StringArrayCell";\r
312         public static final String StringArrayCell_HasStringArray = "http://www.simantics.org/Spreadsheet-1.2/StringArrayCell/HasStringArray";\r
313         public static final String StringArrayCell_HasStringArray_Inverse = "http://www.simantics.org/Spreadsheet-1.2/StringArrayCell/HasStringArray/Inverse";\r
314         public static final String StringArrayCell_HasWidth = "http://www.simantics.org/Spreadsheet-1.2/StringArrayCell/HasWidth";\r
315         public static final String StringArrayCell_HasWidth_Inverse = "http://www.simantics.org/Spreadsheet-1.2/StringArrayCell/HasWidth/Inverse";\r
316         public static final String StringArrayRange = "http://www.simantics.org/Spreadsheet-1.2/StringArrayRange";\r
317         public static final String StringArrayRange_array = "http://www.simantics.org/Spreadsheet-1.2/StringArrayRange/array";\r
318         public static final String StringArrayRange_array_Inverse = "http://www.simantics.org/Spreadsheet-1.2/StringArrayRange/array/Inverse";\r
319         public static final String Style = "http://www.simantics.org/Spreadsheet-1.2/Style";\r
320         public static final String Style_id = "http://www.simantics.org/Spreadsheet-1.2/Style/id";\r
321         public static final String Style_id_Inverse = "http://www.simantics.org/Spreadsheet-1.2/Style/id/Inverse";\r
322         public static final String TextCell = "http://www.simantics.org/Spreadsheet-1.2/TextCell";\r
323         public static final String cellEditor = "http://www.simantics.org/Spreadsheet-1.2/cellEditor";\r
324         public static final String cellEditor_Inverse = "http://www.simantics.org/Spreadsheet-1.2/cellEditor/Inverse";\r
325         public static final String scl = "http://www.simantics.org/Spreadsheet-1.2/scl";\r
326         public static final String sclValue = "http://www.simantics.org/Spreadsheet-1.2/sclValue";\r
327         public static final String session = "http://www.simantics.org/Spreadsheet-1.2/session";\r
328         public static final String session_Inverse = "http://www.simantics.org/Spreadsheet-1.2/session/Inverse";\r
329     }\r
330     \r
331     public static Resource getResourceOrNull(ReadGraph graph, String uri) {\r
332         try {\r
333             return graph.getResource(uri);\r
334         } catch(DatabaseException e) {\r
335             System.err.println(e.getMessage());\r
336             return null;\r
337         }\r
338     }\r
339     \r
340     public SpreadsheetResource(ReadGraph graph) {\r
341         Attribute = getResourceOrNull(graph, URIs.Attribute);\r
342         Book = getResourceOrNull(graph, URIs.Book);\r
343         Book_HasDefaultInitialCondition = getResourceOrNull(graph, URIs.Book_HasDefaultInitialCondition);\r
344         BrowseContext = getResourceOrNull(graph, URIs.BrowseContext);\r
345         Cell = getResourceOrNull(graph, URIs.Cell);\r
346         Cell_HasStyle = getResourceOrNull(graph, URIs.Cell_HasStyle);\r
347         Cell_StyleOf = getResourceOrNull(graph, URIs.Cell_StyleOf);\r
348         Cell_align = getResourceOrNull(graph, URIs.Cell_align);\r
349         Cell_align_Inverse = getResourceOrNull(graph, URIs.Cell_align_Inverse);\r
350         Cell_background = getResourceOrNull(graph, URIs.Cell_background);\r
351         Cell_background_Inverse = getResourceOrNull(graph, URIs.Cell_background_Inverse);\r
352         Cell_border = getResourceOrNull(graph, URIs.Cell_border);\r
353         Cell_border_Inverse = getResourceOrNull(graph, URIs.Cell_border_Inverse);\r
354         Cell_columnSpan = getResourceOrNull(graph, URIs.Cell_columnSpan);\r
355         Cell_columnSpan_Inverse = getResourceOrNull(graph, URIs.Cell_columnSpan_Inverse);\r
356         Cell_content = getResourceOrNull(graph, URIs.Cell_content);\r
357         Cell_content_Inverse = getResourceOrNull(graph, URIs.Cell_content_Inverse);\r
358         Cell_editable = getResourceOrNull(graph, URIs.Cell_editable);\r
359         Cell_editable_Inverse = getResourceOrNull(graph, URIs.Cell_editable_Inverse);\r
360         Cell_font = getResourceOrNull(graph, URIs.Cell_font);\r
361         Cell_font_Inverse = getResourceOrNull(graph, URIs.Cell_font_Inverse);\r
362         Cell_foreground = getResourceOrNull(graph, URIs.Cell_foreground);\r
363         Cell_foreground_Inverse = getResourceOrNull(graph, URIs.Cell_foreground_Inverse);\r
364         Cell_formatIndex = getResourceOrNull(graph, URIs.Cell_formatIndex);\r
365         Cell_formatIndex_Inverse = getResourceOrNull(graph, URIs.Cell_formatIndex_Inverse);\r
366         Cell_formatString = getResourceOrNull(graph, URIs.Cell_formatString);\r
367         Cell_formatString_Inverse = getResourceOrNull(graph, URIs.Cell_formatString_Inverse);\r
368         Cell_label = getResourceOrNull(graph, URIs.Cell_label);\r
369         Cell_label_Inverse = getResourceOrNull(graph, URIs.Cell_label_Inverse);\r
370         Cell_locked = getResourceOrNull(graph, URIs.Cell_locked);\r
371         Cell_locked_Inverse = getResourceOrNull(graph, URIs.Cell_locked_Inverse);\r
372         Cell_rowSpan = getResourceOrNull(graph, URIs.Cell_rowSpan);\r
373         Cell_rowSpan_Inverse = getResourceOrNull(graph, URIs.Cell_rowSpan_Inverse);\r
374         Cell_style = getResourceOrNull(graph, URIs.Cell_style);\r
375         Cell_style_Inverse = getResourceOrNull(graph, URIs.Cell_style_Inverse);\r
376         CompositeTemplate = getResourceOrNull(graph, URIs.CompositeTemplate);\r
377         Dimensions = getResourceOrNull(graph, URIs.Dimensions);\r
378         Dimensions_columnCount = getResourceOrNull(graph, URIs.Dimensions_columnCount);\r
379         Dimensions_columnCount_Inverse = getResourceOrNull(graph, URIs.Dimensions_columnCount_Inverse);\r
380         Dimensions_fitColumns = getResourceOrNull(graph, URIs.Dimensions_fitColumns);\r
381         Dimensions_fitColumns_Inverse = getResourceOrNull(graph, URIs.Dimensions_fitColumns_Inverse);\r
382         Dimensions_fitRows = getResourceOrNull(graph, URIs.Dimensions_fitRows);\r
383         Dimensions_fitRows_Inverse = getResourceOrNull(graph, URIs.Dimensions_fitRows_Inverse);\r
384         Dimensions_rowCount = getResourceOrNull(graph, URIs.Dimensions_rowCount);\r
385         Dimensions_rowCount_Inverse = getResourceOrNull(graph, URIs.Dimensions_rowCount_Inverse);\r
386         DoubleArrayCell = getResourceOrNull(graph, URIs.DoubleArrayCell);\r
387         DoubleArrayCell_HasDoubleArray = getResourceOrNull(graph, URIs.DoubleArrayCell_HasDoubleArray);\r
388         DoubleArrayCell_HasDoubleArray_Inverse = getResourceOrNull(graph, URIs.DoubleArrayCell_HasDoubleArray_Inverse);\r
389         DoubleArrayCell_HasWidth = getResourceOrNull(graph, URIs.DoubleArrayCell_HasWidth);\r
390         DoubleArrayCell_HasWidth_Inverse = getResourceOrNull(graph, URIs.DoubleArrayCell_HasWidth_Inverse);\r
391         DoubleArrayRange = getResourceOrNull(graph, URIs.DoubleArrayRange);\r
392         DoubleArrayRange_array = getResourceOrNull(graph, URIs.DoubleArrayRange_array);\r
393         DoubleArrayRange_array_Inverse = getResourceOrNull(graph, URIs.DoubleArrayRange_array_Inverse);\r
394         Element = getResourceOrNull(graph, URIs.Element);\r
395         Element_immutable = getResourceOrNull(graph, URIs.Element_immutable);\r
396         Element_immutable_Inverse = getResourceOrNull(graph, URIs.Element_immutable_Inverse);\r
397         ExcelCell = getResourceOrNull(graph, URIs.ExcelCell);\r
398         Experiment = getResourceOrNull(graph, URIs.Experiment);\r
399         ExpressionRange = getResourceOrNull(graph, URIs.ExpressionRange);\r
400         ExpressionRange_cells = getResourceOrNull(graph, URIs.ExpressionRange_cells);\r
401         ExpressionRange_cells_Inverse = getResourceOrNull(graph, URIs.ExpressionRange_cells_Inverse);\r
402         ForCompositeTemplate = getResourceOrNull(graph, URIs.ForCompositeTemplate);\r
403         ForCompositeTemplate_Inverse = getResourceOrNull(graph, URIs.ForCompositeTemplate_Inverse);\r
404         Functions = getResourceOrNull(graph, URIs.Functions);\r
405         Functions_cellLabel = getResourceOrNull(graph, URIs.Functions_cellLabel);\r
406         Functions_contentDisplayValueAccessor = getResourceOrNull(graph, URIs.Functions_contentDisplayValueAccessor);\r
407         Functions_contentValueAccessor = getResourceOrNull(graph, URIs.Functions_contentValueAccessor);\r
408         Functions_defaultLineCells = getResourceOrNull(graph, URIs.Functions_defaultLineCells);\r
409         Functions_defaultSheetCellEditor = getResourceOrNull(graph, URIs.Functions_defaultSheetCellEditor);\r
410         Functions_doubleArrayChildren = getResourceOrNull(graph, URIs.Functions_doubleArrayChildren);\r
411         Functions_lineNodeKeys = getResourceOrNull(graph, URIs.Functions_lineNodeKeys);\r
412         Functions_queryRangeChildren = getResourceOrNull(graph, URIs.Functions_queryRangeChildren);\r
413         Functions_sclValue = getResourceOrNull(graph, URIs.Functions_sclValue);\r
414         Functions_sheetRunDomainChildren = getResourceOrNull(graph, URIs.Functions_sheetRunDomainChildren);\r
415         Functions_spreadsheetChildren = getResourceOrNull(graph, URIs.Functions_spreadsheetChildren);\r
416         Functions_spreadsheetInput = getResourceOrNull(graph, URIs.Functions_spreadsheetInput);\r
417         Functions_spreadsheetLinesChildren = getResourceOrNull(graph, URIs.Functions_spreadsheetLinesChildren);\r
418         Functions_spreadsheetRunInput = getResourceOrNull(graph, URIs.Functions_spreadsheetRunInput);\r
419         Functions_spreadsheetSession = getResourceOrNull(graph, URIs.Functions_spreadsheetSession);\r
420         Functions_stringArrayChildren = getResourceOrNull(graph, URIs.Functions_stringArrayChildren);\r
421         Functions_textCellEditor = getResourceOrNull(graph, URIs.Functions_textCellEditor);\r
422         Functions_variableCellEditor = getResourceOrNull(graph, URIs.Functions_variableCellEditor);\r
423         HasInitialCondition = getResourceOrNull(graph, URIs.HasInitialCondition);\r
424         HasInitialCondition_Inverse = getResourceOrNull(graph, URIs.HasInitialCondition_Inverse);\r
425         HasLocation = getResourceOrNull(graph, URIs.HasLocation);\r
426         HasLocation_Inverse = getResourceOrNull(graph, URIs.HasLocation_Inverse);\r
427         HasMicrosoftExcelDocumentData = getResourceOrNull(graph, URIs.HasMicrosoftExcelDocumentData);\r
428         HasMicrosoftExcelDocumentData_Inverse = getResourceOrNull(graph, URIs.HasMicrosoftExcelDocumentData_Inverse);\r
429         HasRVI = getResourceOrNull(graph, URIs.HasRVI);\r
430         HasRVI_Inverse = getResourceOrNull(graph, URIs.HasRVI_Inverse);\r
431         HasSheet = getResourceOrNull(graph, URIs.HasSheet);\r
432         Headers = getResourceOrNull(graph, URIs.Headers);\r
433         Headers_columnLabels = getResourceOrNull(graph, URIs.Headers_columnLabels);\r
434         Headers_columnLabels_Inverse = getResourceOrNull(graph, URIs.Headers_columnLabels_Inverse);\r
435         Headers_columnWidths = getResourceOrNull(graph, URIs.Headers_columnWidths);\r
436         Headers_columnWidths_Inverse = getResourceOrNull(graph, URIs.Headers_columnWidths_Inverse);\r
437         Headers_rowHeights = getResourceOrNull(graph, URIs.Headers_rowHeights);\r
438         Headers_rowHeights_Inverse = getResourceOrNull(graph, URIs.Headers_rowHeights_Inverse);\r
439         Headers_rowLabels = getResourceOrNull(graph, URIs.Headers_rowLabels);\r
440         Headers_rowLabels_Inverse = getResourceOrNull(graph, URIs.Headers_rowLabels_Inverse);\r
441         InitialCondition = getResourceOrNull(graph, URIs.InitialCondition);\r
442         InitialCondition_ConditionOf = getResourceOrNull(graph, URIs.InitialCondition_ConditionOf);\r
443         InitialCondition_ConditionOf_Inverse = getResourceOrNull(graph, URIs.InitialCondition_ConditionOf_Inverse);\r
444         InitialCondition_DefaultConditionOf = getResourceOrNull(graph, URIs.InitialCondition_DefaultConditionOf);\r
445         InitialCondition_bytes = getResourceOrNull(graph, URIs.InitialCondition_bytes);\r
446         InitialCondition_bytes_Inverse = getResourceOrNull(graph, URIs.InitialCondition_bytes_Inverse);\r
447         IsSheetOf = getResourceOrNull(graph, URIs.IsSheetOf);\r
448         Line = getResourceOrNull(graph, URIs.Line);\r
449         LineContent = getResourceOrNull(graph, URIs.LineContent);\r
450         LineNode = getResourceOrNull(graph, URIs.LineNode);\r
451         LineNode_keys = getResourceOrNull(graph, URIs.LineNode_keys);\r
452         LineNode_keys_Inverse = getResourceOrNull(graph, URIs.LineNode_keys_Inverse);\r
453         Line_content = getResourceOrNull(graph, URIs.Line_content);\r
454         Line_content_Inverse = getResourceOrNull(graph, URIs.Line_content_Inverse);\r
455         Lines = getResourceOrNull(graph, URIs.Lines);\r
456         MicrosoftExcelDocument = getResourceOrNull(graph, URIs.MicrosoftExcelDocument);\r
457         MicrosoftExcelDocumentData = getResourceOrNull(graph, URIs.MicrosoftExcelDocumentData);\r
458         ModelSourceContribution = getResourceOrNull(graph, URIs.ModelSourceContribution);\r
459         Range = getResourceOrNull(graph, URIs.Range);\r
460         Range_heightBound = getResourceOrNull(graph, URIs.Range_heightBound);\r
461         Range_heightBound_Inverse = getResourceOrNull(graph, URIs.Range_heightBound_Inverse);\r
462         Range_location = getResourceOrNull(graph, URIs.Range_location);\r
463         Range_location_Inverse = getResourceOrNull(graph, URIs.Range_location_Inverse);\r
464         Range_widthBound = getResourceOrNull(graph, URIs.Range_widthBound);\r
465         Range_widthBound_Inverse = getResourceOrNull(graph, URIs.Range_widthBound_Inverse);\r
466         Run = getResourceOrNull(graph, URIs.Run);\r
467         SCLCell = getResourceOrNull(graph, URIs.SCLCell);\r
468         SCLCell_Expression = getResourceOrNull(graph, URIs.SCLCell_Expression);\r
469         SCLCell_Expression_Inverse = getResourceOrNull(graph, URIs.SCLCell_Expression_Inverse);\r
470         SCLMain = getResourceOrNull(graph, URIs.SCLMain);\r
471         SCLValue = getResourceOrNull(graph, URIs.SCLValue);\r
472         SheetSourceContribution = getResourceOrNull(graph, URIs.SheetSourceContribution);\r
473         SourceContribution = getResourceOrNull(graph, URIs.SourceContribution);\r
474         SourceContribution_function = getResourceOrNull(graph, URIs.SourceContribution_function);\r
475         SourceContribution_function_Inverse = getResourceOrNull(graph, URIs.SourceContribution_function_Inverse);\r
476         SourceContribution_labeler = getResourceOrNull(graph, URIs.SourceContribution_labeler);\r
477         SourceContribution_labeler_Inverse = getResourceOrNull(graph, URIs.SourceContribution_labeler_Inverse);\r
478         Spreadsheet = getResourceOrNull(graph, URIs.Spreadsheet);\r
479         SpreadsheetElement = getResourceOrNull(graph, URIs.SpreadsheetElement);\r
480         StringArrayCell = getResourceOrNull(graph, URIs.StringArrayCell);\r
481         StringArrayCell_HasStringArray = getResourceOrNull(graph, URIs.StringArrayCell_HasStringArray);\r
482         StringArrayCell_HasStringArray_Inverse = getResourceOrNull(graph, URIs.StringArrayCell_HasStringArray_Inverse);\r
483         StringArrayCell_HasWidth = getResourceOrNull(graph, URIs.StringArrayCell_HasWidth);\r
484         StringArrayCell_HasWidth_Inverse = getResourceOrNull(graph, URIs.StringArrayCell_HasWidth_Inverse);\r
485         StringArrayRange = getResourceOrNull(graph, URIs.StringArrayRange);\r
486         StringArrayRange_array = getResourceOrNull(graph, URIs.StringArrayRange_array);\r
487         StringArrayRange_array_Inverse = getResourceOrNull(graph, URIs.StringArrayRange_array_Inverse);\r
488         Style = getResourceOrNull(graph, URIs.Style);\r
489         Style_id = getResourceOrNull(graph, URIs.Style_id);\r
490         Style_id_Inverse = getResourceOrNull(graph, URIs.Style_id_Inverse);\r
491         TextCell = getResourceOrNull(graph, URIs.TextCell);\r
492         cellEditor = getResourceOrNull(graph, URIs.cellEditor);\r
493         cellEditor_Inverse = getResourceOrNull(graph, URIs.cellEditor_Inverse);\r
494         scl = getResourceOrNull(graph, URIs.scl);\r
495         sclValue = getResourceOrNull(graph, URIs.sclValue);\r
496         session = getResourceOrNull(graph, URIs.session);\r
497         session_Inverse = getResourceOrNull(graph, URIs.session_Inverse);\r
498     }\r
499     \r
500     public static SpreadsheetResource getInstance(ReadGraph graph) {\r
501         Session session = graph.getSession();\r
502         SpreadsheetResource ret = session.peekService(SpreadsheetResource.class);\r
503         if(ret == null) {\r
504             QueryControl qc = graph.getService(QueryControl.class);\r
505             ret = new SpreadsheetResource(qc.getIndependentGraph(graph));\r
506             session.registerService(SpreadsheetResource.class, ret);\r
507         }\r
508         return ret;\r
509     }\r
510     \r
511     public static SpreadsheetResource getInstance(RequestProcessor session) throws DatabaseException {\r
512         SpreadsheetResource ret = session.peekService(SpreadsheetResource.class);\r
513         if(ret == null) {\r
514             ret = session.syncRequest(new Read<SpreadsheetResource>() {\r
515                 public SpreadsheetResource perform(ReadGraph graph) throws DatabaseException {\r
516                     QueryControl qc = graph.getService(QueryControl.class);\r
517                     return new SpreadsheetResource(qc.getIndependentGraph(graph));\r
518                 }\r
519             });\r
520             session.registerService(SpreadsheetResource.class, ret);\r
521         }\r
522         return ret;\r
523     }\r
524     \r
525 }\r
526 \r