use of eu.etaxonomy.cdm.api.service.dto.TypeDesignationStatusFilter in project cdmlib by cybertaxonomy.
the class NameServiceImpl method getTypeDesignationStatusFilterTerms.
@Override
public Collection<TypeDesignationStatusFilter> getTypeDesignationStatusFilterTerms(List<Language> preferredLanguages) {
List<TypeDesignationStatusBase> termList = typeDesignationDao.getTypeDesignationStatusInUse();
Map<String, TypeDesignationStatusFilter> filterMap = new HashMap<>();
for (TypeDesignationStatusBase term : termList) {
TypeDesignationStatusFilter filter = new TypeDesignationStatusFilter(term, preferredLanguages, true);
String key = filter.getKey();
if (filterMap.containsKey(key)) {
filterMap.get(key).addStatus(term);
} else {
filterMap.put(key, filter);
}
}
return filterMap.values();
}
Aggregations