Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java @ 5867:59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 28 Apr 2013 15:23:01 +0200 |
parents | 4897a58c8746 |
children | af13ceeba52a |
comparison
equal
deleted
inserted
replaced
5866:9a6741ccf6d4 | 5867:59ff03ff48f1 |
---|---|
14 import java.util.LinkedList; | 14 import java.util.LinkedList; |
15 import java.util.List; | 15 import java.util.List; |
16 | 16 |
17 import org.apache.log4j.Logger; | 17 import org.apache.log4j.Logger; |
18 | 18 |
19 import org.dive4elements.river.artifacts.FLYSArtifact; | 19 import org.dive4elements.river.artifacts.D4EArtifact; |
20 import org.dive4elements.river.artifacts.access.BedDifferencesAccess; | 20 import org.dive4elements.river.artifacts.access.BedDifferencesAccess; |
21 import org.dive4elements.river.artifacts.model.Calculation; | 21 import org.dive4elements.river.artifacts.model.Calculation; |
22 import org.dive4elements.river.artifacts.model.CalculationResult; | 22 import org.dive4elements.river.artifacts.model.CalculationResult; |
23 | 23 |
24 | 24 |
29 private static final Logger logger = Logger | 29 private static final Logger logger = Logger |
30 .getLogger(BedDiffCalculation.class); | 30 .getLogger(BedDiffCalculation.class); |
31 | 31 |
32 protected String river; | 32 protected String river; |
33 protected String yearEpoch; | 33 protected String yearEpoch; |
34 protected FLYSArtifact[][] artifacts; | 34 protected D4EArtifact[][] artifacts; |
35 | 35 |
36 public BedDiffCalculation() { | 36 public BedDiffCalculation() { |
37 } | 37 } |
38 | 38 |
39 public CalculationResult calculate(BedDifferencesAccess access) { | 39 public CalculationResult calculate(BedDifferencesAccess access) { |
40 logger.info("BedDiffCalculation.calculate"); | 40 logger.info("BedDiffCalculation.calculate"); |
41 | 41 |
42 String river = access.getRiver(); | 42 String river = access.getRiver(); |
43 String yearEpoch = access.getYearEpoch(); | 43 String yearEpoch = access.getYearEpoch(); |
44 FLYSArtifact[][] artifacts = access.getDifferenceArtifacts(); | 44 D4EArtifact[][] artifacts = access.getDifferenceArtifacts(); |
45 | 45 |
46 logger.debug("got artifacts: " + artifacts.length + "; " + artifacts[0].length); | 46 logger.debug("got artifacts: " + artifacts.length + "; " + artifacts[0].length); |
47 if (river == null) { | 47 if (river == null) { |
48 // TODO: i18n | 48 // TODO: i18n |
49 addProblem("minfo.missing.river"); | 49 addProblem("minfo.missing.river"); |
97 | 97 |
98 return new CalculationResult(); | 98 return new CalculationResult(); |
99 } | 99 } |
100 | 100 |
101 private BedHeight[] getHeightPair( | 101 private BedHeight[] getHeightPair( |
102 FLYSArtifact art1, | 102 D4EArtifact art1, |
103 FLYSArtifact art2, | 103 D4EArtifact art2, |
104 String type | 104 String type |
105 ) { | 105 ) { |
106 int id1 = BedDifferencesAccess.getHeightId(art1); | 106 int id1 = BedDifferencesAccess.getHeightId(art1); |
107 int id2 = BedDifferencesAccess.getHeightId(art2); | 107 int id2 = BedDifferencesAccess.getHeightId(art2); |
108 | 108 |