comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultType.java @ 9614:d889ffe2fb05

Nachtrag Pos. 20: rename type/part to group/type, group added in Infrastructure class
author mschaefer
date Wed, 09 Oct 2019 19:17:06 +0200
parents 8232a3f5967b
children
comparison
equal deleted inserted replaced
9612:f8308db94634 9614:d889ffe2fb05
115 return Formatter.getFlowDepth(context); 115 return Formatter.getFlowDepth(context);
116 } 116 }
117 }; 117 };
118 118
119 // TODO: check, if it is being used correctly 119 // TODO: check, if it is being used correctly
120 public static final SInfoResultType infrastructuregroup = new SInfoResultType(I18NStrings.UNIT_NONE,
121 "sinfo.export.flood_duration.csv.header.infrastructure_group", "sinfo.export.flood_duration.pdf.header.infrastructure_group") {
122 private static final long serialVersionUID = 1L;
123
124 @Override
125 public String exportValue(final CallContext context, final Object value) {
126 return exportStringValue(value);
127 }
128
129 @Override
130 protected NumberFormat createFormatter(final CallContext context) {
131 throw new UnsupportedOperationException();
132 }
133 };
134 //
120 public static final SInfoResultType infrastructuretype = new SInfoResultType(I18NStrings.UNIT_NONE, 135 public static final SInfoResultType infrastructuretype = new SInfoResultType(I18NStrings.UNIT_NONE,
121 "sinfo.export.flood_duration.csv.header.infrastructure_type", "sinfo.export.flood_duration.pdf.header.infrastructure_type") { 136 "sinfo.export.flood_duration.csv.header.infrastructure_type", "sinfo.export.flood_duration.pdf.header.infrastructure_type") {
122 private static final long serialVersionUID = 1L; 137 private static final long serialVersionUID = 1L;
123 138
124 @Override 139 @Override
129 @Override 144 @Override
130 protected NumberFormat createFormatter(final CallContext context) { 145 protected NumberFormat createFormatter(final CallContext context) {
131 throw new UnsupportedOperationException(); 146 throw new UnsupportedOperationException();
132 } 147 }
133 }; 148 };
134 // 149
135 public static final SInfoResultType infrastructurepart = new SInfoResultType(I18NStrings.UNIT_NONE, 150 /**
136 "sinfo.export.flood_duration.csv.header.infrastructure_part", "sinfo.export.flood_duration.pdf.header.infrastructure_part") { 151 * Gets the label of the type and bank location of an infrastructure
137 private static final long serialVersionUID = 1L; 152 */
138 153 public static final String getInfrastructureLabel(final CallContext context, final String group, final String type, final AttributeKey riverside) {
139 @Override 154 return group + " - " + type + " (" + localizeRiverside(context, riverside) + ")";
140 public String exportValue(final CallContext context, final Object value) { 155 }
141 return exportStringValue(value);
142 }
143
144 @Override
145 protected NumberFormat createFormatter(final CallContext context) {
146 throw new UnsupportedOperationException();
147 }
148 };
149 156
150 public static final SInfoResultType dischargeLong = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, "sinfo.export.collision.csv.header.discharge_long") { 157 public static final SInfoResultType dischargeLong = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, "sinfo.export.collision.csv.header.discharge_long") {
151 private static final long serialVersionUID = 1L; 158 private static final long serialVersionUID = 1L;
152 159
153 @Override 160 @Override

http://dive4elements.wald.intevation.org