IQSS / IQSS/dataverse

Feature Request: Generic TSV binding during DDI harvesting

Open
#10,949 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Overview of the Feature Request

Improve DDI harvesting by making it compatible with metadata customizations in TSV files made by Dataverse administrators.

What kind of user is the feature intended for?

superuser, system administrator, configuring harvesting clients

What inspired the request?

We have metadata customizations in our TSV files.
For example, unitOfAnalysis is not by default a ControlledVocabulary type while it is the case on our installation
As a result, DDI harvesting does not work and generates an error of type:

class edu.harvard.iq.dataverse.util.json.JsonParseException (incorrect  typeClass for field unitOfAnalysis, should be controlledVocabulary)

This is because the data type is hardcoded :

https://github.com/IQSS/dataverse/blob/3305c4a41045d0bb2f261c5eb2aa93414a34f2c6/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportDDIServiceBean.java#L794-L796

What existing behavior do you want changed?

Currently, during a DDI harvest, the data type mapping is hardcoded, without directly relying on the corresponding TSV file.
The goal of the issue is that the harvester bases itself on the TSV directly to adapt to customizations.

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 reading ImportDDIServiceBean.java at the referenced lines 794-796 and trace how DDI harvesting currently determines metadata data types. Compare that mapping with the corresponding TSV metadata customizations, including unitOfAnalysis. Done means harvesting adapts to the TSV-defined type and no longer raises the reported JsonParseException for customized metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.