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