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