bug #7313
closedeu.etaxonomy.cdm.dataInserter.RegistrationRequiredDataInserter add all terms to vocabulary
100%
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
Updated by Andreas Kohlbecker almost 6 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)
Updated by Andreas Kohlbecker almost 6 years ago
- Priority changed from New to Priority14
Updated by Andreas Kohlbecker over 5 years ago
- Status changed from New to In Progress
- Priority changed from Priority14 to Highest
Updated by Andreas Kohlbecker over 5 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 50
Applied in changeset cdm-vaadin|65d2936da23181f34fe6561dd4ae55c21c81d21b.
Updated by Andreas Kohlbecker over 5 years ago
- Assignee changed from Andreas Kohlbecker to Andreas Müller
completed.
Andreas Müller: please review my implementation
Updated by Andreas Müller over 5 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.
Updated by Andreas Kohlbecker over 5 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.
Updated by Andreas Kohlbecker over 5 years ago
- Copied to bug #7519: Avoid static terms added
Updated by Andreas Kohlbecker over 5 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.
Updated by Andreas Kohlbecker over 5 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
Updated by Andreas Müller almost 4 years ago
- Related to bug #8995: Guarantee a term always has a vocabulary added