comparison artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java @ 6905:1b35b2ddfc28

Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 22 Aug 2013 23:31:38 +0200
parents a0078e5e3b39
children e0311aa32efb
comparison
equal deleted inserted replaced
6904:d710bd3df387 6905:1b35b2ddfc28
12 12
13 import org.apache.log4j.Logger; 13 import org.apache.log4j.Logger;
14 14
15 import org.jfree.data.xy.XYSeries; 15 import org.jfree.data.xy.XYSeries;
16 16
17 import org.w3c.dom.Document;
18
19 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; 17 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
20 import org.dive4elements.artifactdatabase.state.Facet; 18 import org.dive4elements.artifactdatabase.state.Facet;
21 19
22 import org.dive4elements.river.artifacts.D4EArtifact; 20 import org.dive4elements.river.artifacts.D4EArtifact;
23 21
31 import org.dive4elements.river.jfree.Bounds; 29 import org.dive4elements.river.jfree.Bounds;
32 import org.dive4elements.river.jfree.DoubleBounds; 30 import org.dive4elements.river.jfree.DoubleBounds;
33 import org.dive4elements.river.jfree.RiverAnnotation; 31 import org.dive4elements.river.jfree.RiverAnnotation;
34 import org.dive4elements.river.jfree.StyledXYSeries; 32 import org.dive4elements.river.jfree.StyledXYSeries;
35 33
34 import org.dive4elements.river.themes.ThemeDocument;
36 import org.dive4elements.river.utils.RiverUtils; 35 import org.dive4elements.river.utils.RiverUtils;
37 36
38 37
39 /** 38 /**
40 * An OutGenerator that generates flow velocity curves. 39 * An OutGenerator that generates flow velocity curves.
207 * @param attr theme for facet 206 * @param attr theme for facet
208 * @param visible Whether this facets data is actually visible or not. 207 * @param visible Whether this facets data is actually visible or not.
209 */ 208 */
210 public void doOut( 209 public void doOut(
211 ArtifactAndFacet artifactAndFacet, 210 ArtifactAndFacet artifactAndFacet,
212 Document attr, 211 ThemeDocument attr,
213 boolean visible 212 boolean visible
214 ) { 213 ) {
215 String name = artifactAndFacet.getFacetName(); 214 String name = artifactAndFacet.getFacetName();
216 215
217 logger.debug("FlowVelocityGenerator.doOut: " + name); 216 logger.debug("FlowVelocityGenerator.doOut: " + name);
368 367
369 368
370 private void doBedQualityLoadDiameter( 369 private void doBedQualityLoadDiameter(
371 BedloadDiameterResult data, 370 BedloadDiameterResult data,
372 ArtifactAndFacet aandf, 371 ArtifactAndFacet aandf,
373 Document attr, 372 ThemeDocument attr,
374 boolean visible) { 373 boolean visible) {
375 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr); 374 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr);
376 StyledSeriesBuilder.addPoints(series, data.getDiameterData(), true); 375 StyledSeriesBuilder.addPoints(series, data.getDiameterData(), true);
377 376
378 addAxisSeries(series, YAXIS.D.idx, visible); 377 addAxisSeries(series, YAXIS.D.idx, visible);
380 379
381 380
382 private void doBedQualityTopLayerOut( 381 private void doBedQualityTopLayerOut(
383 BedDiameterResult data, 382 BedDiameterResult data,
384 ArtifactAndFacet aandf, 383 ArtifactAndFacet aandf,
385 Document attr, 384 ThemeDocument attr,
386 boolean visible) { 385 boolean visible) {
387 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr); 386 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr);
388 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true); 387 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true);
389 addAxisSeries(series, YAXIS.D.idx, visible); 388 addAxisSeries(series, YAXIS.D.idx, visible);
390 } 389 }
391 390
392 391
393 private void doBedQualitySubLayerOut( 392 private void doBedQualitySubLayerOut(
394 BedDiameterResult data, 393 BedDiameterResult data,
395 ArtifactAndFacet aandf, 394 ArtifactAndFacet aandf,
396 Document attr, 395 ThemeDocument attr,
397 boolean visible 396 boolean visible
398 ) { 397 ) {
399 logger.debug("Do beddiametersubout"); 398 logger.debug("Do beddiametersubout");
400 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr); 399 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr);
401 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true); 400 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true);
414 * @param visible The visibility of the curve. 413 * @param visible The visibility of the curve.
415 */ 414 */
416 protected void doMainChannelOut( 415 protected void doMainChannelOut(
417 FlowVelocityData data, 416 FlowVelocityData data,
418 ArtifactAndFacet aandf, 417 ArtifactAndFacet aandf,
419 Document theme, 418 ThemeDocument theme,
420 boolean visible 419 boolean visible
421 ) { 420 ) {
422 logger.debug("FlowVelocityGenerator.doMainChannelOut"); 421 logger.debug("FlowVelocityGenerator.doMainChannelOut");
423 422
424 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); 423 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
431 430
432 /** Handle VWQKms. */ 431 /** Handle VWQKms. */
433 protected void doVPointOut ( 432 protected void doVPointOut (
434 Object data, 433 Object data,
435 ArtifactAndFacet aandf, 434 ArtifactAndFacet aandf,
436 Document theme, 435 ThemeDocument theme,
437 boolean visible 436 boolean visible
438 ) { 437 ) {
439 logger.debug("FlowVelocityGenerator.doVPointOut"); 438 logger.debug("FlowVelocityGenerator.doVPointOut");
440 439
441 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); 440 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
454 * Add items to dataseries which describes the differences. 453 * Add items to dataseries which describes the differences.
455 */ 454 */
456 protected void doTotalChannelOut( 455 protected void doTotalChannelOut(
457 FlowVelocityData data, 456 FlowVelocityData data,
458 ArtifactAndFacet aandf, 457 ArtifactAndFacet aandf,
459 Document theme, 458 ThemeDocument theme,
460 boolean visible 459 boolean visible
461 ) { 460 ) {
462 logger.debug("FlowVelocityGenerator.doTotalChannelOut"); 461 logger.debug("FlowVelocityGenerator.doTotalChannelOut");
463 462
464 if (data == null) { 463 if (data == null) {
484 * @param visible The visibility of the curve. 483 * @param visible The visibility of the curve.
485 */ 484 */
486 protected void doQOut( 485 protected void doQOut(
487 FlowVelocityData data, 486 FlowVelocityData data,
488 ArtifactAndFacet aandf, 487 ArtifactAndFacet aandf,
489 Document theme, 488 ThemeDocument theme,
490 boolean visible 489 boolean visible
491 ) { 490 ) {
492 logger.debug("FlowVelocityGenerator.doTauOut"); 491 logger.debug("FlowVelocityGenerator.doQOut");
493 492
494 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); 493 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
495 494
496 StyledSeriesBuilder.addPoints(series, data.getQPoints(), true); 495 StyledSeriesBuilder.addPoints(series, data.getQPoints(), true);
497 496
507 * @param visible The visibility of the curve. 506 * @param visible The visibility of the curve.
508 */ 507 */
509 protected void doTauOut( 508 protected void doTauOut(
510 FlowVelocityData data, 509 FlowVelocityData data,
511 ArtifactAndFacet aandf, 510 ArtifactAndFacet aandf,
512 Document theme, 511 ThemeDocument theme,
513 boolean visible 512 boolean visible
514 ) { 513 ) {
515 logger.debug("FlowVelocityGenerator.doTauOut"); 514 logger.debug("FlowVelocityGenerator.doTauOut");
516 515
517 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); 516 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
541 * Do Area out. 540 * Do Area out.
542 * @param theme styling information. 541 * @param theme styling information.
543 * @param visible whether or not visible. 542 * @param visible whether or not visible.
544 */ 543 */
545 protected void doArea( 544 protected void doArea(
546 Object o, 545 Object o,
547 ArtifactAndFacet aandf, 546 ArtifactAndFacet aandf,
548 Document theme, 547 ThemeDocument theme,
549 boolean visible 548 boolean visible
550 ) { 549 ) {
551 logger.debug("FlowVelocityGenerator.doArea"); 550 logger.debug("FlowVelocityGenerator.doArea");
552 logger.warn("TODO: Implement FlowVelocityGenerator.doArea"); 551 logger.warn("TODO: Implement FlowVelocityGenerator.doArea");
553 } 552 }
554 } 553 }

http://dive4elements.wald.intevation.org