Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/common/AbstractResultType.java @ 9176:1614cb14308f
Work on calculations for S-Info flood duration workflow
author | mschaefer |
---|---|
date | Mon, 25 Jun 2018 19:21:11 +0200 |
parents | d2472018740c |
children | d32b11d585cd |
comparison
equal
deleted
inserted
replaced
9175:34dc0163ad2d | 9176:1614cb14308f |
---|---|
84 this.formatters.put(locale, createFormatter(context)); | 84 this.formatters.put(locale, createFormatter(context)); |
85 | 85 |
86 return this.formatters.get(locale); | 86 return this.formatters.get(locale); |
87 } | 87 } |
88 | 88 |
89 protected abstract NumberFormat createFormatter(CallContext context); | |
90 | |
89 protected final String exportDateValue(final CallContext context, final Date value) { | 91 protected final String exportDateValue(final CallContext context, final Date value) { |
90 final Locale locale = Resources.getLocale(context.getMeta()); | 92 final Locale locale = Resources.getLocale(context.getMeta()); |
91 final DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, locale); | 93 final DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, locale); |
92 return df.format(value); | 94 return df.format(value); |
93 } | 95 } |
94 | |
95 protected abstract NumberFormat createFormatter(CallContext context); | |
96 | 96 |
97 @Override | 97 @Override |
98 public final String getCsvHeader() { | 98 public final String getCsvHeader() { |
99 return this.csvHeader; | 99 return this.csvHeader; |
100 } | 100 } |