Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/exports/IsKmUpEvaluator.java @ 7693:c130196389df
(issue1596) Sort Export of Middle bedHeight
This simplyfies internal Data storage by removing
the ArrayList wrapper. Usually this is a list of size 1.
The data list of which each member is a distinct sounding
is then sorted by description or first indexed KM.
Afterwards the km index is mapped in a sorted map to
export it in order of km and not in oder of index
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 16 Dec 2013 12:26:52 +0100 |
parents | 4eea35874943 |
children |
rev | line source |
---|---|
7143
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
2 * Software engineering by Intevation GmbH |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
3 * |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
7 */ |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
8 |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
9 package org.dive4elements.river.exports; |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
10 |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
11 import org.dive4elements.artifacts.CallContext; |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
12 import org.dive4elements.river.artifacts.D4EArtifact; |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
13 import org.dive4elements.river.artifacts.access.RiverAccess; |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
14 import org.dive4elements.river.model.River; |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
15 |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
16 public class IsKmUpEvaluator |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
17 implements DiagramAttributes.Evaluator |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
18 { |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
19 public IsKmUpEvaluator() { |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
20 } |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
21 |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
22 @Override |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
23 public Object evaluate(D4EArtifact artifact, CallContext context) { |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
24 RiverAccess access = new RiverAccess(artifact); |
7261
a56fe3bc6700
Refactoring: Let RiverAccess.getRiver return an River.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7143
diff
changeset
|
25 River river = access.getRiver(); |
7143
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
26 return river == null |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
27 ? Boolean.FALSE |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
28 : river.getKmUp(); |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
29 } |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
30 } |
053e39436ba3
Diagrams: Determine if axis should be inverted dynamically.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
diff
changeset
|
31 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |