Project

General

Profile

bug #6324

fix dozer mapping after removal of synonym relations and after using TaxonNode

Added by Andreas Kohlbecker almost 5 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Priority09
Category:
cdmlib-remote
Target version:
Start date:
01/11/2017
Due date:
% Done:

100%

Severity:
normal
Found in Version:
Tags:

Description

the the dozer mapping file /cdmlib-remote/src/main/resources/eu/etaxonomy/cdm/remote/dto/tdwg/mappings-deep.xml a per field mapping is defined for synonymRelations which is no longer valid after the removal of the synonym relations.

        <field>
          <a>synonymRelations</a>
          <b>hasRelationship</b>
          <a-hint>eu.etaxonomy.cdm.model.taxon.TaxonRelationship</a-hint>
          <b-hint>eu.etaxonomy.cdm.remote.dto.tdwg.voc.Relationship</b-hint>
        </field>

up to date dozer documentation if found at https://dozermapper.github.io/gitbook/


Related issues

Related to Edit - feature request #5974: Remove synonym relationships Closed 11/14/2016
Related to Edit - bug #5095: Fix failing dozer related tests Closed 07/06/2016
Related to Edit - task #9454: [DISCUSS] Decide on using dozer or similar frameworks for mapping DTOs New 02/05/2021
Duplicated by Edit - bug #6948: OAIPMH service broken by NPE with verb=ListIdentifiers & set=taxon Closed 09/14/2017

Associated revisions

Revision 2440f0fe (diff)
Added by Andreas Kohlbecker almost 5 years ago

ref #6324 adding FIXME comment

Revision 224d902d (diff)
Added by Andreas Kohlbecker about 4 years ago

fix #6948 ref #6324 commenting and removing broken dozer mapping for synonymRelations

Revision 8ed8ec11 (diff)
Added by Andreas Müller 8 months ago

ref #6324 add toString() methods to TDWG classes for debugging

Revision f278f036 (diff)
Added by Andreas Müller 8 months ago

fix #6324 fix synonym dozer mapping for TDWG Ontology

Revision 0f6bc0c7 (diff)
Added by Andreas Müller 8 months ago

fix #6324 fix taxon node dozer mapping for TDWG Ontology

Revision e141acff (diff)
Added by Andreas Müller 8 months ago

fix #6324 fix taxon node dozer mapping for TDWG Ontology (cont.) - add missing mappings-deep.xml changes

History

#1 Updated by Andreas Kohlbecker almost 5 years ago

#2 Updated by Andreas Kohlbecker almost 5 years ago

  • Subject changed from fix docker mapping after removal of synonym relations to fix dozer mapping after removal of synonym relations

#3 Updated by Andreas Kohlbecker about 4 years ago

  • Duplicated by bug #6948: OAIPMH service broken by NPE with verb=ListIdentifiers & set=taxon added

#4 Updated by Andreas Kohlbecker about 4 years ago

  • Status changed from New to In Progress
  • Priority changed from New to Highest
  • Target version changed from Unassigned CDM tickets to Release 4.10

#5 Updated by Andreas Kohlbecker about 4 years ago

  • Description updated (diff)

#6 Updated by Andreas Kohlbecker about 4 years ago

The issue #6948 is fixed now, but the broken mapping needs to be reestablished. So this issue needs to be kept open until this is done.

#7 Updated by Andreas Kohlbecker about 4 years ago

  • Tags set to oaipmh
  • Priority changed from Highest to Priority12
  • Target version changed from Release 4.10 to Reviewed Next Major Release

#8 Updated by Andreas Kohlbecker about 4 years ago

Even if duplicate issue is closed now this issue here can not yet be closed since its solution requires additional work.

#9 Updated by Andreas Müller over 2 years ago

  • Priority changed from Priority12 to Priority09

#10 Updated by Andreas Müller about 1 year ago

  • Related to bug #5095: Fix failing dozer related tests added

#11 Updated by Andreas Müller 8 months ago

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

#12 Updated by Andreas Müller 8 months ago

  • Target version changed from Reviewed Next Major Release to Release 5.21

#13 Updated by Andreas Müller 8 months ago

  • Subject changed from fix dozer mapping after removal of synonym relations to fix dozer mapping after removal of synonym relations and after using TaxonNode

The mapping was not only corrupt for synonyms but also for TaxonNodes as they were not mapped as taxon relations yet. There was no test finding this, yet.

I added mapping also for TaxonNode (a bit preliminary as the TDWG Ontology is not really used much and I didn't want to spend too much time on it) and changed the title of the ticket to include taxon nodes.

Please review.

#14 Updated by Andreas Müller 8 months ago

  • Related to task #9454: [DISCUSS] Decide on using dozer or similar frameworks for mapping DTOs added

#15 Updated by Andreas Kohlbecker 8 months ago

  • Assignee changed from Andreas Kohlbecker to Andreas Müller

I could not inspect all code changes in depth as this would require more time to dive into the whole topic of relation in the TDWG Ontology etc.

From the birs perspective this looks ok and can be release as is.

One minor note only: in cdmlib-remote/src/main/resources/eu/etaxonomy/cdm/remote/dto/tdwg/mappings-deep.xml there is a comment:

<!-- not fully correct to only use the first node, needs custom converter to implement correctly -->

the custom converter seems to be use already, though.

isn't this a ticket for 5.20.0 ?

#16 Updated by Andreas Müller 8 months ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker

No there is no custom converter in use yet for field taxonNodes. But ofcourse we use it elsewhere e.g. here

       <field type="one-way" custom-converter-id="hibernateProxyDeepConverter" custom-converter-param="authorship">

I is not a big issue to create one. However, having >1 taxon node is extremely seldom in existing data. Also it is expected that we will have a model change here in the nearer future so for me it was not worse to implement this (also because the TDWG ontology is not really in use anymore and therefore this issue has no high priority)

#17 Updated by Andreas Müller 8 months ago

  • Target version changed from Release 5.21 to Release 5.20

#18 Updated by Andreas Kohlbecker 8 months ago

Andreas Müller wrote:

No there is no custom converter in use yet for field taxonNodes. But ofcourse we use it elsewhere e.g. here

       <field type="one-way" custom-converter-id="hibernateProxyDeepConverter" custom-converter-param="authorship">

I is not a big issue to create one. However, having >1 taxon node is extremely seldom in existing data. Also it is expected that we will have a model change here in the nearer future so for me it was not worse to implement this (also because the TDWG ontology is not really in use anymore and therefore this issue has no high priority)

Agreed, ticket can be closed.

#19 Updated by Andreas Kohlbecker 8 months ago

  • Assignee changed from Andreas Kohlbecker to Andreas Müller

#20 Updated by Andreas Müller 8 months ago

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

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)