-
Notifications
You must be signed in to change notification settings - Fork 561
Dataverse topic class term uri #12614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ffritze
wants to merge
17
commits into
IQSS:develop
Choose a base branch
from
TIK-NFL:dataverse_topicClassTermURI
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
270032e
Merge pull request #12233 from IQSS/develop
pdurbin 300d5b5
Merge pull request #12259 from IQSS/develop
pdurbin dd1859d
Merge pull request #12502 from IQSS/develop
pdurbin 54f9e4e
dataverse_topicClassTermURI feature
ffritze 7fb183e
Merge remote-tracking branch 'refs/remotes/dataverse/develop' into da…
ffritze 5a03c25
fixed schema file and test is now passing
ffritze b82ae20
Merge remote-tracking branch 'refs/remotes/dataverse/develop' into da…
ffritze a43704e
Revert "fixed schema file and test is now passing"
ffritze f36737f
sticking to https://ddialliance.org/Specification/DDI-Codebook/2.5/XM…
ffritze 739a7d3
added release note
ffritze 4286b08
updated citation.tsv
ffritze 92303b8
updated citation.properties
ffritze 3825c89
right order
ffritze 93b8edd
corrected
ffritze acf463e
right order correction
ffritze 6b0cd85
migration documentation
ffritze 20a55bd
fixed citation properties
ffritze File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| Analogue to the addition of a termURI field to the keywords in the citation metadata blocks, the same idea should also be applied to the topicClassification fields: | ||
|
|
||
| add a new subfield topicClassTermURI to the citation metadata block | ||
| migrate contents from topicClassVocabURI to topicClassTermURI | ||
| change DataCite export format, so that the content of topicClassTermURI goes into the property valueURI of the subject element | ||
| old: | ||
|
|
||
| <subject schemeURI="https://github.com/tibonto/dfgfo/44" subjectScheme="DFGFO"> | ||
| Computer Science, Systems and Electrical Engineering | ||
| </subject> | ||
|
|
||
|
|
||
|
|
||
| new: | ||
|
|
||
| <subject schemeURI="https://github.com/tibonto/dfgfo/" valueURI="https://github.com/tibonto/dfgfo/44" subjectScheme="DFGFO"> | ||
| Computer Science, Systems and Electrical Engineering | ||
| </subject> | ||
|
|
||
| in the general case: | ||
|
|
||
|
|
||
|
|
||
| <subject schemeURI="topicClassVocabURI" valueURI="topicClassTermURI" subjectScheme="topicClassVocab">topicClassValue</subject> | ||
|
|
||
|
|
||
| The implementation expects a new metadata field called "topicClassTermURI". The old field was called "topicClassVocabURI". | ||
| The old field still holds an URL but the schemeUrl but not the TermURI of the metadata value. | ||
| This change has been adapted to the | ||
| DdiExportUtil.java | ||
| OpenAireExportUtil.java | ||
| XmlMetadataTemplate.java | ||
|
|
||
| In DdiExportUtil the field "topicClassVocabURI" is overwritten with "topicClassTermURI" because this is the new vocabUri. | ||
|
|
||
| In OpenAireExportUtil the changes are made and tested like in the explanation above. | ||
|
|
||
| In XmlMetadataTemplate there is just a new getter and an addition of the new "valueURI" attribute. | ||
|
|
||
| You can migrate your topicClassVocabURI data containing URIs to the new topicClassTermURI field. | ||
| In case of data migration, view the affected data with the following database query: | ||
|
|
||
| SELECT value FROM datasetfieldvalue dfv | ||
| INNER JOIN datasetfield df ON df.id = dfv.datasetfield_id | ||
| WHERE df.datasetfieldtype_id = (SELECT id FROM datasetfieldtype WHERE name = 'topicClassVocabURI') | ||
| AND value ILIKE 'http%'; | ||
|
|
||
|
|
||
| If you wish to migrate your data, a database update is then necessary: | ||
|
|
||
|
|
||
| UPDATE datasetfield df | ||
| SET datasetfieldtype_id = (SELECT id FROM datasetfieldtype WHERE name = 'topicClassTermURI') | ||
| FROM datasetfieldvalue dfv | ||
| WHERE dfv.datasetfield_id = df.id | ||
| AND df.datasetfieldtype_id = (SELECT id FROM datasetfieldtype WHERE name = 'topicClassVocabURI') | ||
| AND dfv.value ILIKE 'http%'; | ||
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -304,8 +304,8 @@ | |
| "typeClass": "primitive", | ||
| "value": "TC Vocabulary" | ||
| }, | ||
| "topicClassVocabURI": { | ||
| "typeName": "topicClassVocabURI", | ||
| "topicClassTermURI": { | ||
| "typeName": "topicClassTermURI", | ||
| "multiple": false, | ||
| "typeClass": "primitive", | ||
| "value": "http://www.topicClass.com/one" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused. In this pull request should scripts/api/data/metadatablocks/citation.tsv be updated to include a new field?
Assuming so, this release note snippet should also include a
## Upgrade instructionssection at the bottom explaining how to load it and how to update Solr to include the new field. https://github.com/IQSS/dataverse/releases/tag/v6.8 is probably a decent example. Here's a screenshot:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pdurbin I have updated the documentation by adapting the former keywordTermURI migration with https://github.com/IQSS/dataverse/releases/tag/v6.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. From a quick look I'm wondering if all that SQL should be put into a migration script so it can be run automatically. If you're not familiar with how we use Flyway for this: https://guides.dataverse.org/en/6.11/developers/sql-upgrade-scripts.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it can be automated - people may have been using the existing field correctly, in which case values shouldn't be migrated.