Merge "Testing SonarQube with Simantics Platform SDK"
[simantics/platform.git] / bundles / org.simantics.db.procore / src / fi / vtt / simantics / procore / internal / StatementSupportImpl.java
1 package fi.vtt.simantics.procore.internal;\r
2 \r
3 import org.simantics.db.Resource;\r
4 import org.simantics.db.Statement;\r
5 import org.simantics.db.common.StandardStatement;\r
6 import org.simantics.db.service.StatementSupport;\r
7 \r
8 public class StatementSupportImpl implements StatementSupport {\r
9         \r
10         final private SessionImplSocket session;\r
11         \r
12         StatementSupportImpl(SessionImplSocket session) {\r
13                 this.session = session;\r
14         }\r
15 \r
16         @Override\r
17         public Statement build(Resource s, Resource p, Resource o) {\r
18                 return new StandardStatement(s, p, o);\r
19         }\r
20 \r
21         @Override\r
22         public boolean isList(Statement stm) {\r
23                 if(stm instanceof DirectStatementImpl) {\r
24                         DirectStatementImpl i = (DirectStatementImpl)stm;\r
25                         return i.s == i.p;\r
26                 }\r
27                 throw new Error("Not supported");\r
28         }\r
29 \r
30         @Override\r
31         public boolean isTag(Statement stm) {\r
32                 throw new Error("Not supported");\r
33         }\r
34 \r
35         @Override\r
36         public boolean objectAsserted(Statement stm) {\r
37                 throw new Error("Not supported");\r
38         }\r
39 \r
40         @Override\r
41         public boolean objectEquals(Statement stm, Resource r) {\r
42                 throw new Error("Not supported");\r
43         }\r
44 \r
45         @Override\r
46         public boolean subjectPersistent(Statement stm) {\r
47                 throw new Error("Not supported");\r
48         }\r
49 \r
50         @Override\r
51         public boolean objectPersistent(Statement stm) {\r
52                 throw new Error("Not supported");\r
53         }\r
54 \r
55         @Override\r
56         public boolean predicateAsserted(Statement stm) {\r
57                 throw new Error("Not supported");\r
58         }\r
59 \r
60         @Override\r
61         public boolean predicateEquals(Statement stm, Resource r) {\r
62                 throw new Error("Not supported");\r
63         }\r
64 \r
65         @Override\r
66         public boolean predicatePersistent(Statement stm) {\r
67                 throw new Error("Not supported");\r
68         }\r
69 \r
70         @Override\r
71         public boolean subjectAsserted(Statement stm) {\r
72                 throw new Error("Not supported");\r
73         }\r
74 \r
75         @Override\r
76         public boolean subjectEquals(Statement stm, Resource r) {\r
77                 throw new Error("Not supported");\r
78         }\r
79 \r
80 }\r