Actions
feature request #7957
closedAdd types for taxon description (as EnumSet)
Start date:
Due date:
% Done:
100%
Estimated time:
Severity:
normal
Description
When working on the Character Matrix there are 3 types of taxon descriptions:
- default taxon description
- taxon descriptions from literature
- aggregated taxon descriptions
To be able to differentiate between them we need two more marker types for "literature" and "default".
Currently we use:
MarkerType.COMPUTED()
for "aggregated"MarkerType.IN_BIBLIOGRAPHY()
for "literature"MarkerType.TO_BE_CHECKED()
for "default"
Current usage with hibernate Criterion (see DescriptionDaoImpl
):
private void addDescriptionTypesCriterion(Set<DescriptionType> descriptionTypes, Criteria criteria) {
if(descriptionTypes != null && !descriptionTypes.isEmpty()) {
Set<Criterion> typeCriteria = new HashSet<>();
for (DescriptionType descriptionType : descriptionTypes) {
typeCriteria.add(Restrictions.sqlRestriction("{alias}.types like '%"+descriptionType.getKey()+"%'"));
}
criteria.add(Restrictions.and(typeCriteria.toArray(new Criterion[]{})));
}
}
Related issues
Actions