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;
9 import org.simantics.district.network.visualisations.DynamicVisualisationsContributions.DynamicSymbolContributionObject;
10 import org.simantics.district.network.visualisations.DynamicVisualisationsContributions.StaticInformationContributionObject;
12 public class DynamicVisualisation {
14 private final String name;
15 private final Resource visualisationResource;
17 private final long interval;
18 private final boolean disabledUpdates;
20 private final Map<String, DynamicColorContribution> colorContributions;
21 private final Map<String, DynamicColoringObject> defaultColorContributions;
22 private final ColorBarOptions colorBarOptions;
23 private final Map<String, DynamicSizeContribution> sizeContributions;
24 private final Map<String, DynamicSizingObject> defaultSizeContributions;
25 private final SizeBarOptions sizeBarOptions;
26 private final Map<String, DynamicArrowObject> defaultArrowContributions;
27 private final Map<String, DynamicArrowContribution> arrowContributions;
29 private final Map<String, StaticInformationContributionObject> staticInformationContributions;
30 private final Map<String, DynamicSymbolContributionObject> dynamicSymbolContributions;
32 private final boolean hideEdges;
33 private final boolean hidePoints;
34 private final boolean hideConsumers;
35 private final boolean hideProducers;
36 private final boolean hideValves;
37 private final boolean hidePumpingStations;
39 private final boolean staticPropertiesNetworkBranches;
40 private final boolean staticPropertiesPoints;
41 private final boolean staticPropertiesConsumers;
43 private final boolean dynamicSymbolsProducers;
44 private final boolean dynamicSymbolsShutoffValves;
45 private final boolean dynamicSymbolsValves;
46 private final boolean dynamicSymbolsPumpingStations;
47 private boolean keyVariablesVertexHover;
48 private boolean keyVariablesEdgesHover;
49 private boolean resetVisualisation;
51 private boolean showElevationServerBoundingBox;
52 private boolean isInSimulation;
54 public DynamicVisualisation(String name, Resource visualisationResource, long interval, boolean disabled,
55 boolean resetVisualisation, Map<String, DynamicColorContribution> colorContributions,
56 Map<String, DynamicColoringObject> defaultColoringObjects, ColorBarOptions colorBarOptions,
57 Map<String, DynamicSizeContribution> sizeContributions,
58 Map<String, DynamicSizingObject> defaultSizingObjects, SizeBarOptions sizeBarOptions,
59 Map<String, DynamicArrowObject> defaultArrowContributions,
60 Map<String, DynamicArrowContribution> arrowContributions,
61 Map<String, StaticInformationContributionObject> staticInformationContributions,
62 Map<String, DynamicSymbolContributionObject> dynamicSymbolContributions,
65 boolean hideConsumers,
66 boolean hideProducers,
68 boolean hidePumpingStations,
69 boolean staticPropertiesNetworkBranch,
70 boolean staticProperiesPoints,
71 boolean staticPropertiesConsumers,
72 boolean dynamicSymbolsProducers,
73 boolean dynamicSymbolsShutoffValves,
74 boolean dynamicSymbolsValves,
75 boolean dynamicSymbolsPumpingStations,
76 boolean keyVariablesVertexHover,
77 boolean keyVariablesEdgesHover,
78 boolean showElevationServerBoundingBox,
79 boolean isInSimulation
82 this.visualisationResource = visualisationResource;
83 this.interval = interval;
84 this.disabledUpdates = disabled;
85 this.resetVisualisation = resetVisualisation;
86 this.colorContributions = colorContributions;
87 this.defaultColorContributions = defaultColoringObjects;
88 this.colorBarOptions = colorBarOptions;
89 this.sizeContributions = sizeContributions;
90 this.defaultSizeContributions = defaultSizingObjects;
91 this.sizeBarOptions = sizeBarOptions;
92 this.defaultArrowContributions = defaultArrowContributions;
93 this.arrowContributions = arrowContributions;
94 this.staticInformationContributions = staticInformationContributions;
95 this.dynamicSymbolContributions = dynamicSymbolContributions;
97 this.hidePoints = hidePoints;
98 this.hideConsumers = hideConsumers;
99 this.hideEdges = hideEdges;
100 this.hideProducers = hideProducers;
101 this.hideValves = hideValves;
102 this.hidePumpingStations = hidePumpingStations;
104 this.staticPropertiesConsumers = staticPropertiesConsumers;
105 this.staticPropertiesNetworkBranches = staticPropertiesNetworkBranch;
106 this.staticPropertiesPoints = staticProperiesPoints;
107 this.dynamicSymbolsProducers = dynamicSymbolsProducers;
108 this.dynamicSymbolsPumpingStations = dynamicSymbolsPumpingStations;
109 this.dynamicSymbolsShutoffValves = dynamicSymbolsShutoffValves;
110 this.dynamicSymbolsValves = dynamicSymbolsValves;
112 this.keyVariablesVertexHover = keyVariablesVertexHover;
113 this.keyVariablesEdgesHover = keyVariablesEdgesHover;
115 this.showElevationServerBoundingBox = showElevationServerBoundingBox;
116 this.isInSimulation = isInSimulation;
119 public String getName() {
123 public Resource getVisualisationResource() {
124 return visualisationResource;
127 public Map<String, DynamicColorContribution> getColorContributions() {
128 return colorContributions;
131 public Map<String, DynamicColoringObject> getDefaultColorContributions() {
132 return defaultColorContributions;
135 public ColorBarOptions getColorBarOptions() {
136 return colorBarOptions;
139 public Map<String, DynamicSizeContribution> getSizeContributions() {
140 return sizeContributions;
143 public Map<String, DynamicSizingObject> getDefaultSizeContributions() {
144 return defaultSizeContributions;
147 public SizeBarOptions getSizeBarOptions() {
148 return sizeBarOptions;
151 public Map<String, DynamicArrowObject> getDefaultArrowContributions() {
152 return defaultArrowContributions;
155 public Map<String, DynamicArrowContribution> getArrowContributions() {
156 return arrowContributions;
159 public Map<String, StaticInformationContributionObject> getStaticInformationContributions() {
160 return staticInformationContributions;
163 public boolean isHideEdges() {
167 public boolean isHidePoints() {
171 public boolean isHideConsumers() {
172 return hideConsumers;
175 public boolean isHideProducers() {
176 return hideProducers;
179 public boolean isHideValves() {
183 public boolean isHidePumpingStations() {
184 return hidePumpingStations;
187 public boolean isStaticPropertiesNetworkBranches() {
188 return staticPropertiesNetworkBranches;
191 public boolean isStaticPropertiesPoints() {
192 return staticPropertiesPoints;
195 public boolean isStaticPropertiesConsumers() {
196 return staticPropertiesConsumers;
199 public boolean isDynamicSymbolsProducers() {
200 return dynamicSymbolsProducers;
203 public boolean isDynamicSymbolsPumpingStations() {
204 return dynamicSymbolsPumpingStations;
207 public boolean isDynamicSymbolsShutoffValves() {
208 return dynamicSymbolsShutoffValves;
211 public boolean isDynamicSymbolsValves() {
212 return dynamicSymbolsValves;
215 public long getInterval() {
219 public boolean disabledUpdates() {
220 return disabledUpdates;
223 public boolean isKeyVariablesVertexHover() {
224 return keyVariablesVertexHover;
227 public boolean isKeyVariablesEdgesHover() {
228 return keyVariablesEdgesHover;
231 public boolean isResetVisualisation() {
232 return resetVisualisation;
235 public boolean isInSimulation() {
236 return isInSimulation;
239 public Map<String, DynamicSymbolContributionObject> getDynamicSymbolContributions() {
240 return dynamicSymbolContributions;