diff options
author | 2023-08-04 13:52:59 +0200 | |
---|---|---|
committer | 2023-08-04 13:52:59 +0200 | |
commit | 7f552ebe52ac543a9a79c26d6ae91b4a2e63751b (patch) | |
tree | 31630f9a9cf093ee22ee73d25e51afcce9b9cdbb /subprojects/store/src/main/java | |
parent | Intermediate commit with Lazy NeighbourhoodCalculator and StateEquivalenceChe... (diff) | |
parent | Merge pull request #32 from nagilooh/design-space-exploration (diff) | |
download | refinery-7f552ebe52ac543a9a79c26d6ae91b4a2e63751b.tar.gz refinery-7f552ebe52ac543a9a79c26d6ae91b4a2e63751b.tar.zst refinery-7f552ebe52ac543a9a79c26d6ae91b4a2e63751b.zip |
Merge branch 'graphs4value:main' into datastructure
Diffstat (limited to 'subprojects/store/src/main/java')
3 files changed, 9 insertions, 3 deletions
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/Model.java b/subprojects/store/src/main/java/tools/refinery/store/model/Model.java index a028b81b..e2ab72e7 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/model/Model.java +++ b/subprojects/store/src/main/java/tools/refinery/store/model/Model.java | |||
@@ -8,9 +8,11 @@ package tools.refinery.store.model; | |||
8 | import tools.refinery.store.adapter.ModelAdapter; | 8 | import tools.refinery.store.adapter.ModelAdapter; |
9 | import tools.refinery.store.map.Version; | 9 | import tools.refinery.store.map.Version; |
10 | import tools.refinery.store.map.Versioned; | 10 | import tools.refinery.store.map.Versioned; |
11 | import tools.refinery.store.model.internal.VersionedInterpretation; | ||
11 | import tools.refinery.store.representation.AnySymbol; | 12 | import tools.refinery.store.representation.AnySymbol; |
12 | import tools.refinery.store.representation.Symbol; | 13 | import tools.refinery.store.representation.Symbol; |
13 | 14 | ||
15 | import java.util.Map; | ||
14 | import java.util.Optional; | 16 | import java.util.Optional; |
15 | 17 | ||
16 | public interface Model extends Versioned { | 18 | public interface Model extends Versioned { |
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelImpl.java b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelImpl.java index c2ad9257..92694af4 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelImpl.java +++ b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelImpl.java | |||
@@ -187,4 +187,8 @@ public class ModelImpl implements Model { | |||
187 | public void removeListener(ModelListener listener) { | 187 | public void removeListener(ModelListener listener) { |
188 | listeners.remove(listener); | 188 | listeners.remove(listener); |
189 | } | 189 | } |
190 | |||
191 | public Map<? extends AnySymbol, ? extends Interpretation<?>> getInterpretations() { | ||
192 | return interpretations; | ||
193 | } | ||
190 | } | 194 | } |
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreBuilderImpl.java b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreBuilderImpl.java index 65fa8d24..2bd187a8 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreBuilderImpl.java +++ b/subprojects/store/src/main/java/tools/refinery/store/model/internal/ModelStoreBuilderImpl.java | |||
@@ -59,13 +59,13 @@ public class ModelStoreBuilderImpl implements ModelStoreBuilder { | |||
59 | 59 | ||
60 | @Override | 60 | @Override |
61 | public ModelStore build() { | 61 | public ModelStore build() { |
62 | for (int i = adapters.size() - 1; i >= 0; i--) { | ||
63 | adapters.get(i).configure(this); | ||
64 | } | ||
62 | var stores = new LinkedHashMap<AnySymbol, VersionedMapStore<Tuple, ?>>(allSymbols.size()); | 65 | var stores = new LinkedHashMap<AnySymbol, VersionedMapStore<Tuple, ?>>(allSymbols.size()); |
63 | for (var entry : equivalenceClasses.entrySet()) { | 66 | for (var entry : equivalenceClasses.entrySet()) { |
64 | createStores(stores, entry.getKey(), entry.getValue()); | 67 | createStores(stores, entry.getKey(), entry.getValue()); |
65 | } | 68 | } |
66 | for (int i = adapters.size() - 1; i >= 0; i--) { | ||
67 | adapters.get(i).configure(this); | ||
68 | } | ||
69 | var modelStore = new ModelStoreImpl(stores, adapters.size()); | 69 | var modelStore = new ModelStoreImpl(stores, adapters.size()); |
70 | for (var adapterBuilder : adapters) { | 70 | for (var adapterBuilder : adapters) { |
71 | var storeAdapter = adapterBuilder.build(modelStore); | 71 | var storeAdapter = adapterBuilder.build(modelStore); |