Project

General

Profile

Actions

task #9253

closed

revise OccurrenceServiceImpl.findFieldUnitDTO(..)

Added by Andreas Kohlbecker over 3 years ago. Updated over 3 years ago.

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

100%

Estimated time:
Severity:
normal
Tags:

Description

This intended function of FieldUnitDTO OccurrenceServiceImpl.findFieldUnitDTO(DerivateDTO derivedUnitDTO, Collection<FieldUnitDTO> fieldUnits, HashMap<UUID, DerivateDTO> alreadyCollectedSpecimen) is quite unclear, not only because the documentation is missing (#8458), but also since the method is confuses reagarding the method signature: All detected fieldunits are added to the Collection<FieldUnitDTO> fieldUnits passed as parameter but one of the field units is returned. From the description of #8423 supports the impression that this method covers two distinct functionalities at the same.

TODO:

  • refactor the method to make its clarify its purpose and concerns. - DONE
  • revise commented code and clean up
  • remove the init strategy (first FIXME in code) - DONE
  • allow for walking multiple origin paths (second FIXME in code) ---> #9430
  • The methods OccurrenceServiceImpl._findFieldUnitDTO and OccurrenceServiceImpl.findFieldUnitDTO() are operating on DTOs. This causes a computation overhead which could be significant in cases where intermediate derivation events exists. The creation of the DTOs is quite expensive since they are relatively complex objects for which quite some entity initialization is necessary. It would be better to do the search for field units purely on the entity level and to create DTOs in a final step only for those entities which are needed for the out put or response. ---> #9431

Related issues

Related to EDIT - task #8458: document FieldUnitDTOOccurrenceServiceImpl.findFieldUnitDTO()ClosedAndreas Kohlbecker

Actions
Related to EDIT - bug #8423: OccurrenceServiceImpl.findFieldUnitDTO() fails to merge derivation paths when a FieldUnit has two derivativesClosedAndreas Kohlbecker

Actions
Related to EDIT - task #9252: Harmonize SpecimenOrOberservationBase related DTOsClosedAndreas Kohlbecker

Actions
Related to EDIT - task #8419: Harmonization of the different specimen representationsIn ProgressAndreas Kohlbecker

Actions
Related to EDIT - bug #9257: revise filtering in OccurrenceServiceImpl.assembleFieldUnitDTO(FieldUnit fieldUnit) by SpecimenOrObservationType.PreservedSpecimenClosedAndreas Kohlbecker

Actions
Related to EDIT - feature request #7704: Dataportal specimen table should be able to show DerivedUnits without a FieldUnitClosedAndreas Kohlbecker

Actions
Related to EDIT - bug #9556: occurrence/{uuid}/fieldUnitDTOs web service adds duplicate units to responseClosedAndreas Kohlbecker

Actions
Copied to EDIT - task #9430: revise OccurrenceServiceImpl._findRootUnitDTO(..) supports multiple origin pathsNewAndreas Kohlbecker

Actions
Copied to EDIT - task #9431: OccurrenceServiceImpl._findRootUnitDTO(..) NewAndreas Müller

Actions
Actions

Also available in: Atom PDF