diff options
Diffstat (limited to 'subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizeStoreAdapterImpl.java')
-rw-r--r-- | subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizeStoreAdapterImpl.java | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizeStoreAdapterImpl.java b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizeStoreAdapterImpl.java new file mode 100644 index 00000000..04be22d6 --- /dev/null +++ b/subprojects/store-dse-visualization/src/main/java/tools/refinery/visualization/internal/ModelVisualizeStoreAdapterImpl.java | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.visualization.internal; | ||
7 | |||
8 | import tools.refinery.store.adapter.ModelAdapter; | ||
9 | import tools.refinery.store.model.Model; | ||
10 | import tools.refinery.store.model.ModelStore; | ||
11 | import tools.refinery.visualization.ModelVisualizerStoreAdapter; | ||
12 | |||
13 | import java.util.Set; | ||
14 | |||
15 | public class ModelVisualizeStoreAdapterImpl implements ModelVisualizerStoreAdapter { | ||
16 | private final ModelStore store; | ||
17 | private final String outputPath; | ||
18 | private final boolean renderDesignSpace; | ||
19 | private final boolean renderStates; | ||
20 | private final Set<FileFormat> formats; | ||
21 | |||
22 | public ModelVisualizeStoreAdapterImpl(ModelStore store, String outputPath, Set<FileFormat> formats, | ||
23 | boolean renderDesignSpace, boolean renderStates) { | ||
24 | this.store = store; | ||
25 | this.outputPath = outputPath; | ||
26 | this.formats = formats; | ||
27 | this.renderDesignSpace = renderDesignSpace; | ||
28 | this.renderStates = renderStates; | ||
29 | } | ||
30 | |||
31 | @Override | ||
32 | public ModelStore getStore() { | ||
33 | return store; | ||
34 | } | ||
35 | |||
36 | @Override | ||
37 | public ModelAdapter createModelAdapter(Model model) { | ||
38 | return new ModelVisualizerAdapterImpl(model, this); | ||
39 | } | ||
40 | |||
41 | @Override | ||
42 | public String getOutputPath() { | ||
43 | return outputPath; | ||
44 | } | ||
45 | |||
46 | @Override | ||
47 | public boolean isRenderDesignSpace() { | ||
48 | return renderDesignSpace; | ||
49 | } | ||
50 | |||
51 | @Override | ||
52 | public boolean isRenderStates() { | ||
53 | return renderStates; | ||
54 | } | ||
55 | |||
56 | @Override | ||
57 | public Set<FileFormat> getFormats() { | ||
58 | return formats; | ||
59 | } | ||
60 | } | ||