-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7967 from QualitativeDataRepository/QDR/6886-exte…
…rnal_status_labels QDR/6886 external status labels
- Loading branch information
Showing
37 changed files
with
1,057 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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 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,35 @@ | ||
### Curation Status Labels | ||
|
||
A new :AllowedCurationLabels setting allows a sysadmins to define one or more sets of labels that can be applied to a draft Dataset version via the user interface or API to indicate the status of the dataset with respect to a defined curation process. | ||
|
||
Labels are completely customizable (alphanumeric or spaces, up to 32 characters, e.g. "Author contacted", "Privacy Review", "Awaiting paper publication"). Superusers can select a specific set of labels, or disable this functionality per collection. Anyone who can publish a draft dataset (e.g. curators) can set/change/remove labels (from the set specified for the collection containing the dataset) via the user interface or via an API. The API also would allow external tools to search for, read and set labels on Datasets, providing an integration mechanism. Labels are visible on the Dataset page and in Dataverse collection listings/search results. Internally, the labels have no effect, and at publication, any existing label will be removed. A reporting API call allows admins to get a list of datasets and their curation statuses. | ||
|
||
The Solr schema must be updated as part of installing the release of Dataverse containing this feature for it to work. | ||
|
||
## Additional Release Steps | ||
|
||
1\. Replace Solr schema.xml to allow Curation Labels to be used. See specific instructions below for those installations with custom metadata blocks (1a) and those without (1b). | ||
|
||
1a\. | ||
|
||
For installations with Custom Metadata Blocks: | ||
|
||
-stop solr instance (usually service solr stop, depending on solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/5.7/installation/prerequisites.html#solr-init-script) | ||
|
||
- add the following line to your schema.xml: | ||
|
||
<field name="externalStatus" type="string" stored="true" indexed="true" multiValued="false"/> | ||
|
||
- restart solr instance (usually service solr start, depending on solr/OS) | ||
|
||
1b\. | ||
|
||
For installations without Custom Metadata Blocks: | ||
|
||
-stop solr instance (usually service solr stop, depending on solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/5.7/installation/prerequisites.html#solr-init-script) | ||
|
||
-replace schema.xml | ||
|
||
cp /tmp/dvinstall/schema.xml /usr/local/solr/solr-8.8.1/server/solr/collection1/conf | ||
|
||
-start solr instance (usually service solr start, depending on solr/OS) |
This file contains 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 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,95 @@ | ||
Dataset Curation Label API | ||
========================== | ||
|
||
When the :ref:`:AllowedCurationLabels <:AllowedCurationLabels>` setting has been used to define Curation Labels, this API can be used to set these labels on draft datasets. | ||
Superusers can define which set of labels are allowed for a given datasets in a collection/an individual dataset using the api described in the :doc:`/admin/dataverses-datasets` section. | ||
The API here can be used by curators/those who have permission to publish the dataset to get/set/change/delete the label currently assigned to a draft dataset. | ||
|
||
This functionality is intended as a mechanism to integrate the Dataverse software with an external curation process/application: it is a way to make the state of a draft dataset, | ||
as defined in the external process, visible within Dataverse. These labels have no other effect in Dataverse and are only visible to curators/those with permission to publish the dataset. | ||
Any curation label assigned to a draft dataset will be removed upon publication. | ||
|
||
Get a Draft Dataset's Curation Label | ||
------------------------------------ | ||
|
||
.. code-block:: bash | ||
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ||
export DATASET_ID='12345' | ||
export DATASET_PID='doi:10.5072/FK2A1B2C3' | ||
export SERVER_URL=https://demo.dataverse.org | ||
Example 1: Get the label using the DATASET ID | ||
curl -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/$DATASET_ID/curationStatus" | ||
Example 2: Get the label using the DATASET PID | ||
curl -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/:persistentId/curationStatus?persistentId=$DATASET_PID" | ||
You should expect a 200 ("OK") response and the draft dataset's curation status label contained in a JSON 'data' object. | ||
|
||
|
||
Set a Draft Dataset's Curation Label | ||
------------------------------------ | ||
|
||
To add a curation label for a draft Dataset, specify the Dataset ID (DATASET_ID) or Persistent identifier (DATASET_PID) and the label desired. | ||
|
||
.. code-block:: bash | ||
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ||
export DATASET_ID='12345' | ||
export DATASET_PID='doi:10.5072/FK2A1B2C3' | ||
export LABEL='Author contacted' | ||
export SERVER_URL=https://demo.dataverse.org | ||
Example: Add the label using the DATASET ID | ||
curl -X PUT -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/$DATASET_ID/curationStatus?label=$LABEL" | ||
Example 2: Add a description using the DATASET PID | ||
curl -X PUT -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/:persistentId/curationStatus?label=$LABEL&persistentId=$DATASET_PID" | ||
You should expect a 200 ("OK") response indicating that the label has been set. 403/Forbidden and 400/Bad Request responses are also possible, i.e. if you don't have permission to make this change or are trying to add a label that isn't in the allowed set or to add a label to a dataset with no draft version. | ||
|
||
|
||
Delete a Draft Dataset's Curation Label | ||
--------------------------------------- | ||
|
||
To delete the curation label on a draft Dataset, specify the Dataset ID (DATASET_ID) or Persistent identifier (DATASET_PID). | ||
|
||
.. code-block:: bash | ||
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ||
export DATASET_PID='doi:10.5072/FK2A1B2C3' | ||
export SERVER_URL=https://demo.dataverse.org | ||
Example: Delete the label using the DATASET PID | ||
curl -X DELETE -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/:persistentId/curationStatus?persistentId=$DATASET_PID" | ||
You should expect a 200 ("OK") response indicating the label has been removed. | ||
|
||
|
||
Get the Set of Allowed Labels for a Dataset | ||
------------------------------------------- | ||
|
||
To get the list of allowed curation labels allowed for a given Dataset | ||
|
||
.. code-block:: bash | ||
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ||
export DATASET_ID='12345' | ||
export DATASET_PID='doi:10.5072/FK2A1B2C3' | ||
export SERVER_URL=https://demo.dataverse.org | ||
Example 1: Get the label using the DATASET ID | ||
curl -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/$DATASET_ID/allowedCurationLabels" | ||
Example 2: Get the label using the DATASET PID | ||
curl -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/:persistentId/allowedCurationLabels?persistentId=$DATASET_PID" | ||
You should expect a 200 ("OK") response with a comma-separated list of allowed labels contained in a JSON 'data' object. |
This file contains 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 |
---|---|---|
|
@@ -20,5 +20,6 @@ API Guide | |
sword | ||
client-libraries | ||
external-tools | ||
curation-labels | ||
apps | ||
faq |
This file contains 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 |
---|---|---|
|
@@ -39,3 +39,4 @@ Developer Guide | |
dataset-migration-api | ||
workflows | ||
fontcustom | ||
|
This file contains 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 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 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 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
Oops, something went wrong.