diff options
Diffstat (limited to 'subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningStoreAdapterImpl.java')
-rw-r--r-- | subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningStoreAdapterImpl.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningStoreAdapterImpl.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningStoreAdapterImpl.java index 3dac53ef..8eb5a034 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningStoreAdapterImpl.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningStoreAdapterImpl.java | |||
@@ -10,6 +10,7 @@ import tools.refinery.store.model.ModelStore; | |||
10 | import tools.refinery.store.query.ModelQueryAdapter; | 10 | import tools.refinery.store.query.ModelQueryAdapter; |
11 | import tools.refinery.store.reasoning.ReasoningStoreAdapter; | 11 | import tools.refinery.store.reasoning.ReasoningStoreAdapter; |
12 | import tools.refinery.store.reasoning.interpretation.PartialInterpretation; | 12 | import tools.refinery.store.reasoning.interpretation.PartialInterpretation; |
13 | import tools.refinery.store.reasoning.literal.Concreteness; | ||
13 | import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner; | 14 | import tools.refinery.store.reasoning.refinement.PartialInterpretationRefiner; |
14 | import tools.refinery.store.reasoning.refinement.PartialModelInitializer; | 15 | import tools.refinery.store.reasoning.refinement.PartialModelInitializer; |
15 | import tools.refinery.store.reasoning.refinement.StorageRefiner; | 16 | import tools.refinery.store.reasoning.refinement.StorageRefiner; |
@@ -22,20 +23,23 @@ import tools.refinery.store.tuple.Tuple; | |||
22 | import java.util.Collection; | 23 | import java.util.Collection; |
23 | import java.util.List; | 24 | import java.util.List; |
24 | import java.util.Map; | 25 | import java.util.Map; |
26 | import java.util.Set; | ||
25 | 27 | ||
26 | class ReasoningStoreAdapterImpl implements ReasoningStoreAdapter { | 28 | class ReasoningStoreAdapterImpl implements ReasoningStoreAdapter { |
27 | private final ModelStore store; | 29 | private final ModelStore store; |
30 | private final Set<Concreteness> supportedInterpretations; | ||
28 | private final Map<AnyPartialSymbol, PartialInterpretation.Factory<?, ?>> symbolInterpreters; | 31 | private final Map<AnyPartialSymbol, PartialInterpretation.Factory<?, ?>> symbolInterpreters; |
29 | private final Map<AnyPartialSymbol, PartialInterpretationRefiner.Factory<?, ?>> symbolRefiners; | 32 | private final Map<AnyPartialSymbol, PartialInterpretationRefiner.Factory<?, ?>> symbolRefiners; |
30 | private final Map<AnySymbol, StorageRefiner.Factory<?>> storageRefiners; | 33 | private final Map<AnySymbol, StorageRefiner.Factory<?>> storageRefiners; |
31 | private final List<PartialModelInitializer> initializers; | 34 | private final List<PartialModelInitializer> initializers; |
32 | 35 | ||
33 | ReasoningStoreAdapterImpl(ModelStore store, | 36 | ReasoningStoreAdapterImpl(ModelStore store, Set<Concreteness> supportedInterpretations, |
34 | Map<AnyPartialSymbol, PartialInterpretation.Factory<?, ?>> symbolInterpreters, | 37 | Map<AnyPartialSymbol, PartialInterpretation.Factory<?, ?>> symbolInterpreters, |
35 | Map<AnyPartialSymbol, PartialInterpretationRefiner.Factory<?, ?>> symbolRefiners, | 38 | Map<AnyPartialSymbol, PartialInterpretationRefiner.Factory<?, ?>> symbolRefiners, |
36 | Map<AnySymbol, StorageRefiner.Factory<?>> storageRefiners, | 39 | Map<AnySymbol, StorageRefiner.Factory<?>> storageRefiners, |
37 | List<PartialModelInitializer> initializers) { | 40 | List<PartialModelInitializer> initializers) { |
38 | this.store = store; | 41 | this.store = store; |
42 | this.supportedInterpretations = supportedInterpretations; | ||
39 | this.symbolInterpreters = symbolInterpreters; | 43 | this.symbolInterpreters = symbolInterpreters; |
40 | this.symbolRefiners = symbolRefiners; | 44 | this.symbolRefiners = symbolRefiners; |
41 | this.storageRefiners = storageRefiners; | 45 | this.storageRefiners = storageRefiners; |
@@ -48,6 +52,11 @@ class ReasoningStoreAdapterImpl implements ReasoningStoreAdapter { | |||
48 | } | 52 | } |
49 | 53 | ||
50 | @Override | 54 | @Override |
55 | public Set<Concreteness> getSupportedInterpretations() { | ||
56 | return supportedInterpretations; | ||
57 | } | ||
58 | |||
59 | @Override | ||
51 | public Collection<AnyPartialSymbol> getPartialSymbols() { | 60 | public Collection<AnyPartialSymbol> getPartialSymbols() { |
52 | return symbolInterpreters.keySet(); | 61 | return symbolInterpreters.keySet(); |
53 | } | 62 | } |
@@ -69,7 +78,7 @@ class ReasoningStoreAdapterImpl implements ReasoningStoreAdapter { | |||
69 | return symbolRefiners; | 78 | return symbolRefiners; |
70 | } | 79 | } |
71 | 80 | ||
72 | StorageRefiner[] createStprageRefiner(Model model) { | 81 | StorageRefiner[] createStorageRefiner(Model model) { |
73 | var refiners = new StorageRefiner[storageRefiners.size()]; | 82 | var refiners = new StorageRefiner[storageRefiners.size()]; |
74 | int i = 0; | 83 | int i = 0; |
75 | for (var entry : storageRefiners.entrySet()) { | 84 | for (var entry : storageRefiners.entrySet()) { |