diff options
Diffstat (limited to 'store/src/main/java/tools/refinery/data/query/internal/RelationalEngineContext.java')
-rw-r--r-- | store/src/main/java/tools/refinery/data/query/internal/RelationalEngineContext.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/store/src/main/java/tools/refinery/data/query/internal/RelationalEngineContext.java b/store/src/main/java/tools/refinery/data/query/internal/RelationalEngineContext.java new file mode 100644 index 00000000..08ab8927 --- /dev/null +++ b/store/src/main/java/tools/refinery/data/query/internal/RelationalEngineContext.java | |||
@@ -0,0 +1,33 @@ | |||
1 | package tools.refinery.data.query.internal; | ||
2 | |||
3 | import org.eclipse.viatra.query.runtime.api.scope.IBaseIndex; | ||
4 | import org.eclipse.viatra.query.runtime.api.scope.IEngineContext; | ||
5 | import org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContext; | ||
6 | |||
7 | import tools.refinery.data.model.Model; | ||
8 | |||
9 | public class RelationalEngineContext implements IEngineContext{ | ||
10 | private final IBaseIndex baseIndex = new DummyBaseIndexer(); | ||
11 | private final RelationalRuntimeContext runtimeContext; | ||
12 | |||
13 | |||
14 | public RelationalEngineContext(Model model, RelationUpdateListener updateListener) { | ||
15 | runtimeContext = new RelationalRuntimeContext(model, updateListener); | ||
16 | } | ||
17 | |||
18 | @Override | ||
19 | public IBaseIndex getBaseIndex() { | ||
20 | return this.baseIndex; | ||
21 | } | ||
22 | |||
23 | @Override | ||
24 | public void dispose() { | ||
25 | //lifecycle not controlled by engine | ||
26 | } | ||
27 | |||
28 | @Override | ||
29 | public IQueryRuntimeContext getQueryRuntimeContext() { | ||
30 | return runtimeContext; | ||
31 | } | ||
32 | |||
33 | } | ||