Project

General

Profile

Actions

feature request #7957

closed

Add types for taxon description (as EnumSet)

Added by Patrick Plitzner over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Highest
Category:
cdm
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Tags:

Description

When working on the Character Matrix there are 3 types of taxon descriptions:

  1. default taxon description
  2. taxon descriptions from literature
  3. 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

Related to EDIT - feature request #8128: Add indicator for feature facts and/or vocabularies which description type they supportDuplicateAndreas Müller

Actions
Related to EDIT - task #10109: Investigate best practice for HQL with enumset NewAndreas Müller

Actions
Precedes EDIT - feature request #8471: Computed descriptions should be disabled in TaxEditorClosedKatja Luther

Actions
Precedes EDIT - feature request #8472: Transmission engine for distribution aggregation needs to be adapted to new DescriptionBase.typesClosedAndreas Müller

Actions
Actions

Also available in: Atom PDF