Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/process/BedDiffHeightYearProcessor.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 | 8dbb969091c5 |
children | 1cc7653ca84f 0a5239a1e46e |
comparison
equal
deleted
inserted
replaced
8855:d7c005e12af0 | 8856:5e38e2924c07 |
---|---|
48 Map<String, String> metaData = bundle.getFacet().getMetaData( | 48 Map<String, String> metaData = bundle.getFacet().getMetaData( |
49 bundle.getArtifact(), context); | 49 bundle.getArtifact(), context); |
50 | 50 |
51 if (!(data instanceof double[][])) { | 51 if (!(data instanceof double[][])) { |
52 // Should not happen if canHandle is correct | 52 // Should not happen if canHandle is correct |
53 log.error("Can't process " + data.getClass().getName() + " objects"); | 53 log.error("Can't process " + data.getClass().getName() |
54 + " objects"); | |
54 return; | 55 return; |
55 } | 56 } |
56 | 57 |
57 double[][] bData = (double[][]) data; | 58 double[][] bData = (double[][]) data; |
58 | 59 |
59 StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme); | 60 StyledXYSeries series = |
61 new StyledXYSeries(bundle.getFacetDescription(), theme); | |
60 series.putMetaData(metaData, bundle.getArtifact(), context); | 62 series.putMetaData(metaData, bundle.getArtifact(), context); |
61 | 63 |
62 StyledSeriesBuilder.addPoints(series, bData, false, GAP_TOLERANCE); | 64 StyledSeriesBuilder.addPoints(series, bData, false, GAP_TOLERANCE); |
63 | 65 |
64 generator.addAxisSeries(series, axisName, visible); | 66 generator.addAxisSeries(series, axisName, visible); |
75 CallContext context = generator.getCallContext(); | 77 CallContext context = generator.getCallContext(); |
76 Object data = bundle.getData(context); | 78 Object data = bundle.getData(context); |
77 | 79 |
78 if (!(data instanceof double[][])) { | 80 if (!(data instanceof double[][])) { |
79 // Should not happen if canHandle is correct | 81 // Should not happen if canHandle is correct |
80 log.error("Can't process " + data.getClass().getName() + " objects"); | 82 log.error("Can't process " + data.getClass().getName() |
83 + " objects"); | |
81 return; | 84 return; |
82 } | 85 } |
83 | 86 |
84 double[][] bData = (double[][]) data; | 87 double[][] bData = (double[][]) data; |
85 XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme); | 88 XYSeries series = |
89 new StyledXYSeries(bundle.getFacetDescription(), theme); | |
86 StyledSeriesBuilder.addPoints(series, bData, false, GAP_TOLERANCE); | 90 StyledSeriesBuilder.addPoints(series, bData, false, GAP_TOLERANCE); |
87 | 91 |
88 generator.addAxisSeries(series, index, visible); | 92 generator.addAxisSeries(series, index, visible); |
89 } | 93 } |
90 | 94 |
91 @Override | 95 @Override |
92 public boolean canHandle(String facetType) { | 96 public boolean canHandle(String facetType) { |
93 return BED_DIFFERENCE_HEIGHT_YEAR.equals(facetType) // from BedDiffYearHeight | 97 return BED_DIFFERENCE_HEIGHT_YEAR.equals(facetType) |
94 || BED_DIFFERENCE_HEIGHT_YEAR_FILTERED.equals(facetType) // from BedDiffYearHeight | 98 // from BedDiffYearHeight |
95 ; | 99 || BED_DIFFERENCE_HEIGHT_YEAR_FILTERED.equals(facetType); |
100 // from BedDiffYearHeight | |
96 } | 101 } |
97 | 102 |
98 | 103 |
99 @Override | 104 @Override |
100 public String getAxisLabel(DiagramGenerator generator) { | 105 public String getAxisLabel(DiagramGenerator generator) { |