Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/fixings/DeltaWtExporter.java @ 9360:ddcd52d239cd
Outliers in fixation calculation are now shown within the other 'B' event themes and get a separate symbol (triangle).
Removed old outliers theme.
Also consider showpoints property.
Also consider pointsize property.
author | gernotbelger |
---|---|
date | Wed, 01 Aug 2018 17:13:52 +0200 |
parents | a49fe0ebb297 |
children | 9744ce3c3853 |
comparison
equal
deleted
inserted
replaced
9359:df6f1b5806f6 | 9360:ddcd52d239cd |
---|---|
105 if (!(data instanceof FixAnalysisResult)) { | 105 if (!(data instanceof FixAnalysisResult)) { |
106 log.warn("Invalid data stored in result."); | 106 log.warn("Invalid data stored in result."); |
107 } | 107 } |
108 final FixAnalysisResult result = (FixAnalysisResult) data; | 108 final FixAnalysisResult result = (FixAnalysisResult) data; |
109 this.analysisPeriods.add(result.getAnalysisPeriods()); | 109 this.analysisPeriods.add(result.getAnalysisPeriods()); |
110 this.referenceEvents.add(result.getReferenced()); | 110 this.referenceEvents.add(result.getFixings()); |
111 } | 111 } |
112 | 112 |
113 @Override | 113 @Override |
114 protected void writeCSVData(final CSVWriter writer) throws IOException { | 114 protected void writeCSVData(final CSVWriter writer) throws IOException { |
115 | |
116 final boolean debug = log.isDebugEnabled(); | |
117 | 115 |
118 writeCSVHeader(writer); | 116 writeCSVHeader(writer); |
119 | 117 |
120 final TreeMap<Double, ArrayList<String[]>> sorted = getRows(); | 118 final TreeMap<Double, ArrayList<String[]>> sorted = getRows(); |
121 for (final ArrayList<String[]> list : sorted.values()) { | 119 for (final ArrayList<String[]> list : sorted.values()) { |
152 sorted.put(km, list); | 150 sorted.put(km, list); |
153 } | 151 } |
154 | 152 |
155 final String kmS = kmF.format(kmEntry.getKm()); | 153 final String kmS = kmF.format(kmEntry.getKm()); |
156 for (final QWD qwd : kmEntry.getValue()) { | 154 for (final QWD qwd : kmEntry.getValue()) { |
157 final String deltaWS = dwF.format(qwd.getDeltaW()); | 155 if( !qwd.isOutlier() ) { |
158 final String qS = qF.format(qwd.getQ()); | 156 final String deltaWS = dwF.format(qwd.getDeltaW()); |
159 final String wS = wF.format(qwd.getW()); | 157 final String qS = qF.format(qwd.getQ()); |
160 final String dateS = dF.format(qwd.getDate()); | 158 final String wS = wF.format(qwd.getW()); |
161 | 159 final String dateS = dF.format(qwd.getDate()); |
162 list.add(new String[] { kmS, dateS, qS, wS, referenceS, deltaWS }); | 160 |
163 } | 161 list.add(new String[] { kmS, dateS, qS, wS, referenceS, deltaWS }); |
164 } | 162 } |
165 } | 163 } |
166 | 164 } |
167 // if (debug) { | 165 } |
168 // log.debug("AnalysisPeriods: " + this.analysisPeriods.size()); | |
169 // } | |
170 | 166 |
171 final String analysisTemplate = getAnalysisTemplate(); | 167 final String analysisTemplate = getAnalysisTemplate(); |
172 | 168 |
173 for (final KMIndex<AnalysisPeriod[]> periods : this.analysisPeriods) { | 169 for (final KMIndex<AnalysisPeriod[]> periods : this.analysisPeriods) { |
174 | 170 |