Mercurial > hg > anteater
comparison src/de/mpiwg/anteater/results/filter/ApplicantExistsFilter.java @ 0:036535fcd179
anteater
author | jdamerow |
---|---|
date | Fri, 14 Sep 2012 10:30:43 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:036535fcd179 |
---|---|
1 package de.mpiwg.anteater.results.filter; | |
2 | |
3 import java.util.List; | |
4 | |
5 import de.mpiwg.anteater.results.ApplicantResult; | |
6 import de.mpiwg.anteater.results.LocationResult; | |
7 import de.mpiwg.anteater.results.SpeciesScientificResult; | |
8 import de.mpiwg.anteater.text.TextInformation; | |
9 | |
10 /** | |
11 * This filter removes all found places or species of a text if there is no | |
12 * applicant found. | |
13 * | |
14 * @author Julia Damerow | |
15 * | |
16 */ | |
17 public class ApplicantExistsFilter implements IResultFilter { | |
18 | |
19 @Override | |
20 public void filterElements(TextInformation info, | |
21 List<ApplicantResult> applicantResults, | |
22 List<SpeciesScientificResult> speciesResults, | |
23 List<LocationResult> locationResults) { | |
24 if (applicantResults == null || applicantResults.isEmpty()) { | |
25 speciesResults.clear(); | |
26 locationResults.clear(); | |
27 applicantResults.clear(); | |
28 } | |
29 | |
30 } | |
31 | |
32 } |