comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java @ 5379:61bf64b102bc mapgenfix

Merge with default branch
author Christian Lins <christian.lins@intevation.de>
date Fri, 22 Mar 2013 11:25:54 +0100
parents 61f4d4164a30
children 0cab1c884e72
comparison
equal deleted inserted replaced
5175:cfc5540a4eec 5379:61bf64b102bc
18 import org.hibernate.type.StandardBasicTypes; 18 import org.hibernate.type.StandardBasicTypes;
19 19
20 import org.w3c.dom.Document; 20 import org.w3c.dom.Document;
21 import org.w3c.dom.Element; 21 import org.w3c.dom.Element;
22 22
23
24 /** Generate Fixings Table chart. */
23 public class FixingsOverview 25 public class FixingsOverview
24 implements Serializable 26 implements Serializable
25 { 27 {
26 private static Logger log = Logger.getLogger(FixingsOverview.class); 28 private static Logger log = Logger.getLogger(FixingsOverview.class);
27 29
642 644
643 @Override 645 @Override
644 public boolean accept(Fixing.Column column) { 646 public boolean accept(Fixing.Column column) {
645 for (SectorRange s: column.getSectors()) { 647 for (SectorRange s: column.getSectors()) {
646 int v = s.getSector(); 648 int v = s.getSector();
647 if (v >= min && v <= max) { 649 if (v < min || v > max) {
648 return true; 650 return false;
649 } 651 }
650 } 652 }
651 return false; 653 return true;
652 } 654 }
653 } // class SectorRangeFilter 655 } // class SectorRangeFilter
654 656
655 public static class KmFilter implements Fixing.Filter { 657 public static class KmFilter implements Fixing.Filter {
656 658
726 } 728 }
727 729
728 return gauges; 730 return gauges;
729 } 731 }
730 732
733 /** Populate document with fixings, filtered by range and filter. */
731 public void generateOverview( 734 public void generateOverview(
732 Document document, 735 Document document,
733 Range range, 736 Range range,
734 Fixing.Filter filter 737 Fixing.Filter filter
735 ) { 738 ) {

http://dive4elements.wald.intevation.org