1 package org.simantics.district.network.visualisations.model;
5 import org.simantics.db.Resource;
6 import org.simantics.district.network.visualisations.DynamicVisualisationsContributions.DynamicArrowObject;
7 import org.simantics.district.network.visualisations.DynamicVisualisationsContributions.DynamicColoringObject;
8 import org.simantics.district.network.visualisations.DynamicVisualisationsContributions.DynamicSizingObject;
10 public class DynamicVisualisation {
12 private final String name;
13 private final Resource visualisationResource;
15 private final long interval;
16 private final boolean disabledUpdates;
18 private final Map<String, DynamicColorContribution> colorContributions;
19 private final Map<String, DynamicColoringObject> defaultColorContributions;
20 private final ColorBarOptions colorBarOptions;
21 private final Map<String, DynamicSizeContribution> sizeContributions;
22 private final Map<String, DynamicSizingObject> defaultSizeContributions;
23 private final SizeBarOptions sizeBarOptions;
24 private final Map<String, DynamicArrowObject> defaultArrowContributions;
25 private final Map<String, DynamicArrowContribution> arrowContributions;
27 private final boolean hideEdges;
28 private final boolean hidePoints;
29 private final boolean hideConsumers;
30 private final boolean hideProducers;
31 private final boolean hideValves;
32 private final boolean hidePumpingStations;
34 private final boolean staticPropertiesNetworkBranches;
35 private final boolean staticPropertiesPoints;
36 private final boolean staticPropertiesConsumers;
38 private final boolean dynamicSymbolsProducers;
39 private final boolean dynamicSymbolsShutoffValves;
40 private final boolean dynamicSymbolsValves;
41 private final boolean dynamicSymbolsPumpingStations;
42 private boolean keyVariablesVertexHover;
43 private boolean keyVariablesEdgesHover;
44 private boolean resetVisualisation;
46 public DynamicVisualisation(String name, Resource visualisationResource, long interval, boolean disabled,
47 boolean resetVisualisation, Map<String, DynamicColorContribution> colorContributions,
48 Map<String, DynamicColoringObject> defaultColoringObjects, ColorBarOptions colorBarOptions,
49 Map<String, DynamicSizeContribution> sizeContributions,
50 Map<String, DynamicSizingObject> defaultSizingObjects, SizeBarOptions sizeBarOptions,
51 Map<String, DynamicArrowObject> defaultArrowContributions,
52 Map<String, DynamicArrowContribution> arrowContributions,
55 boolean hideConsumers,
56 boolean hideProducers,
58 boolean hidePumpingStations,
59 boolean staticPropertiesNetworkBranch,
60 boolean staticProperiesPoints,
61 boolean staticPropertiesConsumers,
62 boolean dynamicSymbolsProducers,
63 boolean dynamicSymbolsShutoffValves,
64 boolean dynamicSymbolsValves,
65 boolean dynamicSymbolsPumpingStations,
66 boolean keyVariablesVertexHover,
67 boolean keyVariablesEdgesHover
70 this.visualisationResource = visualisationResource;
71 this.interval = interval;
72 this.disabledUpdates = disabled;
73 this.resetVisualisation = resetVisualisation;
74 this.colorContributions = colorContributions;
75 this.defaultColorContributions = defaultColoringObjects;
76 this.colorBarOptions = colorBarOptions;
77 this.sizeContributions = sizeContributions;
78 this.defaultSizeContributions = defaultSizingObjects;
79 this.sizeBarOptions = sizeBarOptions;
80 this.defaultArrowContributions = defaultArrowContributions;
81 this.arrowContributions = arrowContributions;
83 this.hidePoints = hidePoints;
84 this.hideConsumers = hideConsumers;
85 this.hideEdges = hideEdges;
86 this.hideProducers = hideProducers;
87 this.hideValves = hideValves;
88 this.hidePumpingStations = hidePumpingStations;
90 this.staticPropertiesConsumers = staticPropertiesConsumers;
91 this.staticPropertiesNetworkBranches = staticPropertiesNetworkBranch;
92 this.staticPropertiesPoints = staticProperiesPoints;
93 this.dynamicSymbolsProducers = dynamicSymbolsProducers;
94 this.dynamicSymbolsPumpingStations = dynamicSymbolsPumpingStations;
95 this.dynamicSymbolsShutoffValves = dynamicSymbolsShutoffValves;
96 this.dynamicSymbolsValves = dynamicSymbolsValves;
98 this.keyVariablesVertexHover = keyVariablesVertexHover;
99 this.keyVariablesEdgesHover = keyVariablesEdgesHover;
102 public String getName() {
106 public Resource getVisualisationResource() {
107 return visualisationResource;
110 public Map<String, DynamicColorContribution> getColorContributions() {
111 return colorContributions;
114 public Map<String, DynamicColoringObject> getDefaultColorContributions() {
115 return defaultColorContributions;
118 public ColorBarOptions getColorBarOptions() {
119 return colorBarOptions;
122 public Map<String, DynamicSizeContribution> getSizeContributions() {
123 return sizeContributions;
126 public Map<String, DynamicSizingObject> getDefaultSizeContributions() {
127 return defaultSizeContributions;
130 public SizeBarOptions getSizeBarOptions() {
131 return sizeBarOptions;
134 public Map<String, DynamicArrowObject> getDefaultArrowContributions() {
135 return defaultArrowContributions;
138 public Map<String, DynamicArrowContribution> getArrowContributions() {
139 return arrowContributions;
142 public boolean isHideEdges() {
146 public boolean isHidePoints() {
150 public boolean isHideConsumers() {
151 return hideConsumers;
154 public boolean isHideProducers() {
155 return hideProducers;
158 public boolean isHideValves() {
162 public boolean isHidePumpingStations() {
163 return hidePumpingStations;
166 public boolean isStaticPropertiesNetworkBranches() {
167 return staticPropertiesNetworkBranches;
170 public boolean isStaticPropertiesPoints() {
171 return staticPropertiesPoints;
174 public boolean isStaticPropertiesConsumers() {
175 return staticPropertiesConsumers;
178 public boolean isDynamicSymbolsProducers() {
179 return dynamicSymbolsProducers;
182 public boolean isDynamicSymbolsPumpingStations() {
183 return dynamicSymbolsPumpingStations;
186 public boolean isDynamicSymbolsShutoffValves() {
187 return dynamicSymbolsShutoffValves;
190 public boolean isDynamicSymbolsValves() {
191 return dynamicSymbolsValves;
194 public long getInterval() {
198 public boolean disabledUpdates() {
199 return disabledUpdates;
202 public boolean isKeyVariablesVertexHover() {
203 return keyVariablesVertexHover;
206 public boolean isKeyVariablesEdgesHover() {
207 return keyVariablesEdgesHover;
210 public boolean isResetVisualisation() {
211 return resetVisualisation;