IQSS / IQSS/dataverse

Feature Request: CVocConf customized at Dataverse collection level

Open
#11,056 5 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Feature
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

For the sake of https://entrepot.recherche.data.gouv.fr/ needs, we imagined being able to have different configuration depending on the Dataverse collection you are working on.

For example, with keyword configuration using SKOMOS :

  • in Dataverse collection A I want 3 configured vocabularies
  • in Dataverse collection B I want 2 configured vocabularies
  • in Dataverse collection C child of A I want no configuration on keyword
  • Dataverse collection D using not SKOMOS but Ontoportal on the same termUri field aka keyword.

Considering the need to customize many Dataverse collections, vocabularies, inheritance or not, different service for the same termUri field we had this simple idea : move the :CVocConf setting to a cvocconf column in database table dataverse (credits to @jeromeroucou).

The content would give the rules :

  1. cvocconf should be apply to associated Dataverse collection and Dataverse sub-collections
  2. cvocconf empty or null should mean no configuration unless a parent configuration is effective (rule n°1)
  3. empty json object {} would mean intention to have no configuration for the Dataverse collection and to not use parent effective configuration (variation to rule n°2)

In advanced search, same rules should be apply. Another idea could be to have no configuration at parent level if one descendant have a different configuration or absence of configuration is set. (rule n°3).

Technical aspects:

  • Remove :CVocConf setting related code with a removal in a flyway script
  • Add the new cvocconf column (same sql type as :CVocConf) and the related code including the flyway script (existing :CVocConf should be moved to root Dataverse collection)
  • DatasetFieldServiceBean.getCvocConf() should handle Dataverse collection identifier as new parameter and all referencies should be updated according to local use
  • Content rules should be handled in DatasetFieldServiceBean.getCvocConf()
  • UT and IT should be updated
  • Add new API endpoint to add a CVocConf on a Dataverse collection should be created in /api/admin scope as POST accepting json body (superuser + localhost restrictions)
  • Add new API endpoint to get the CVocConf of a Dataverse collection (same restrictions), should contain both the current configuration and the effective configuration of a parent if qualified (rule n°2)
  • Maybe a cache mechanism should be considered

@qqmyers @pdurbin depending on your views, we (@jeromeroucou @stevenferey @luddaniel) could develop a part or most of it, anyhow, no development should start before a agreement on the specifications.

If any community member is interested in the feature in any way shape or form, please leave a quick comment below.
Best regards

Tagging our Product Owner: @DS-INRAE

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing :CVocConf setting and DatasetFieldServiceBean.getCvocConf(), then trace its callers and the Dataverse database migration patterns. The issue also identifies /api/admin as the endpoint scope and requires unit and integration test updates. Done depends on agreed specifications for inheritance, empty values, migrations, API responses, and any caching.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
api, backend, database, security, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.