Project

General

Profile

bug #7313

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

Added by Andreas Kohlbecker 9 months ago. Updated 6 months ago.

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

100%

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

Copied to Edit - bug #7519: Avoid static terms New 06/27/2018

Associated revisions

Revision 65d2936d (diff)
Added by Andreas Kohlbecker 6 months ago

fix #7313 adding kindOfUnit terms to new vocabulary

Revision cb00dde8 (diff)
Added by Andreas Kohlbecker 6 months ago

ref #7313 creating vocabulary before terms

History

#1 Updated by Andreas Kohlbecker 9 months 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)

#2 Updated by Andreas Kohlbecker 9 months ago

  • Priority changed from New to Priority14

#3 Updated by Andreas Kohlbecker 6 months ago

  • Status changed from New to In Progress
  • Priority changed from Priority14 to Highest

#4 Updated by Andreas Kohlbecker 6 months ago

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

#5 Updated by Andreas Kohlbecker 6 months ago

  • Assignee changed from Andreas Kohlbecker to Andreas Müller

completed.

@a.mueller: please review my implementation

#6 Updated by Andreas Müller 6 months 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.

#7 Updated by Andreas Kohlbecker 6 months 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.

#8 Updated by Andreas Kohlbecker 6 months ago

  • Copied to bug #7519: Avoid static terms added

#9 Updated by Andreas Kohlbecker 6 months 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.

#10 Updated by Andreas Kohlbecker 6 months 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

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)