Project

General

Profile

Actions

feature request #5573

closed

Cache Strategy for Media Specimen required

Added by Andreas Müller almost 7 years ago. Updated over 1 year ago.

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

100%

Estimated time:
Severity:
normal
Tags:

Description

What exactly do we want to have in a generic Media Cache Strategy?

Is it possible to have a common strategy?

An iconotyp may have completely different requirements than a scan that is derived from a preserved specimen. => #9597

Discuss with users: #4585

See also #5575 and #5581


Related issues

Related to EDIT - feature request #7612: CacheStrategy for MediaSpecimensDuplicateAndreas Müller

Actions
Related to EDIT - feature request #4363: Show more informative message for unsupported specimen structures in specimen bulk editorClosedAndreas Müller

Actions
Related to EDIT - task #9594: Use MediaSpecimen as input for MediaSpecimenGeneralDetailElementClosedAndreas Müller

Actions
Related to EDIT - feature request #5952: Second cache field for specimen (identityCache)ClosedAndreas Müller

Actions
Related to EDIT - feature request #9597: Improve formatting of MediaSpecimen in TypeDesignationWorkingSet formattingClosedAndreas Müller

Actions
Related to EDIT - task #9678: Remove Derived- and FieldUnitFacadeCacheStrategiesClosedAndreas Müller

Actions
Related to EDIT - feature request #5575: DNA Sample requires CacheStrategyClosedAndreas Müller

Actions
Related to EDIT - bug #5581: Specimen title cache does not show up correctly after editingClosedAndreas Müller

Actions
Related to EDIT - bug #9978: Change of CacheStrategy from DerivedUnitFacade to DerivedUnitDefaultCacheStrategy results in different caches for MediaSpecimenIn ProgressKatja Luther

Actions
Has duplicate EDIT - feature request #7612: CacheStrategy for MediaSpecimensDuplicateAndreas Müller

Actions
Actions #1

Updated by Andreas Müller almost 2 years ago

Actions #2

Updated by Andreas Müller almost 2 years ago

  • Description updated (diff)
  • Target version changed from Unassigned CDM tickets to Release 5.19
  • % Done changed from 0 to 20
  • Private changed from Yes to No
Actions #3

Updated by Andreas Müller almost 2 years ago

  • Target version changed from Release 5.19 to Release 5.21
Actions #4

Updated by Andreas Müller over 1 year ago

  • Target version changed from Release 5.21 to Release 5.22
Actions #5

Updated by Andreas Müller over 1 year ago

  • Status changed from New to Resolved
Actions #6

Updated by Andreas Müller over 1 year ago

  • Related to feature request #4363: Show more informative message for unsupported specimen structures in specimen bulk editor added
Actions #7

Updated by Andreas Müller over 1 year ago

  • Related to task #9594: Use MediaSpecimen as input for MediaSpecimenGeneralDetailElement added
Actions #8

Updated by Andreas Müller over 1 year ago

  • Target version changed from Release 5.22 to Release 5.25

To use the new cache strategy the editor needs to be refactored a bit: #9594

Actions #9

Updated by Andreas Müller over 1 year ago

  • % Done changed from 20 to 50

