Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFacet.java @ 8094:bb0d35d32b01
Rename the SedimentLoadDataFacet and add deprection comment
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 15 Aug 2014 18:10:16 +0200 |
parents | 01f778f84330 |
children | f01c65261963 |
comparison
equal
deleted
inserted
replaced
8093:c27c04030a8d | 8094:bb0d35d32b01 |
---|---|
4 * This file is Free Software under the GNU AGPL (>=v3) | 4 * This file is Free Software under the GNU AGPL (>=v3) |
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the | 5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
6 * documentation coming with Dive4Elements River for details. | 6 * documentation coming with Dive4Elements River for details. |
7 */ | 7 */ |
8 | 8 |
9 // TODO Aheinecke 15.8.2014 | |
10 // This class was formerly known as SedimentLoadFacet. | |
11 // This class could be a base for the calculated sediment loads. | |
12 // If there is another facet for them remove this | |
13 // class altogether. | |
14 // | |
15 // The new SedimentLoadFacet is a new StaticFacet which only wraps | |
16 // static data from the database. | |
17 | |
9 package org.dive4elements.river.artifacts.model.minfo; | 18 package org.dive4elements.river.artifacts.model.minfo; |
10 | 19 |
11 import gnu.trove.TDoubleArrayList; | 20 import gnu.trove.TDoubleArrayList; |
12 | 21 |
13 import org.dive4elements.artifactdatabase.state.Facet; | 22 import org.dive4elements.artifactdatabase.state.Facet; |
36 | 45 |
37 import org.apache.log4j.Logger; | 46 import org.apache.log4j.Logger; |
38 | 47 |
39 | 48 |
40 /** Facet to access various sediment loads. */ | 49 /** Facet to access various sediment loads. */ |
41 public class SedimentLoadFacet | 50 public class SedimentLoadDataFacet |
42 extends DataFacet | 51 extends DataFacet |
43 { | 52 { |
44 /** Very own logger. */ | 53 /** Very own logger. */ |
45 private static Logger logger = Logger.getLogger(SedimentLoadFacet.class); | 54 private static Logger logger = Logger.getLogger(SedimentLoadDataFacet.class); |
46 | 55 |
47 /** Used as tolerance value when fetching measurement stations. */ | 56 /** Used as tolerance value when fetching measurement stations. */ |
48 private static double EPSILON = 1e-5; | 57 private static double EPSILON = 1e-5; |
49 | 58 |
50 | 59 |
51 public SedimentLoadFacet() { | 60 public SedimentLoadDataFacet() { |
52 } | 61 } |
53 | 62 |
54 public SedimentLoadFacet(int idx, String name, String description, | 63 public SedimentLoadDataFacet(int idx, String name, String description, |
55 ComputeType type, String stateId, String hash) { | 64 ComputeType type, String stateId, String hash) { |
56 super(idx, name, description, type, hash, stateId); | 65 super(idx, name, description, type, hash, stateId); |
57 this.metaData.put("X", "chart.longitudinal.section.xaxis.label"); | 66 this.metaData.put("X", "chart.longitudinal.section.xaxis.label"); |
58 this.metaData.put("Y", ""); | 67 this.metaData.put("Y", ""); |
59 } | 68 } |
217 else if (FacetTypes.IS.SEDIMENT_LOAD_TOTAL_LOAD(name)) | 226 else if (FacetTypes.IS.SEDIMENT_LOAD_TOTAL_LOAD(name)) |
218 return result.getTotalLoadData(); | 227 return result.getTotalLoadData(); |
219 else if (FacetTypes.IS.SEDIMENT_LOAD_TOTAL(name)) | 228 else if (FacetTypes.IS.SEDIMENT_LOAD_TOTAL(name)) |
220 return result.getTotalData(); | 229 return result.getTotalData(); |
221 else { | 230 else { |
222 logger.error("SedimentLoadFacet " + name + " cannot determine data type."); | 231 logger.error("SedimentLoadDataFacet " + name + " cannot determine data type."); |
223 return null; | 232 return null; |
224 } | 233 } |
225 } | 234 } |
226 | 235 |
227 /** Copy deeply. */ | 236 /** Copy deeply. */ |
228 @Override | 237 @Override |
229 public Facet deepCopy() { | 238 public Facet deepCopy() { |
230 SedimentLoadFacet copy = new SedimentLoadFacet(); | 239 SedimentLoadDataFacet copy = new SedimentLoadDataFacet(); |
231 copy.set(this); | 240 copy.set(this); |
232 copy.type = type; | 241 copy.type = type; |
233 copy.hash = hash; | 242 copy.hash = hash; |
234 copy.stateId = stateId; | 243 copy.stateId = stateId; |
235 return copy; | 244 return copy; |