diff options
author | 2023-02-03 14:12:29 +0100 | |
---|---|---|
committer | 2023-02-03 14:12:29 +0100 | |
commit | 43d098e61e546d696e03143d284cc820434ccf22 (patch) | |
tree | a2b5fe603890bcd7893cb6431859e962a774723f /subprojects/store/src/main | |
parent | refactor: Symbol as record (diff) | |
download | refinery-43d098e61e546d696e03143d284cc820434ccf22.tar.gz refinery-43d098e61e546d696e03143d284cc820434ccf22.tar.zst refinery-43d098e61e546d696e03143d284cc820434ccf22.zip |
refactor: PartialInterpretation adapter naming
Diffstat (limited to 'subprojects/store/src/main')
10 files changed, 97 insertions, 68 deletions
diff --git a/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretation.java b/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretation.java index 7d367937..331fa294 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretation.java +++ b/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretation.java | |||
@@ -2,17 +2,18 @@ package tools.refinery.store.partial; | |||
2 | 2 | ||
3 | import tools.refinery.store.adapter.ModelAdapterBuilderFactory; | 3 | import tools.refinery.store.adapter.ModelAdapterBuilderFactory; |
4 | import tools.refinery.store.model.ModelStoreBuilder; | 4 | import tools.refinery.store.model.ModelStoreBuilder; |
5 | import tools.refinery.store.partial.internal.PartialInterpretationBuilderImpl; | ||
5 | 6 | ||
6 | public final class PartialInterpretation extends ModelAdapterBuilderFactory<PartialModelAdapter, | 7 | public final class PartialInterpretation extends ModelAdapterBuilderFactory<PartialInterpretationAdapter, |
7 | PartialModelStoreAdapter, PartialModelAdapterBuilder> { | 8 | PartialInterpretationStoreAdapter, PartialInterpretationBuilder> { |
8 | public static final PartialInterpretation ADAPTER = new PartialInterpretation(); | 9 | public static final PartialInterpretation ADAPTER = new PartialInterpretation(); |
9 | 10 | ||
10 | private PartialInterpretation() { | 11 | private PartialInterpretation() { |
11 | super(PartialModelAdapter.class, PartialModelStoreAdapter.class, PartialModelAdapterBuilder.class); | 12 | super(PartialInterpretationAdapter.class, PartialInterpretationStoreAdapter.class, PartialInterpretationBuilder.class); |
12 | } | 13 | } |
13 | 14 | ||
14 | @Override | 15 | @Override |
15 | public PartialModelAdapterBuilder createBuilder(ModelStoreBuilder storeBuilder) { | 16 | public PartialInterpretationBuilder createBuilder(ModelStoreBuilder storeBuilder) { |
16 | return new PartialModelAdapterBuilder(storeBuilder); | 17 | return new PartialInterpretationBuilderImpl(storeBuilder); |
17 | } | 18 | } |
18 | } | 19 | } |
diff --git a/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretationAdapter.java b/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretationAdapter.java new file mode 100644 index 00000000..2c83a200 --- /dev/null +++ b/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretationAdapter.java | |||
@@ -0,0 +1,9 @@ | |||
1 | package tools.refinery.store.partial; | ||
2 | |||
3 | import tools.refinery.store.adapter.ModelAdapter; | ||
4 | |||
5 | public interface PartialInterpretationAdapter extends ModelAdapter { | ||
6 | @Override | ||
7 | PartialInterpretationStoreAdapter getStoreAdapter(); | ||
8 | } | ||
9 | |||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretationBuilder.java b/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretationBuilder.java new file mode 100644 index 00000000..0ec13836 --- /dev/null +++ b/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretationBuilder.java | |||
@@ -0,0 +1,9 @@ | |||
1 | package tools.refinery.store.partial; | ||
2 | |||
3 | import tools.refinery.store.adapter.ModelAdapterBuilder; | ||
4 | import tools.refinery.store.model.ModelStore; | ||
5 | |||
6 | public interface PartialInterpretationBuilder extends ModelAdapterBuilder { | ||
7 | @Override | ||
8 | PartialInterpretationStoreAdapter createStoreAdapter(ModelStore store); | ||
9 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretationStoreAdapter.java b/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretationStoreAdapter.java new file mode 100644 index 00000000..d4eb770d --- /dev/null +++ b/subprojects/store/src/main/java/tools/refinery/store/partial/PartialInterpretationStoreAdapter.java | |||
@@ -0,0 +1,9 @@ | |||
1 | package tools.refinery.store.partial; | ||
2 | |||
3 | import tools.refinery.store.adapter.ModelStoreAdapter; | ||
4 | import tools.refinery.store.model.Model; | ||
5 | |||
6 | public interface PartialInterpretationStoreAdapter extends ModelStoreAdapter { | ||
7 | @Override | ||
8 | PartialInterpretationAdapter createModelAdapter(Model model); | ||
9 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/partial/PartialModelAdapter.java b/subprojects/store/src/main/java/tools/refinery/store/partial/PartialModelAdapter.java deleted file mode 100644 index cdab5606..00000000 --- a/subprojects/store/src/main/java/tools/refinery/store/partial/PartialModelAdapter.java +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | package tools.refinery.store.partial; | ||
2 | |||
3 | import tools.refinery.store.adapter.ModelAdapter; | ||
4 | import tools.refinery.store.model.Model; | ||
5 | |||
6 | public class PartialModelAdapter implements ModelAdapter { | ||
7 | private final Model model; | ||
8 | private final PartialModelStoreAdapter storeAdapter; | ||
9 | |||
10 | PartialModelAdapter(Model model, PartialModelStoreAdapter storeAdapter) { | ||
11 | this.model = model; | ||
12 | this.storeAdapter = storeAdapter; | ||
13 | } | ||
14 | |||
15 | @Override | ||
16 | public Model getModel() { | ||
17 | return model; | ||
18 | } | ||
19 | |||
20 | @Override | ||
21 | public PartialModelStoreAdapter getStoreAdapter() { | ||
22 | return storeAdapter; | ||
23 | } | ||
24 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/partial/PartialModelAdapterBuilder.java b/subprojects/store/src/main/java/tools/refinery/store/partial/PartialModelAdapterBuilder.java deleted file mode 100644 index 0d4a32b9..00000000 --- a/subprojects/store/src/main/java/tools/refinery/store/partial/PartialModelAdapterBuilder.java +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | package tools.refinery.store.partial; | ||
2 | |||
3 | import tools.refinery.store.adapter.AbstractModelAdapterBuilder; | ||
4 | import tools.refinery.store.model.ModelStore; | ||
5 | import tools.refinery.store.model.ModelStoreBuilder; | ||
6 | |||
7 | public class PartialModelAdapterBuilder extends AbstractModelAdapterBuilder { | ||
8 | PartialModelAdapterBuilder(ModelStoreBuilder storeBuilder) { | ||
9 | super(storeBuilder); | ||
10 | } | ||
11 | |||
12 | @Override | ||
13 | public PartialModelStoreAdapter createStoreAdapter(ModelStore store) { | ||
14 | return null; | ||
15 | } | ||
16 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/partial/PartialModelStoreAdapter.java b/subprojects/store/src/main/java/tools/refinery/store/partial/PartialModelStoreAdapter.java deleted file mode 100644 index d9432a7d..00000000 --- a/subprojects/store/src/main/java/tools/refinery/store/partial/PartialModelStoreAdapter.java +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | package tools.refinery.store.partial; | ||
2 | |||
3 | import tools.refinery.store.adapter.ModelStoreAdapter; | ||
4 | import tools.refinery.store.model.Model; | ||
5 | import tools.refinery.store.model.ModelStore; | ||
6 | |||
7 | public class PartialModelStoreAdapter implements ModelStoreAdapter { | ||
8 | private final ModelStore store; | ||
9 | |||
10 | PartialModelStoreAdapter(ModelStore store) { | ||
11 | this.store = store; | ||
12 | } | ||
13 | |||
14 | @Override | ||
15 | public ModelStore getStore() { | ||
16 | return store; | ||
17 | } | ||
18 | |||
19 | @Override | ||
20 | public PartialModelAdapter createModelAdapter(Model model) { | ||
21 | return new PartialModelAdapter(model, this); | ||
22 | } | ||
23 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/partial/internal/PartialInterpretationAdapterImpl.java b/subprojects/store/src/main/java/tools/refinery/store/partial/internal/PartialInterpretationAdapterImpl.java new file mode 100644 index 00000000..4b3977c0 --- /dev/null +++ b/subprojects/store/src/main/java/tools/refinery/store/partial/internal/PartialInterpretationAdapterImpl.java | |||
@@ -0,0 +1,24 @@ | |||
1 | package tools.refinery.store.partial.internal; | ||
2 | |||
3 | import tools.refinery.store.model.Model; | ||
4 | import tools.refinery.store.partial.PartialInterpretationAdapter; | ||
5 | |||
6 | public class PartialInterpretationAdapterImpl implements PartialInterpretationAdapter { | ||
7 | private final Model model; | ||
8 | private final PartialInterpretationStoreAdapterImpl storeAdapter; | ||
9 | |||
10 | PartialInterpretationAdapterImpl(Model model, PartialInterpretationStoreAdapterImpl storeAdapter) { | ||
11 | this.model = model; | ||
12 | this.storeAdapter = storeAdapter; | ||
13 | } | ||
14 | |||
15 | @Override | ||
16 | public Model getModel() { | ||
17 | return model; | ||
18 | } | ||
19 | |||
20 | @Override | ||
21 | public PartialInterpretationStoreAdapterImpl getStoreAdapter() { | ||
22 | return storeAdapter; | ||
23 | } | ||
24 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/partial/internal/PartialInterpretationBuilderImpl.java b/subprojects/store/src/main/java/tools/refinery/store/partial/internal/PartialInterpretationBuilderImpl.java new file mode 100644 index 00000000..4609dc32 --- /dev/null +++ b/subprojects/store/src/main/java/tools/refinery/store/partial/internal/PartialInterpretationBuilderImpl.java | |||
@@ -0,0 +1,17 @@ | |||
1 | package tools.refinery.store.partial.internal; | ||
2 | |||
3 | import tools.refinery.store.adapter.AbstractModelAdapterBuilder; | ||
4 | import tools.refinery.store.model.ModelStore; | ||
5 | import tools.refinery.store.model.ModelStoreBuilder; | ||
6 | import tools.refinery.store.partial.PartialInterpretationBuilder; | ||
7 | |||
8 | public class PartialInterpretationBuilderImpl extends AbstractModelAdapterBuilder implements PartialInterpretationBuilder { | ||
9 | public PartialInterpretationBuilderImpl(ModelStoreBuilder storeBuilder) { | ||
10 | super(storeBuilder); | ||
11 | } | ||
12 | |||
13 | @Override | ||
14 | public PartialInterpretationStoreAdapterImpl createStoreAdapter(ModelStore store) { | ||
15 | return null; | ||
16 | } | ||
17 | } | ||
diff --git a/subprojects/store/src/main/java/tools/refinery/store/partial/internal/PartialInterpretationStoreAdapterImpl.java b/subprojects/store/src/main/java/tools/refinery/store/partial/internal/PartialInterpretationStoreAdapterImpl.java new file mode 100644 index 00000000..970b802b --- /dev/null +++ b/subprojects/store/src/main/java/tools/refinery/store/partial/internal/PartialInterpretationStoreAdapterImpl.java | |||
@@ -0,0 +1,23 @@ | |||
1 | package tools.refinery.store.partial.internal; | ||
2 | |||
3 | import tools.refinery.store.model.Model; | ||
4 | import tools.refinery.store.model.ModelStore; | ||
5 | import tools.refinery.store.partial.PartialInterpretationStoreAdapter; | ||
6 | |||
7 | public class PartialInterpretationStoreAdapterImpl implements PartialInterpretationStoreAdapter { | ||
8 | private final ModelStore store; | ||
9 | |||
10 | PartialInterpretationStoreAdapterImpl(ModelStore store) { | ||
11 | this.store = store; | ||
12 | } | ||
13 | |||
14 | @Override | ||
15 | public ModelStore getStore() { | ||
16 | return store; | ||
17 | } | ||
18 | |||
19 | @Override | ||
20 | public PartialInterpretationAdapterImpl createModelAdapter(Model model) { | ||
21 | return new PartialInterpretationAdapterImpl(model, this); | ||
22 | } | ||
23 | } | ||