A first version is implemented now. This cache strategy differs from default derived unit cache strategies in the way that it does not include any field unit data. Only the media and accession data are included.
Maybe in future this will be unified once the second cache field for specimen is fully supported (#5952)

Actions #10

Updated by Andreas Müller over 1 year ago

Actions #11

Updated by Andreas Müller over 1 year ago

  • Related to feature request #9597: Improve formatting of MediaSpecimen in TypeDesignationWorkingSet formatting added
Actions #12

Updated by Andreas Müller over 1 year ago

  • Description updated (diff)

An iconotyp may have completely different requirements than a scan that is derived from a preserved specimen.

MediaSpecimen being type designations are handled in #9597.

Actions #13

Updated by Andreas Müller over 1 year ago

  • Description updated (diff)
Actions #14

Updated by Andreas Müller over 1 year ago

  • Assignee changed from Andreas Müller to Katja Luther

I think this is fully implemented now. If users want it differently they may tell us by time and we can adapt the code if necessary.

Please review who ever wants to review.

Actions #15

Updated by Katja Luther over 1 year ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Katja Luther to Andreas Kohlbecker

Shouldn't the motif be part of the titlecache if no other field is filled?
At the moment the titleCache is the UUID if a motif exist but nothing else. But maybe AK want do a review as well?

Actions #16

Updated by Andreas Müller over 1 year ago

  • Assignee changed from Andreas Kohlbecker to Katja Luther

Katja Luther wrote:

Shouldn't the motif be part of the titlecache if no other field is filled?
At the moment the titleCache is the UUID if a motif exist but nothing else. But maybe AK want do a review as well?

I don't think that this is a problem of the cache strategy. It shows motif as you expected as you can see the according test MediaSpecimenDefaultCacheStrategyTest.test().

But I can see that in the specimen tree editor the cache is not correctly updated so my guess is that there is an issue in the taxeditor, maybe related to #9594. Katja, can you check this.

Actions #17

Updated by Andreas Müller over 1 year ago

  • Target version changed from Release 5.25 to Release 5.23
Actions #18

Updated by Katja Luther over 1 year ago

Andreas Müller wrote:

Katja Luther wrote:

Shouldn't the motif be part of the titlecache if no other field is filled?
At the moment the titleCache is the UUID if a motif exist but nothing else. But maybe AK want do a review as well?

I don't think that this is a problem of the cache strategy. It shows motif as you expected as you can see the according test MediaSpecimenDefaultCacheStrategyTest.test().

But I can see that in the specimen tree editor the cache is not correctly updated so my guess is that there is an issue in the taxeditor, maybe related to #9594. Katja, can you check this.

The motif problem is a cache problem, I expand the test and added a test for only change the motif and the titleCache does not change. Changing the motif and the artist results in an updated titleCache.

Actions #19

Updated by Katja Luther over 1 year ago

  • Assignee changed from Katja Luther to Andreas Müller
Actions #20

Updated by Andreas Müller over 1 year ago

  • Assignee changed from Andreas Müller to Katja Luther

The failing test is fixed now (titleCache is set to null and a property change event is thrown). However, as the event is thrown by Media not by MediaSpecimen it is maybe not yet catched by the taxeditor UI. This also is the case when changing the artist, not only motif. When changing the value in TaxEd nothing changes in the tree or elsewhere.

Actions #21

Updated by Katja Luther over 1 year ago

  • Assignee changed from Katja Luther to Andreas Müller

Andreas Müller wrote:

The failing test is fixed now (titleCache is set to null and a property change event is thrown). However, as the event is thrown by Media not by MediaSpecimen it is maybe not yet catched by the taxeditor UI. This also is the case when changing the artist, not only motif. When changing the value in TaxEd nothing changes in the tree or elsewhere.

But the titleCache is not really updated, only the cache strategy works as expected. Calling specimen.getTitleCache() results in a wrong result, but the titleCache of the media is updated.

Actions #22

Updated by Andreas Müller over 1 year ago

Katja Luther wrote:

Andreas Müller wrote:

The failing test is fixed now (titleCache is set to null and a property change event is thrown). However, as the event is thrown by Media not by MediaSpecimen it is maybe not yet catched by the taxeditor UI. This also is the case when changing the artist, not only motif. When changing the value in TaxEd nothing changes in the tree or elsewhere.

But the titleCache is not really updated, only the cache strategy works as expected. Calling specimen.getTitleCache() results in a wrong result, but the titleCache of the media is updated.

That is want I meant above. So my question was if we can not catch the media property change event additional to the mediaSpecimen event. Also throwing a media specimen event is probably possible but tricky as it is not so easy to register the media event for the media specimen event in case the media is loaded by hibernate. Therefor a work around like the above would be helpful for now.

Actions #23

Updated by Katja Luther over 1 year ago

Andreas Müller wrote:

Katja Luther wrote:

Andreas Müller wrote:

The failing test is fixed now (titleCache is set to null and a property change event is thrown). However, as the event is thrown by Media not by MediaSpecimen it is maybe not yet catched by the taxeditor UI. This also is the case when changing the artist, not only motif. When changing the value in TaxEd nothing changes in the tree or elsewhere.

But the titleCache is not really updated, only the cache strategy works as expected. Calling specimen.getTitleCache() results in a wrong result, but the titleCache of the media is updated.

That is want I meant above. So my question was if we can not catch the media property change event additional to the mediaSpecimen event. Also throwing a media specimen event is probably possible but tricky as it is not so easy to register the media event for the media specimen event in case the media is loaded by hibernate. Therefor a work around like the above would be helpful for now.

Implemented a workaround with resetting the titlecache when setting the media object in mediaspecimen and on editor side setting the media for every media change in details view

Actions #24

Updated by Katja Luther over 1 year ago

  • Status changed from Feedback to Closed

tested the workaround on nightly and it worked as expected.

Actions #25

Updated by Andreas Müller over 1 year ago

  • % Done changed from 50 to 100
Actions #26

Updated by Andreas Müller over 1 year ago

  • Related to task #9678: Remove Derived- and FieldUnitFacadeCacheStrategies added
Actions #27

Updated by Andreas Müller 9 months ago

Actions #29

Updated by Andreas Müller 9 months ago

  • Related to feature request #5575: DNA Sample requires CacheStrategy added
  • Related to bug #5581: Specimen title cache does not show up correctly after editing added
Actions #30

Updated by Katja Luther 9 months ago

  • Related to bug #9978: Change of CacheStrategy from DerivedUnitFacade to DerivedUnitDefaultCacheStrategy results in different caches for MediaSpecimen added
Actions

Also available in: Atom PDF