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 disabled;
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;
43 public DynamicVisualisation(String name, Resource visualisationResource, long interval, boolean disabled,
44 Map<String, DynamicColorContribution> colorContributions,
45 Map<String, DynamicColoringObject> defaultColoringObjects, ColorBarOptions colorBarOptions,
46 Map<String, DynamicSizeContribution> sizeContributions,
47 Map<String, DynamicSizingObject> defaultSizingObjects, SizeBarOptions sizeBarOptions,
48 Map<String, DynamicArrowObject> defaultArrowContributions,
49 Map<String, DynamicArrowContribution> arrowContributions,
52 boolean hideConsumers,
53 boolean hideProducers,
55 boolean hidePumpingStations,
56 boolean staticPropertiesNetworkBranch,
57 boolean staticProperiesPoints,
58 boolean staticPropertiesConsumers,
59 boolean dynamicSymbolsProducers,
60 boolean dynamicSymbolsShutoffValves,
61 boolean dynamicSymbolsValves,
62 boolean dynamicSymbolsPumpingStations
65 this.visualisationResource = visualisationResource;
66 this.interval = interval;
67 this.disabled = disabled;
68 this.colorContributions = colorContributions;
69 this.defaultColorContributions = defaultColoringObjects;
70 this.colorBarOptions = colorBarOptions;
71 this.sizeContributions = sizeContributions;
72 this.defaultSizeContributions = defaultSizingObjects;
73 this.sizeBarOptions = sizeBarOptions;
74 this.defaultArrowContributions = defaultArrowContributions;
75 this.arrowContributions = arrowContributions;
77 this.hidePoints = hidePoints;
78 this.hideConsumers = hideConsumers;
79 this.hideEdges = hideEdges;
80 this.hideProducers = hideProducers;
81 this.hideValves = hideValves;
82 this.hidePumpingStations = hidePumpingStations;
84 this.staticPropertiesConsumers = staticPropertiesConsumers;
85 this.staticPropertiesNetworkBranches = staticPropertiesNetworkBranch;
86 this.staticPropertiesPoints = staticProperiesPoints;
87 this.dynamicSymbolsProducers = dynamicSymbolsProducers;
88 this.dynamicSymbolsPumpingStations = dynamicSymbolsPumpingStations;
89 this.dynamicSymbolsShutoffValves = dynamicSymbolsShutoffValves;
90 this.dynamicSymbolsValves = dynamicSymbolsValves;
93 public String getName() {
97 public Resource getVisualisationResource() {
98 return visualisationResource;
101 public Map<String, DynamicColorContribution> getColorContributions() {
102 return colorContributions;
105 public Map<String, DynamicColoringObject> getDefaultColorContributions() {
106 return defaultColorContributions;
109 public ColorBarOptions getColorBarOptions() {
110 return colorBarOptions;
113 public Map<String, DynamicSizeContribution> getSizeContributions() {
114 return sizeContributions;
117 public Map<String, DynamicSizingObject> getDefaultSizeContributions() {
118 return defaultSizeContributions;
121 public SizeBarOptions getSizeBarOptions() {
122 return sizeBarOptions;
125 public Map<String, DynamicArrowObject> getDefaultArrowContributions() {
126 return defaultArrowContributions;
129 public Map<String, DynamicArrowContribution> getArrowContributions() {
130 return arrowContributions;
133 public boolean isHideEdges() {
137 public boolean isHidePoints() {
141 public boolean isHideConsumers() {
142 return hideConsumers;
145 public boolean isHideProducers() {
146 return hideProducers;
149 public boolean isHideValves() {
153 public boolean isHidePumpingStations() {
154 return hidePumpingStations;
157 public boolean isStaticPropertiesNetworkBranches() {
158 return staticPropertiesNetworkBranches;
161 public boolean isStaticPropertiesPoints() {
162 return staticPropertiesPoints;
165 public boolean isStaticPropertiesConsumers() {
166 return staticPropertiesConsumers;
169 public boolean isDynamicSymbolsProducers() {
170 return dynamicSymbolsProducers;
173 public boolean isDynamicSymbolsPumpingStations() {
174 return dynamicSymbolsPumpingStations;
177 public boolean isDynamicSymbolsShutoffValves() {
178 return dynamicSymbolsShutoffValves;
181 public boolean isDynamicSymbolsValves() {
182 return dynamicSymbolsValves;
185 public long getInterval() {
189 public boolean disabled() {