Revision 44261f2e
Added by Patrick Plitzner about 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/SpecimenSelectionDialog.java | ||
---|---|---|
67 | 67 |
//set filter parameters |
68 | 68 |
TaxonNodeFilter filter = TaxonNodeFilter.NewRankInstance(workingSet.getMinRank(), workingSet.getMaxRank()); |
69 | 69 |
workingSet.getGeoFilter().forEach(area -> filter.orArea(area.getUuid())); |
70 |
workingSet.getTaxonSubtreeFilter().forEach(node -> filter.andTaxonNode(node));
|
|
70 |
workingSet.getTaxonSubtreeFilter().forEach(node -> filter.orSubtree(node));
|
|
71 | 71 |
|
72 | 72 |
ITaxonNodeService taxonNodeService = CdmStore.getService(ITaxonNodeService.class); |
73 | 73 |
List<UUID> filteredNodes = taxonNodeService.uuidList(filter); |
74 | 74 |
for (UUID uuid : filteredNodes) { |
75 | 75 |
//TODO implement occurrence service for taxon nodes |
76 |
// let it return UUIDAndTitlechace
|
|
76 |
// let it return UuidAndTitleCache
|
|
77 | 77 |
Taxon taxon = taxonNodeService.load(uuid).getTaxon(); |
78 | 78 |
if(taxon!=null){ |
79 |
specimens.addAll(CdmStore.getService(IOccurrenceService.class).listByAssociatedTaxon(SpecimenOrObservationBase.class, null, taxon, null, null, null, null, null)); |
|
79 |
FindOccurrencesConfigurator config = new FindOccurrencesConfigurator(); |
|
80 |
config.setAssociatedTaxonUuid(uuid); |
|
81 |
specimens.addAll(CdmStore.getService(IOccurrenceService.class).findByTitle(config).getRecords()); |
|
80 | 82 |
} |
81 | 83 |
} |
82 |
|
|
83 | 84 |
list.setInput(specimens); |
84 | 85 |
return composite; |
85 | 86 |
} |
Also available in: Unified diff
ref #7095 Fix area filter concatenation