Project

General

Profile

feature request #7932

Implement subject resolver for CdmPreferences

Added by Andreas Müller about 2 months ago. Updated 1 day ago.

Status:
New
Priority:
New
Category:
cdmlib
Target version:
Start date:
11/29/2018
Due date:
% Done:

0%

Severity:
normal

Description

Finding the best matching preference for preferences with same predicates but differing subjects is currently not yet implemented or only limited for subjects with taxonomic subtree preferences.

As handling preferences in application has shown that there is a need for caching preferences it is preferred to implement a best matching subject resolver that is DB independent.
This creates difficulties for tree filters like the taxonomic subtree filter where the subject may include the subtree uuid or the tree index. Using the subtree uuid is easier to maintain but requires on the fly creation of the tree index because only with the tree index one may be able to decide if a taxon is included or not. Using the tree index as part of the subject avoids this problem but is more difficult to maintain if a taxon node is moved or if it's higher taxonomy changes.

There are multiple possibilities to implement resolving

  1. easiest: all matching subjects must completely be included in the query subject, the longest subject winns
  2. middle: all parts of a matching subject must be in the query subject in the same order, but the query subject may include additional parts, not only at the end but also in the middle; for finding the best matching we start from the back, if the last part exists it is the best matching otherwise call recusively with the query subject shortened by the last part
  3. general: to match the query subject all parts of the subject must also be parts in the query subject no matter which order; finding the best matching works like in 2), the query subject is read from behind and whenever a subject includes the last part read it winns, otherwise start recursively

Related issues

Related to Edit - feature request #7920: possibility to define areaspecific status selection New 11/22/2018

Associated revisions

Revision b45c1f2d (diff)
Added by Andreas Müller about 2 months ago

ref #7932 first implementation of PreferenceResolver and some adaption to PreferenceService API.

  • Correct handling of subtree subjects still open.
  • Also creation of user defined subjects still open.

History

#1 Updated by Andreas Müller about 2 months ago

For now we implement solution 2.

#2 Updated by Andreas Müller 1 day ago

#3 Updated by Andreas Müller 1 day ago

  • Description updated (diff)

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)