Mercurial > dive4elements > river
changeset 3324:290189f07809
Added filter for annotation names.
flys-backend/trunk@4634 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 11 Jun 2012 12:17:11 +0000 |
parents | 07c96cd39360 |
children | 96bd63281af7 |
files | flys-backend/ChangeLog flys-backend/src/main/java/de/intevation/flys/model/FastAnnotations.java |
diffstat | 2 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-backend/ChangeLog Fri Jun 08 13:42:57 2012 +0000 +++ b/flys-backend/ChangeLog Mon Jun 11 12:17:11 2012 +0000 @@ -1,3 +1,8 @@ +2012-06-11 Raimund Renkert <raimund.renkert@intevation.de> + + * src/main/java/de/intevation/flys/model/FastAnnotations.java: + Added filter for annotation names. + 2012-06-08 Felix Wolfsteller <felix.wolfstellre@intevation.de> * src/main/java/de/intevation/flys/model/FastAnnotations.java:
--- a/flys-backend/src/main/java/de/intevation/flys/model/FastAnnotations.java Fri Jun 08 13:42:57 2012 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/FastAnnotations.java Mon Jun 11 12:17:11 2012 +0000 @@ -142,6 +142,19 @@ } // interface Filter + public static class NameFilter implements Filter{ + + private String name; + + public NameFilter (String name) { + this.name = name; + } + + public boolean accept (Annotation annotation) { + return annotation.getName().contains(name); + } + } + public static final Filter ALL = new Filter() { @Override public boolean accept(Annotation annotation) {