]> gerrit.simantics Code Review - simantics/3d.git/blob - org.simantics.plant3d.ontology/src/org/simantics/plant3d/ontology/Plant3D.java
1ab46e342e9f9391fa77fda930e497e13530fd35
[simantics/3d.git] / org.simantics.plant3d.ontology / src / org / simantics / plant3d / ontology / Plant3D.java
1 package org.simantics.plant3d.ontology;
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 Plant3D {
12     
13     public final Resource Actions;
14     public final Resource Actions_NewPlant;
15     public final Resource Builtin;
16     public final Resource Builtin_BallValve;
17     public final Resource Builtin_BallValveGeometryProvider;
18     public final Resource Builtin_BranchSplitComponent;
19     public final Resource Builtin_Cap;
20     public final Resource Builtin_CapGeometryProvider;
21     public final Resource Builtin_CheckValve;
22     public final Resource Builtin_CheckValveGeometryProvider;
23     public final Resource Builtin_ConcentricReducer;
24     public final Resource Builtin_EccentricReducer;
25     public final Resource Builtin_Elbow;
26     public final Resource Builtin_Elbow45;
27     public final Resource Builtin_Elbow90;
28     public final Resource Builtin_ElbowGeometryProvider;
29     public final Resource Builtin_FlatNozzle;
30     public final Resource Builtin_FlatNozzleGeometryProvider;
31     public final Resource Builtin_GateValve;
32     public final Resource Builtin_GateValveGeometryProvider;
33     public final Resource Builtin_HorizontalTank;
34     public final Resource Builtin_HorizontalTankGeometryProvider;
35     public final Resource Builtin_Nozzle;
36     public final Resource Builtin_NozzleGeometryProvider;
37     public final Resource Builtin_Pump;
38     public final Resource Builtin_PumpGeometryProvider;
39     public final Resource Builtin_ReducerGeometryProvider;
40     public final Resource Builtin_Straight;
41     public final Resource Builtin_StraightGeometryProvider;
42     public final Resource Builtin_VerticalTank;
43     public final Resource Builtin_VerticalTankGeometryProvider;
44     public final Resource CodeComponent;
45     public final Resource ComponentLibrary;
46     public final Resource ComponentLibrary_contains;
47     public final Resource Connects;
48     public final Resource DualConnectedComponent;
49     public final Resource EndComponent;
50     public final Resource Equipment;
51     public final Resource FixedAngleTurnComponent;
52     public final Resource FixedLengthInlineComponent;
53     public final Resource GeometryProvider;
54     public final Resource HasAlternativePipeRun;
55     public final Resource HasBranch0;
56     public final Resource HasBranch1;
57     public final Resource HasBranch2;
58     public final Resource HasBranch3;
59     public final Resource HasBranch4;
60     public final Resource HasBranch5;
61     public final Resource HasBranch6;
62     public final Resource HasBranch7;
63     public final Resource HasBranch8;
64     public final Resource HasBranch9;
65     public final Resource HasFixedNozzles;
66     public final Resource HasFixedNozzles_Inverse;
67     public final Resource HasLength;
68     public final Resource HasLength_Inverse;
69     public final Resource HasNext;
70     public final Resource HasNozzle;
71     public final Resource HasNozzleId;
72     public final Resource HasNozzleId_Inverse;
73     public final Resource HasPipeDiameter;
74     public final Resource HasPipeDiameter_Inverse;
75     public final Resource HasPipeRun;
76     public final Resource HasPrevious;
77     public final Resource HasRotationAngle;
78     public final Resource HasRotationAngle_Inverse;
79     public final Resource HasTurnAngle;
80     public final Resource HasTurnAngle_Inverse;
81     public final Resource HasTurnAxis;
82     public final Resource HasTurnAxis_Inverse;
83     @Deprecated public final Resource HasTurnRadius;
84     public final Resource HasTurnRadiusArray;
85     public final Resource HasTurnRadiusArray_Inverse;
86     public final Resource HasTurnRadiusIndex;
87     public final Resource HasTurnRadiusIndex_Inverse;
88     public final Resource HasTurnRadius_Inverse;
89     public final Resource Images;
90     public final Resource Images_Component;
91     public final Resource Images_Elbow;
92     public final Resource Images_Factory;
93     public final Resource Images_Nozzle;
94     public final Resource Images_Straight;
95     public final Resource Images_Tank;
96     public final Resource ImportedOntologies;
97     public final Resource InlineComponent;
98     public final Resource IsFixedNozzle;
99     public final Resource IsFixedNozzle_Inverse;
100     public final Resource IsReversed;
101     public final Resource IsReversed_Inverse;
102     public final Resource LibraryComponent;
103     public final Resource MultiConnectedComponent;
104     public final Resource NextInverse;
105     public final Resource Node;
106     public final Resource NonVisibleComponent;
107     public final Resource Nozzle;
108     public final Resource NozzleOf;
109     public final Resource OffsetComponent;
110     public final Resource P3DActionContext;
111     public final Resource P3DBrowseContext;
112     public final Resource Parameter;
113     public final Resource PipeRun;
114     public final Resource PipelineComponent;
115     public final Resource PipelineComponentTag;
116     public final Resource Plant;
117     public final Resource PreviousInverse;
118     public final Resource ReverseComponent;
119     public final Resource RotateComponent;
120     public final Resource SingleConnectedComponent;
121     public final Resource SizeChangeComponent;
122     public final Resource TurnComponent;
123     public final Resource VariableAngleTurnComponent;
124     public final Resource VariableLengthInlineComponent;
125     public final Resource children;
126     public final Resource children_Inverse;
127     public final Resource hasGeometry;
128     public final Resource hasParameter;
129     public final Resource hasParameterValue;
130         
131     public static class URIs {
132         public static final String Actions = "http://www.simantics.org/Plant3D-0.1/Actions";
133         public static final String Actions_NewPlant = "http://www.simantics.org/Plant3D-0.1/Actions/NewPlant";
134         public static final String Builtin = "http://www.simantics.org/Plant3D-0.1/Builtin";
135         public static final String Builtin_BallValve = "http://www.simantics.org/Plant3D-0.1/Builtin/BallValve";
136         public static final String Builtin_BallValveGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/BallValveGeometryProvider";
137         public static final String Builtin_BranchSplitComponent = "http://www.simantics.org/Plant3D-0.1/Builtin/BranchSplitComponent";
138         public static final String Builtin_Cap = "http://www.simantics.org/Plant3D-0.1/Builtin/Cap";
139         public static final String Builtin_CapGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/CapGeometryProvider";
140         public static final String Builtin_CheckValve = "http://www.simantics.org/Plant3D-0.1/Builtin/CheckValve";
141         public static final String Builtin_CheckValveGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/CheckValveGeometryProvider";
142         public static final String Builtin_ConcentricReducer = "http://www.simantics.org/Plant3D-0.1/Builtin/ConcentricReducer";
143         public static final String Builtin_EccentricReducer = "http://www.simantics.org/Plant3D-0.1/Builtin/EccentricReducer";
144         public static final String Builtin_Elbow = "http://www.simantics.org/Plant3D-0.1/Builtin/Elbow";
145         public static final String Builtin_Elbow45 = "http://www.simantics.org/Plant3D-0.1/Builtin/Elbow45";
146         public static final String Builtin_Elbow90 = "http://www.simantics.org/Plant3D-0.1/Builtin/Elbow90";
147         public static final String Builtin_ElbowGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/ElbowGeometryProvider";
148         public static final String Builtin_FlatNozzle = "http://www.simantics.org/Plant3D-0.1/Builtin/FlatNozzle";
149         public static final String Builtin_FlatNozzleGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/FlatNozzleGeometryProvider";
150         public static final String Builtin_GateValve = "http://www.simantics.org/Plant3D-0.1/Builtin/GateValve";
151         public static final String Builtin_GateValveGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/GateValveGeometryProvider";
152         public static final String Builtin_HorizontalTank = "http://www.simantics.org/Plant3D-0.1/Builtin/HorizontalTank";
153         public static final String Builtin_HorizontalTankGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/HorizontalTankGeometryProvider";
154         public static final String Builtin_Nozzle = "http://www.simantics.org/Plant3D-0.1/Builtin/Nozzle";
155         public static final String Builtin_NozzleGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/NozzleGeometryProvider";
156         public static final String Builtin_Pump = "http://www.simantics.org/Plant3D-0.1/Builtin/Pump";
157         public static final String Builtin_PumpGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/PumpGeometryProvider";
158         public static final String Builtin_ReducerGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/ReducerGeometryProvider";
159         public static final String Builtin_Straight = "http://www.simantics.org/Plant3D-0.1/Builtin/Straight";
160         public static final String Builtin_StraightGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/StraightGeometryProvider";
161         public static final String Builtin_VerticalTank = "http://www.simantics.org/Plant3D-0.1/Builtin/VerticalTank";
162         public static final String Builtin_VerticalTankGeometryProvider = "http://www.simantics.org/Plant3D-0.1/Builtin/VerticalTankGeometryProvider";
163         public static final String CodeComponent = "http://www.simantics.org/Plant3D-0.1/CodeComponent";
164         public static final String ComponentLibrary = "http://www.simantics.org/Plant3D-0.1/ComponentLibrary";
165         public static final String ComponentLibrary_contains = "http://www.simantics.org/Plant3D-0.1/ComponentLibrary/contains";
166         public static final String Connects = "http://www.simantics.org/Plant3D-0.1/Connects";
167         public static final String DualConnectedComponent = "http://www.simantics.org/Plant3D-0.1/DualConnectedComponent";
168         public static final String EndComponent = "http://www.simantics.org/Plant3D-0.1/EndComponent";
169         public static final String Equipment = "http://www.simantics.org/Plant3D-0.1/Equipment";
170         public static final String FixedAngleTurnComponent = "http://www.simantics.org/Plant3D-0.1/FixedAngleTurnComponent";
171         public static final String FixedLengthInlineComponent = "http://www.simantics.org/Plant3D-0.1/FixedLengthInlineComponent";
172         public static final String GeometryProvider = "http://www.simantics.org/Plant3D-0.1/GeometryProvider";
173         public static final String HasAlternativePipeRun = "http://www.simantics.org/Plant3D-0.1/HasAlternativePipeRun";
174         public static final String HasBranch0 = "http://www.simantics.org/Plant3D-0.1/HasBranch0";
175         public static final String HasBranch1 = "http://www.simantics.org/Plant3D-0.1/HasBranch1";
176         public static final String HasBranch2 = "http://www.simantics.org/Plant3D-0.1/HasBranch2";
177         public static final String HasBranch3 = "http://www.simantics.org/Plant3D-0.1/HasBranch3";
178         public static final String HasBranch4 = "http://www.simantics.org/Plant3D-0.1/HasBranch4";
179         public static final String HasBranch5 = "http://www.simantics.org/Plant3D-0.1/HasBranch5";
180         public static final String HasBranch6 = "http://www.simantics.org/Plant3D-0.1/HasBranch6";
181         public static final String HasBranch7 = "http://www.simantics.org/Plant3D-0.1/HasBranch7";
182         public static final String HasBranch8 = "http://www.simantics.org/Plant3D-0.1/HasBranch8";
183         public static final String HasBranch9 = "http://www.simantics.org/Plant3D-0.1/HasBranch9";
184         public static final String HasFixedNozzles = "http://www.simantics.org/Plant3D-0.1/HasFixedNozzles";
185         public static final String HasFixedNozzles_Inverse = "http://www.simantics.org/Plant3D-0.1/HasFixedNozzles/Inverse";
186         public static final String HasLength = "http://www.simantics.org/Plant3D-0.1/HasLength";
187         public static final String HasLength_Inverse = "http://www.simantics.org/Plant3D-0.1/HasLength/Inverse";
188         public static final String HasNext = "http://www.simantics.org/Plant3D-0.1/HasNext";
189         public static final String HasNozzle = "http://www.simantics.org/Plant3D-0.1/HasNozzle";
190         public static final String HasNozzleId = "http://www.simantics.org/Plant3D-0.1/HasNozzleId";
191         public static final String HasNozzleId_Inverse = "http://www.simantics.org/Plant3D-0.1/HasNozzleId/Inverse";
192         public static final String HasPipeDiameter = "http://www.simantics.org/Plant3D-0.1/HasPipeDiameter";
193         public static final String HasPipeDiameter_Inverse = "http://www.simantics.org/Plant3D-0.1/HasPipeDiameter/Inverse";
194         public static final String HasPipeRun = "http://www.simantics.org/Plant3D-0.1/HasPipeRun";
195         public static final String HasPrevious = "http://www.simantics.org/Plant3D-0.1/HasPrevious";
196         public static final String HasRotationAngle = "http://www.simantics.org/Plant3D-0.1/HasRotationAngle";
197         public static final String HasRotationAngle_Inverse = "http://www.simantics.org/Plant3D-0.1/HasRotationAngle/Inverse";
198         public static final String HasTurnAngle = "http://www.simantics.org/Plant3D-0.1/HasTurnAngle";
199         public static final String HasTurnAngle_Inverse = "http://www.simantics.org/Plant3D-0.1/HasTurnAngle/Inverse";
200         public static final String HasTurnAxis = "http://www.simantics.org/Plant3D-0.1/HasTurnAxis";
201         public static final String HasTurnAxis_Inverse = "http://www.simantics.org/Plant3D-0.1/HasTurnAxis/Inverse";
202         @Deprecated public static final String HasTurnRadius = "http://www.simantics.org/Plant3D-0.1/HasTurnRadius";
203         public static final String HasTurnRadiusArray = "http://www.simantics.org/Plant3D-0.1/HasTurnRadiusArray";
204         public static final String HasTurnRadiusArray_Inverse = "http://www.simantics.org/Plant3D-0.1/HasTurnRadiusArray/Inverse";
205         public static final String HasTurnRadiusIndex = "http://www.simantics.org/Plant3D-0.1/HasTurnRadiusIndex";
206         public static final String HasTurnRadiusIndex_Inverse = "http://www.simantics.org/Plant3D-0.1/HasTurnRadiusIndex/Inverse";
207         public static final String HasTurnRadius_Inverse = "http://www.simantics.org/Plant3D-0.1/HasTurnRadius/Inverse";
208         public static final String Images = "http://www.simantics.org/Plant3D-0.1/Images";
209         public static final String Images_Component = "http://www.simantics.org/Plant3D-0.1/Images/Component";
210         public static final String Images_Elbow = "http://www.simantics.org/Plant3D-0.1/Images/Elbow";
211         public static final String Images_Factory = "http://www.simantics.org/Plant3D-0.1/Images/Factory";
212         public static final String Images_Nozzle = "http://www.simantics.org/Plant3D-0.1/Images/Nozzle";
213         public static final String Images_Straight = "http://www.simantics.org/Plant3D-0.1/Images/Straight";
214         public static final String Images_Tank = "http://www.simantics.org/Plant3D-0.1/Images/Tank";
215         public static final String ImportedOntologies = "http://www.simantics.org/Plant3D-0.1/ImportedOntologies";
216         public static final String InlineComponent = "http://www.simantics.org/Plant3D-0.1/InlineComponent";
217         public static final String IsFixedNozzle = "http://www.simantics.org/Plant3D-0.1/IsFixedNozzle";
218         public static final String IsFixedNozzle_Inverse = "http://www.simantics.org/Plant3D-0.1/IsFixedNozzle/Inverse";
219         public static final String IsReversed = "http://www.simantics.org/Plant3D-0.1/IsReversed";
220         public static final String IsReversed_Inverse = "http://www.simantics.org/Plant3D-0.1/IsReversed/Inverse";
221         public static final String LibraryComponent = "http://www.simantics.org/Plant3D-0.1/LibraryComponent";
222         public static final String MultiConnectedComponent = "http://www.simantics.org/Plant3D-0.1/MultiConnectedComponent";
223         public static final String NextInverse = "http://www.simantics.org/Plant3D-0.1/NextInverse";
224         public static final String Node = "http://www.simantics.org/Plant3D-0.1/Node";
225         public static final String NonVisibleComponent = "http://www.simantics.org/Plant3D-0.1/NonVisibleComponent";
226         public static final String Nozzle = "http://www.simantics.org/Plant3D-0.1/Nozzle";
227         public static final String NozzleOf = "http://www.simantics.org/Plant3D-0.1/NozzleOf";
228         public static final String OffsetComponent = "http://www.simantics.org/Plant3D-0.1/OffsetComponent";
229         public static final String P3DActionContext = "http://www.simantics.org/Plant3D-0.1/P3DActionContext";
230         public static final String P3DBrowseContext = "http://www.simantics.org/Plant3D-0.1/P3DBrowseContext";
231         public static final String Parameter = "http://www.simantics.org/Plant3D-0.1/Parameter";
232         public static final String PipeRun = "http://www.simantics.org/Plant3D-0.1/PipeRun";
233         public static final String PipelineComponent = "http://www.simantics.org/Plant3D-0.1/PipelineComponent";
234         public static final String PipelineComponentTag = "http://www.simantics.org/Plant3D-0.1/PipelineComponentTag";
235         public static final String Plant = "http://www.simantics.org/Plant3D-0.1/Plant";
236         public static final String PreviousInverse = "http://www.simantics.org/Plant3D-0.1/PreviousInverse";
237         public static final String ReverseComponent = "http://www.simantics.org/Plant3D-0.1/ReverseComponent";
238         public static final String RotateComponent = "http://www.simantics.org/Plant3D-0.1/RotateComponent";
239         public static final String SingleConnectedComponent = "http://www.simantics.org/Plant3D-0.1/SingleConnectedComponent";
240         public static final String SizeChangeComponent = "http://www.simantics.org/Plant3D-0.1/SizeChangeComponent";
241         public static final String TurnComponent = "http://www.simantics.org/Plant3D-0.1/TurnComponent";
242         public static final String VariableAngleTurnComponent = "http://www.simantics.org/Plant3D-0.1/VariableAngleTurnComponent";
243         public static final String VariableLengthInlineComponent = "http://www.simantics.org/Plant3D-0.1/VariableLengthInlineComponent";
244         public static final String children = "http://www.simantics.org/Plant3D-0.1/children";
245         public static final String children_Inverse = "http://www.simantics.org/Plant3D-0.1/children/Inverse";
246         public static final String hasGeometry = "http://www.simantics.org/Plant3D-0.1/hasGeometry";
247         public static final String hasParameter = "http://www.simantics.org/Plant3D-0.1/hasParameter";
248         public static final String hasParameterValue = "http://www.simantics.org/Plant3D-0.1/hasParameterValue";
249     }
250     
251     public static Resource getResourceOrNull(ReadGraph graph, String uri) {
252         try {
253             return graph.getResource(uri);
254         } catch(DatabaseException e) {
255             System.err.println(e.getMessage());
256             return null;
257         }
258     }
259     
260     public Plant3D(ReadGraph graph) {
261         Actions = getResourceOrNull(graph, URIs.Actions);
262         Actions_NewPlant = getResourceOrNull(graph, URIs.Actions_NewPlant);
263         Builtin = getResourceOrNull(graph, URIs.Builtin);
264         Builtin_BallValve = getResourceOrNull(graph, URIs.Builtin_BallValve);
265         Builtin_BallValveGeometryProvider = getResourceOrNull(graph, URIs.Builtin_BallValveGeometryProvider);
266         Builtin_BranchSplitComponent = getResourceOrNull(graph, URIs.Builtin_BranchSplitComponent);
267         Builtin_Cap = getResourceOrNull(graph, URIs.Builtin_Cap);
268         Builtin_CapGeometryProvider = getResourceOrNull(graph, URIs.Builtin_CapGeometryProvider);
269         Builtin_CheckValve = getResourceOrNull(graph, URIs.Builtin_CheckValve);
270         Builtin_CheckValveGeometryProvider = getResourceOrNull(graph, URIs.Builtin_CheckValveGeometryProvider);
271         Builtin_ConcentricReducer = getResourceOrNull(graph, URIs.Builtin_ConcentricReducer);
272         Builtin_EccentricReducer = getResourceOrNull(graph, URIs.Builtin_EccentricReducer);
273         Builtin_Elbow = getResourceOrNull(graph, URIs.Builtin_Elbow);
274         Builtin_Elbow45 = getResourceOrNull(graph, URIs.Builtin_Elbow45);
275         Builtin_Elbow90 = getResourceOrNull(graph, URIs.Builtin_Elbow90);
276         Builtin_ElbowGeometryProvider = getResourceOrNull(graph, URIs.Builtin_ElbowGeometryProvider);
277         Builtin_FlatNozzle = getResourceOrNull(graph, URIs.Builtin_FlatNozzle);
278         Builtin_FlatNozzleGeometryProvider = getResourceOrNull(graph, URIs.Builtin_FlatNozzleGeometryProvider);
279         Builtin_GateValve = getResourceOrNull(graph, URIs.Builtin_GateValve);
280         Builtin_GateValveGeometryProvider = getResourceOrNull(graph, URIs.Builtin_GateValveGeometryProvider);
281         Builtin_HorizontalTank = getResourceOrNull(graph, URIs.Builtin_HorizontalTank);
282         Builtin_HorizontalTankGeometryProvider = getResourceOrNull(graph, URIs.Builtin_HorizontalTankGeometryProvider);
283         Builtin_Nozzle = getResourceOrNull(graph, URIs.Builtin_Nozzle);
284         Builtin_NozzleGeometryProvider = getResourceOrNull(graph, URIs.Builtin_NozzleGeometryProvider);
285         Builtin_Pump = getResourceOrNull(graph, URIs.Builtin_Pump);
286         Builtin_PumpGeometryProvider = getResourceOrNull(graph, URIs.Builtin_PumpGeometryProvider);
287         Builtin_ReducerGeometryProvider = getResourceOrNull(graph, URIs.Builtin_ReducerGeometryProvider);
288         Builtin_Straight = getResourceOrNull(graph, URIs.Builtin_Straight);
289         Builtin_StraightGeometryProvider = getResourceOrNull(graph, URIs.Builtin_StraightGeometryProvider);
290         Builtin_VerticalTank = getResourceOrNull(graph, URIs.Builtin_VerticalTank);
291         Builtin_VerticalTankGeometryProvider = getResourceOrNull(graph, URIs.Builtin_VerticalTankGeometryProvider);
292         CodeComponent = getResourceOrNull(graph, URIs.CodeComponent);
293         ComponentLibrary = getResourceOrNull(graph, URIs.ComponentLibrary);
294         ComponentLibrary_contains = getResourceOrNull(graph, URIs.ComponentLibrary_contains);
295         Connects = getResourceOrNull(graph, URIs.Connects);
296         DualConnectedComponent = getResourceOrNull(graph, URIs.DualConnectedComponent);
297         EndComponent = getResourceOrNull(graph, URIs.EndComponent);
298         Equipment = getResourceOrNull(graph, URIs.Equipment);
299         FixedAngleTurnComponent = getResourceOrNull(graph, URIs.FixedAngleTurnComponent);
300         FixedLengthInlineComponent = getResourceOrNull(graph, URIs.FixedLengthInlineComponent);
301         GeometryProvider = getResourceOrNull(graph, URIs.GeometryProvider);
302         HasAlternativePipeRun = getResourceOrNull(graph, URIs.HasAlternativePipeRun);
303         HasBranch0 = getResourceOrNull(graph, URIs.HasBranch0);
304         HasBranch1 = getResourceOrNull(graph, URIs.HasBranch1);
305         HasBranch2 = getResourceOrNull(graph, URIs.HasBranch2);
306         HasBranch3 = getResourceOrNull(graph, URIs.HasBranch3);
307         HasBranch4 = getResourceOrNull(graph, URIs.HasBranch4);
308         HasBranch5 = getResourceOrNull(graph, URIs.HasBranch5);
309         HasBranch6 = getResourceOrNull(graph, URIs.HasBranch6);
310         HasBranch7 = getResourceOrNull(graph, URIs.HasBranch7);
311         HasBranch8 = getResourceOrNull(graph, URIs.HasBranch8);
312         HasBranch9 = getResourceOrNull(graph, URIs.HasBranch9);
313         HasFixedNozzles = getResourceOrNull(graph, URIs.HasFixedNozzles);
314         HasFixedNozzles_Inverse = getResourceOrNull(graph, URIs.HasFixedNozzles_Inverse);
315         HasLength = getResourceOrNull(graph, URIs.HasLength);
316         HasLength_Inverse = getResourceOrNull(graph, URIs.HasLength_Inverse);
317         HasNext = getResourceOrNull(graph, URIs.HasNext);
318         HasNozzle = getResourceOrNull(graph, URIs.HasNozzle);
319         HasNozzleId = getResourceOrNull(graph, URIs.HasNozzleId);
320         HasNozzleId_Inverse = getResourceOrNull(graph, URIs.HasNozzleId_Inverse);
321         HasPipeDiameter = getResourceOrNull(graph, URIs.HasPipeDiameter);
322         HasPipeDiameter_Inverse = getResourceOrNull(graph, URIs.HasPipeDiameter_Inverse);
323         HasPipeRun = getResourceOrNull(graph, URIs.HasPipeRun);
324         HasPrevious = getResourceOrNull(graph, URIs.HasPrevious);
325         HasRotationAngle = getResourceOrNull(graph, URIs.HasRotationAngle);
326         HasRotationAngle_Inverse = getResourceOrNull(graph, URIs.HasRotationAngle_Inverse);
327         HasTurnAngle = getResourceOrNull(graph, URIs.HasTurnAngle);
328         HasTurnAngle_Inverse = getResourceOrNull(graph, URIs.HasTurnAngle_Inverse);
329         HasTurnAxis = getResourceOrNull(graph, URIs.HasTurnAxis);
330         HasTurnAxis_Inverse = getResourceOrNull(graph, URIs.HasTurnAxis_Inverse);
331         HasTurnRadius = getResourceOrNull(graph, URIs.HasTurnRadius);
332         HasTurnRadiusArray = getResourceOrNull(graph, URIs.HasTurnRadiusArray);
333         HasTurnRadiusArray_Inverse = getResourceOrNull(graph, URIs.HasTurnRadiusArray_Inverse);
334         HasTurnRadiusIndex = getResourceOrNull(graph, URIs.HasTurnRadiusIndex);
335         HasTurnRadiusIndex_Inverse = getResourceOrNull(graph, URIs.HasTurnRadiusIndex_Inverse);
336         HasTurnRadius_Inverse = getResourceOrNull(graph, URIs.HasTurnRadius_Inverse);
337         Images = getResourceOrNull(graph, URIs.Images);
338         Images_Component = getResourceOrNull(graph, URIs.Images_Component);
339         Images_Elbow = getResourceOrNull(graph, URIs.Images_Elbow);
340         Images_Factory = getResourceOrNull(graph, URIs.Images_Factory);
341         Images_Nozzle = getResourceOrNull(graph, URIs.Images_Nozzle);
342         Images_Straight = getResourceOrNull(graph, URIs.Images_Straight);
343         Images_Tank = getResourceOrNull(graph, URIs.Images_Tank);
344         ImportedOntologies = getResourceOrNull(graph, URIs.ImportedOntologies);
345         InlineComponent = getResourceOrNull(graph, URIs.InlineComponent);
346         IsFixedNozzle = getResourceOrNull(graph, URIs.IsFixedNozzle);
347         IsFixedNozzle_Inverse = getResourceOrNull(graph, URIs.IsFixedNozzle_Inverse);
348         IsReversed = getResourceOrNull(graph, URIs.IsReversed);
349         IsReversed_Inverse = getResourceOrNull(graph, URIs.IsReversed_Inverse);
350         LibraryComponent = getResourceOrNull(graph, URIs.LibraryComponent);
351         MultiConnectedComponent = getResourceOrNull(graph, URIs.MultiConnectedComponent);
352         NextInverse = getResourceOrNull(graph, URIs.NextInverse);
353         Node = getResourceOrNull(graph, URIs.Node);
354         NonVisibleComponent = getResourceOrNull(graph, URIs.NonVisibleComponent);
355         Nozzle = getResourceOrNull(graph, URIs.Nozzle);
356         NozzleOf = getResourceOrNull(graph, URIs.NozzleOf);
357         OffsetComponent = getResourceOrNull(graph, URIs.OffsetComponent);
358         P3DActionContext = getResourceOrNull(graph, URIs.P3DActionContext);
359         P3DBrowseContext = getResourceOrNull(graph, URIs.P3DBrowseContext);
360         Parameter = getResourceOrNull(graph, URIs.Parameter);
361         PipeRun = getResourceOrNull(graph, URIs.PipeRun);
362         PipelineComponent = getResourceOrNull(graph, URIs.PipelineComponent);
363         PipelineComponentTag = getResourceOrNull(graph, URIs.PipelineComponentTag);
364         Plant = getResourceOrNull(graph, URIs.Plant);
365         PreviousInverse = getResourceOrNull(graph, URIs.PreviousInverse);
366         ReverseComponent = getResourceOrNull(graph, URIs.ReverseComponent);
367         RotateComponent = getResourceOrNull(graph, URIs.RotateComponent);
368         SingleConnectedComponent = getResourceOrNull(graph, URIs.SingleConnectedComponent);
369         SizeChangeComponent = getResourceOrNull(graph, URIs.SizeChangeComponent);
370         TurnComponent = getResourceOrNull(graph, URIs.TurnComponent);
371         VariableAngleTurnComponent = getResourceOrNull(graph, URIs.VariableAngleTurnComponent);
372         VariableLengthInlineComponent = getResourceOrNull(graph, URIs.VariableLengthInlineComponent);
373         children = getResourceOrNull(graph, URIs.children);
374         children_Inverse = getResourceOrNull(graph, URIs.children_Inverse);
375         hasGeometry = getResourceOrNull(graph, URIs.hasGeometry);
376         hasParameter = getResourceOrNull(graph, URIs.hasParameter);
377         hasParameterValue = getResourceOrNull(graph, URIs.hasParameterValue);
378     }
379     
380     public static Plant3D getInstance(ReadGraph graph) {
381         Session session = graph.getSession();
382         Plant3D ret = session.peekService(Plant3D.class);
383         if(ret == null) {
384             QueryControl qc = graph.getService(QueryControl.class);
385             ret = new Plant3D(qc.getIndependentGraph(graph));
386             session.registerService(Plant3D.class, ret);
387         }
388         return ret;
389     }
390     
391     public static Plant3D getInstance(RequestProcessor session) throws DatabaseException {
392         Plant3D ret = session.peekService(Plant3D.class);
393         if(ret == null) {
394             ret = session.syncRequest(new Read<Plant3D>() {
395                 public Plant3D perform(ReadGraph graph) throws DatabaseException {
396                     QueryControl qc = graph.getService(QueryControl.class);
397                     return new Plant3D(qc.getIndependentGraph(graph));
398                 }
399             });
400             session.registerService(Plant3D.class, ret);
401         }
402         return ret;
403     }
404     
405 }
406