Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationGenerator.java @ 3310:8af1111af180
SQ relation: More fixes.
flys-artifacts/trunk@4999 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 13 Jul 2012 15:41:56 +0000 |
parents | e52a3b62fc20 |
children | 53ad37c8abe3 |
comparison
equal
deleted
inserted
replaced
3309:fd3243d892a9 | 3310:8af1111af180 |
---|---|
135 logger.debug("doSQCurveOut: " + desc); | 135 logger.debug("doSQCurveOut: " + desc); |
136 | 136 |
137 Facet f = artifactAndFacet.getFacet(); | 137 Facet f = artifactAndFacet.getFacet(); |
138 SQFunction func = (SQFunction) artifactAndFacet.getData(context); | 138 SQFunction func = (SQFunction) artifactAndFacet.getData(context); |
139 | 139 |
140 if (func == null) { | |
141 return; | |
142 } | |
143 | |
140 XYSeries series = JFreeUtil.sampleFunction2D( | 144 XYSeries series = JFreeUtil.sampleFunction2D( |
141 func.getFunction(), | 145 func.getFunction(), |
142 attr, | 146 attr, |
143 desc, | 147 desc, |
144 10, | 148 500, |
145 func.getMinQ(), | 149 func.getMinQ(), |
146 func.getMaxQ()); | 150 func.getMaxQ()); |
147 | 151 |
148 if (logger.isDebugEnabled()) { | 152 if (logger.isDebugEnabled()) { |
149 logger.debug("Series '" + desc + "' has " | 153 logger.debug("Series '" + desc + "' has " |
167 String desc = artifactAndFacet.getFacetDescription(); | 171 String desc = artifactAndFacet.getFacetDescription(); |
168 logger.debug("doSQOut: " + desc); | 172 logger.debug("doSQOut: " + desc); |
169 | 173 |
170 Facet f = artifactAndFacet.getFacet(); | 174 Facet f = artifactAndFacet.getFacet(); |
171 SQ[] sqs = (SQ[]) artifactAndFacet.getData(context); | 175 SQ[] sqs = (SQ[]) artifactAndFacet.getData(context); |
176 if (sqs == null) { | |
177 logger.debug("No SQs found for facet"); | |
178 return; | |
179 } | |
172 XYSeries series = new StyledXYSeries(desc, attr); | 180 XYSeries series = new StyledXYSeries(desc, attr); |
173 | 181 |
174 for (SQ sq: sqs) { | 182 for (SQ sq: sqs) { |
175 series.add(sq.getQ(), sq.getS()); | 183 series.add(sq.getQ(), sq.getS()); |
176 } | 184 } |