Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstHeightProcessor.java @ 9438:d2f5375ede26
Replaced own W and Q facets in bundu bzws by subclass of FixWaterlevelFacet, added annotations and datacage
author | mschaefer |
---|---|
date | Mon, 20 Aug 2018 16:05:06 +0200 |
parents | d194c5b24bf8 |
children | ecadc9ed0ba0 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstHeightProcessor.java Mon Aug 20 15:53:33 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstHeightProcessor.java Mon Aug 20 16:05:06 2018 +0200 @@ -19,7 +19,6 @@ import org.dive4elements.river.artifacts.bundu.BunduResultType; import org.dive4elements.river.artifacts.common.AbstractProcessor; import org.dive4elements.river.artifacts.common.AbstractResultType; -import org.dive4elements.river.artifacts.common.GeneralResultType; import org.dive4elements.river.artifacts.resources.Resources; import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType; import org.dive4elements.river.exports.DiagramGenerator; @@ -34,9 +33,6 @@ */ public final class BezugswstHeightProcessor extends AbstractProcessor { - private static final String FACET_W = "bundu_facet_w"; - - private static final String FACET_W_DESCRIPTION = "bundu_facet_w.description"; private static final String FACET_CHANNELMIN = "bundu_facet_channelmin"; @@ -46,34 +42,19 @@ private static final String FACET_BEDHEIGHT_DESCRIPTION = "bundu_facet_bedheight.description"; - public static final String FACET_Q = "bundu_facet_q"; - - private static final String FACET_Q_DESCRIPTION = "bundu_facet_q.description"; - private static final String AXIS_LABEL = LongitudinalSectionGenerator.I18N_YAXIS_LABEL; - private static final String Q_AXIS_LABEL = LongitudinalSectionGenerator.I18N_2YAXIS_LABEL; - private static final Set<String> HANDLED_FACET_TYPES = new HashSet<>(); static { - HANDLED_FACET_TYPES.add(FACET_W); HANDLED_FACET_TYPES.add(FACET_CHANNELMIN); HANDLED_FACET_TYPES.add(FACET_BEDHEIGHT); - HANDLED_FACET_TYPES.add(FACET_Q); } public BezugswstHeightProcessor() { super(AXIS_LABEL, HANDLED_FACET_TYPES); } - public static Facet createWFacet(final CallContext context, final String hash, final String id, final int facetIndex, - final int resultIndex, final String seriesName) { - - final String description = Resources.getMsg(context.getMeta(), FACET_W_DESCRIPTION, FACET_W_DESCRIPTION, seriesName); - return new BezugswstResultFacet(facetIndex, resultIndex, FACET_W, description, AXIS_LABEL, id, hash); - } - public static Facet createChannelminFacet(final CallContext context, final String hash, final String id, final int facetIndex, final int resultIndex) { @@ -96,14 +77,10 @@ protected AbstractResultType doGetType(final String facetName) { - if (FACET_W.contentEquals(facetName)) - return BunduResultType.bezugswst; if (FACET_CHANNELMIN.contentEquals(facetName)) return BunduResultType.channelLowerEdge; if (FACET_BEDHEIGHT.contentEquals(facetName)) return SInfoResultType.meanBedHeight; - if (FACET_Q.contentEquals(facetName)) - return GeneralResultType.dischargeQwithUnit; final String error = String.format("Unknown facet name: %s", facetName); throw new UnsupportedOperationException(error);