comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityInterpolFacet.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents 4b00ee858964
children 0a5239a1e46e
comparison
equal deleted inserted replaced
8855:d7c005e12af0 8856:5e38e2924c07
25 */ 25 */
26 public class BedQualityInterpolFacet extends DataFacet { 26 public class BedQualityInterpolFacet extends DataFacet {
27 27
28 private static final long serialVersionUID = 1L; 28 private static final long serialVersionUID = 1L;
29 29
30 private static Logger log = Logger.getLogger(BedQualityInterpolFacet.class); 30 private static Logger log = Logger.getLogger(
31 BedQualityInterpolFacet.class);
31 32
32 private String valueName; /* Name of the ResultValue underlying this facet */ 33 private String valueName; /* Name of ResultValue underlying this facet */
33 private String valueType; /* Type of the ResultValue underlying this facet */ 34 private String valueType; /* Type of ResultValue underlying this facet */
34 35
35 public BedQualityInterpolFacet() { 36 public BedQualityInterpolFacet() {
36 // required for clone operation deepCopy() 37 // required for clone operation deepCopy()
37 } 38 }
38 39
39 public BedQualityInterpolFacet(int idx, String name, String description, 40 public BedQualityInterpolFacet(
40 ComputeType type, String stateId, String hash, String valueName, String valueType) { 41 int idx,
42 String name,
43 String description,
44 ComputeType type,
45 String stateId,
46 String hash,
47 String valueName,
48 String valueType
49 ) {
41 super(idx, name, description, type, hash, stateId); 50 super(idx, name, description, type, hash, stateId);
42 this.valueName = valueName; 51 this.valueName = valueName;
43 this.valueType = valueType; 52 this.valueType = valueType;
44 this.metaData.put("X", "chart.longitudinal.section.xaxis.label"); 53 this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
45 if (!valueName.equals("porosity") && !valueName.equals("density")) { 54 if (!valueName.equals("porosity") && !valueName.equals("density")) {
46 this.metaData.put("Y", "chart.bedquality.yaxis.label.diameter"); 55 this.metaData.put("Y", "chart.bedquality.yaxis.label.diameter");
47 } else { 56 } else {
48 this.metaData.put("Y", "chart.bedquality.yaxis.label." + valueName); 57 this.metaData.put(
58 "Y", "chart.bedquality.yaxis.label." + valueName);
49 } 59 }
50 } 60 }
51 61
52 @Override 62 @Override
53 public Object getData(Artifact artifact, CallContext context) { 63 public Object getData(Artifact artifact, CallContext context) {
60 stateId, type, false); 70 stateId, type, false);
61 71
62 int ndx = index >> 8; 72 int ndx = index >> 8;
63 73
64 BedQualityResultValue value = 74 BedQualityResultValue value =
65 ((BedQualityResult[]) res.getData())[ndx].getValue(valueName, valueType); 75 ((BedQualityResult[]) res.getData())[ndx].getValue(
76 valueName, valueType);
66 77
67 if (value == null) { 78 if (value == null) {
68 /* Other facets check this so we do too */ 79 /* Other facets check this so we do too */
69 return null; 80 return null;
70 } 81 }

http://dive4elements.wald.intevation.org