Project

General

Profile

Actions

bug #7313

closed

eu.etaxonomy.cdm.dataInserter.RegistrationRequiredDataInserter add all terms to vocabulary

Added by Andreas Kohlbecker almost 5 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Severity:
normal
Found in Version:
Tags:

Description

Im eu.etaxonomy.cdm.dataInserter.RegistrationRequiredDataInserter werden KindOfUnitTerms angelegt:

if(repo.getTermService().find(KindOfUnitTerms.SPECIMEN().getUuid()) == null){
repo.getTermService().save(KindOfUnitTerms.SPECIMEN());
}
if(repo.getTermService().find(KindOfUnitTerms.PUBLISHED_IMAGE().getUuid()) == null){
repo.getTermService().save(KindOfUnitTerms.PUBLISHED_IMAGE());
}
if(repo.getTermService().find(KindOfUnitTerms.UNPUBLISHED_IMAGE().getUuid()) == null){
repo.getTermService().save(KindOfUnitTerms.UNPUBLISHED_IMAGE());
}
if(repo.getTermService().find(KindOfUnitTerms.CULTURE_METABOLIC_INACTIVE().getUuid()) == null){
repo.getTermService().save(KindOfUnitTerms.CULTURE_METABOLIC_INACTIVE());
}

Die müssen in ein Vocab.

a.mueller:

Ja, das sollte man dann in den Inserter mit aufnehmen.
Möglichst die UUID von dem voc aus Phycobank nehmen, damit immer die selbe verwendet wird.


Related issues

Related to EDIT - bug #8995: Guarantee a term always has a vocabularyNewAndreas Müller

Actions
Copied to EDIT - bug #7519: Avoid static termsNewAndreas Kohlbecker

Actions
Actions #1

Updated by Andreas Kohlbecker almost 5 years ago

  • Description updated (diff)

The original description was referring to terms which have been created during IAPT import, which has already be run and which will never be used again. So the only terms that still need to be associated with Vocabularies are are the KindOfUnitTerms (See new issue description)

Actions #2

Updated by Andreas Kohlbecker almost 5 years ago

  • Priority changed from New to Priority14
Actions #3

Updated by Andreas Kohlbecker over 4 years ago

  • Status changed from New to In Progress
  • Priority changed from Priority14 to Highest
Actions #4

Updated by Andreas Kohlbecker over 4 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 50
Actions #5

Updated by Andreas Kohlbecker over 4 years ago

  • Assignee changed from Andreas Kohlbecker to Andreas Müller

completed.

Andreas Müller: please review my implementation

Actions #6

Updated by Andreas Müller over 4 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Andreas Kohlbecker

This should work.

Personally I would first load/save the voc and then check the terms and add each term which is not yet attached to a vocabulary. This avoids saving a term without a voc at any time (maybe in future it will be forced). However, this is minor.

We could also remove "txStatus.flush();" before commit as it is redundant.

Final note: the static terms are often used only to retrieve the uuid. Why not making the static uuids public them self (while the static terms are probably not really needed). But this is also minor code styling.

Actions #7

Updated by Andreas Kohlbecker over 4 years ago

Andreas Müller wrote:

This should work.

Personally I would first load/save the voc and then check the terms and add each term which is not yet attached to a vocabulary. This avoids saving a term without a voc at any time (maybe in future it will be forced). However, this is minor.

Agreed and code modified.

We could also remove "txStatus.flush();" before commit as it is redundant.

Agreed and removed this line.

Final note: the static terms are often used only to retrieve the uuid. Why not making the static uuids public them self (while the static terms are probably not really needed). But this is also minor code styling.

The way terms are used is anyway a bit error prone and should be changed in the registration code. I will open another ticket for this.

Actions #8

Updated by Andreas Kohlbecker over 4 years ago

  • Copied to bug #7519: Avoid static terms added
Actions #9

Updated by Andreas Kohlbecker over 4 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 50 to 100

new ticket #7519 or remaining clean up.

I think wen can close this issue now. If you don't agree, Andreas, please reopen.

Actions #10

Updated by Andreas Kohlbecker over 4 years ago

  • Subject changed from eu.etaxonomy.cdm.dataInserter.RegistrationRequiredDataInserter add all term to vocabulary to eu.etaxonomy.cdm.dataInserter.RegistrationRequiredDataInserter add all terms to vocabulary
Actions #11

Updated by Andreas Müller almost 3 years ago

  • Related to bug #8995: Guarantee a term always has a vocabulary added
Actions

Also available in: Atom PDF