Project

General

Profile

feature request #5573

Cache Strategy for Media Specimen required

Added by Andreas Müller over 5 years ago. Updated 2 months ago.

Status:
Closed
Priority:
New
Category:
cdmlib
Target version:
Start date:
02/18/2016
Due date:
% Done:

100%

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 MediaSpecimens Duplicate 07/31/2018
Related to Edit - feature request #4363: Show more informative message for unsupported specimen structures in specimen bulk editor Closed 08/20/2014
Related to Edit - task #9594: Use MediaSpecimen as input for MediaSpecimenGeneralDetailElement Closed 04/29/2021
Related to Edit - feature request #5952: Second cache field for specimen (identityCache) Closed 07/05/2016
Related to Edit - feature request #9597: Improve formatting of MediaSpecimen in TypeDesignationWorkingSet formatting Closed 04/30/2021
Related to Edit - task #9678: Remove Derived- and FieldUnitFacadeCacheStrategies Closed 06/25/2021

Associated revisions

Revision 197a9558 (diff)
Added by Andreas Müller 7 months ago

ref #7612 a first (preliminary) version of MediaSpecimenDefaultCacheStrategy

Revision 26008f31 (diff)
Added by Andreas Müller 7 months ago

ref #5573, ref #7612 adapt MediaSpecimenDefaultCacheStrategy to OccurrenceCacheStrategyBase

Revision d0cd78c9 (diff)
Added by Andreas Müller 3 months ago

ref #7612, ref #5573 adapt MediaSpecimenDefaultCacheStrategy to show file name only if no other information exists

Revision 9aa30fc8 (diff)
Added by Andreas Müller 3 months ago

ref #1602, ref #5573, ref #7612 Include artist in MediaDefaultCacheStrategy

Revision 1cd6de7e (diff)
Added by Andreas Müller 3 months ago

ref #9594 , ref #5573, ref #7612 use MediaSpecimenCacheStrategy in DerivateLabelProvider

Revision 957e3207 (diff)
Added by Andreas Müller 3 months ago

ref #5573, ref #7612 some doc

Revision e651eaf3 (diff)
Added by Andreas Müller 3 months ago

ref #7612, ref #5573, ref #5575 use mostSignificantIdentifier instead of accession number only

Revision 0cc955fe (diff)
Added by Andreas Müller 3 months ago

ref #5573 minor changes to MediaSpecimenDefaultCacheStrategyTest

Revision 155b3863 (diff)
Added by Katja Luther 2 months ago

ref #5573: adapt test

Revision 10ab27cc (diff)
Added by Andreas Müller 2 months ago

ref #9632, ref #5573 fix titleCache update in Media with workaround (not aspectj yet)

Revision 01d32cbd (diff)
Added by Andreas Müller 2 months ago

ref #9632, ref #5573 fix titleCache update in Media with workaround (not aspectj yet) (cont.)

Revision 7357605f (diff)
Added by Katja Luther 2 months ago

ref #5573: setMedia for media changes in MediaSpecimenDetailElement

Revision 784f80e6 (diff)
Added by Katja Luther 2 months ago

ref #5573: reset titleCache for setMedia in mediaSpecimen

Revision eb34070d (diff)
Added by Katja Luther 2 months ago

ref #5573: call resetTitleCache after changing media

Revision 53d2daf2 (diff)
Added by Katja Luther 2 months ago

ref #5573: remove resetTitleCache in setMedia()

History

#1 Updated by Andreas Müller 7 months ago

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

#3 Updated by Andreas Müller 6 months ago

  • Target version changed from Release 5.19 to Release 5.21

#4 Updated by Andreas Müller 5 months ago

  • Target version changed from Release 5.21 to Release 5.22

#5 Updated by Andreas Müller 3 months ago

  • Status changed from New to Resolved

#6 Updated by Andreas Müller 3 months ago

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

#7 Updated by Andreas Müller 3 months ago

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

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

#9 Updated by Andreas Müller 3 months 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)

#10 Updated by Andreas Müller 3 months ago

#11 Updated by Andreas Müller 3 months ago

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

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

#13 Updated by Andreas Müller 3 months ago

  • Description updated (diff)

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

#15 Updated by Katja Luther 3 months 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?

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

#17 Updated by Andreas Müller 2 months ago

  • Target version changed from Release 5.25 to Release 5.23

#18 Updated by Katja Luther 2 months 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.

#19 Updated by Katja Luther 2 months ago

  • Assignee changed from Katja Luther to Andreas Müller

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

#21 Updated by Katja Luther 2 months 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.

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

#23 Updated by Katja Luther 2 months 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

#24 Updated by Katja Luther 2 months ago

  • Status changed from Feedback to Closed

tested the workaround on nightly and it worked as expected.

#25 Updated by Andreas Müller 2 months ago

  • % Done changed from 50 to 100

#26 Updated by Andreas Müller about 1 month ago

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

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)