Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixAvSectorFacet.java @ 3131:bac0b2721451
FixA: Added delta W(t) chart in fix analysis.
flys-artifacts/trunk@4732 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 20 Jun 2012 16:10:59 +0000 |
parents | 960307cf2adc |
children | 1b9f791937c3 |
comparison
equal
deleted
inserted
replaced
3130:0dd569e9b9f1 | 3131:bac0b2721451 |
---|---|
85 logger.warn("No analysis periods specified!"); | 85 logger.warn("No analysis periods specified!"); |
86 return null; | 86 return null; |
87 } | 87 } |
88 | 88 |
89 QWD[] qwdData = null; | 89 QWD[] qwdData = null; |
90 if (index < periods.length) { | 90 int sectorNdx = index & 3; |
91 qwdData = periods[index].getQSectorAverages(); | 91 int periodNdx = index >> 2; |
92 | |
93 if (periodNdx < periods.length) { | |
94 qwdData = periods[periodNdx].getQSectorAverages(); | |
92 } | 95 } |
93 | 96 |
94 if (logger.isDebugEnabled()) { | 97 if (logger.isDebugEnabled()) { |
95 int resSize = qwdData != null ? qwdData.length : -1; | 98 int resSize = qwdData != null ? qwdData.length : -1; |
96 logger.debug("Found " + resSize + " result elements."); | 99 logger.debug("Found " + resSize + " result elements."); |
97 } | 100 } |
98 | 101 |
99 return qwdData; | 102 if (qwdData == null) { |
103 return null; | |
104 } | |
105 return qwdData[sectorNdx]; | |
100 } | 106 } |
101 else { | 107 else { |
102 logger.warn("Artifact is no instance of FLYSArtifact."); | 108 logger.warn("Artifact is no instance of FLYSArtifact."); |
103 return null; | 109 return null; |
104 } | 110 } |