Skip to content

Commit

Permalink
Add "IsDerivedFrom" to DOI metadata.
Browse files Browse the repository at this point in the history
If a published project is derived from other published projects on the
site, include that information in the DOI metadata.

Formally, "IsDerivedFrom indicates B [the related resource] is a
source upon which A [the resource being registered] is based.
IsDerivedFrom should be used for a resource that is a derivative of
an original resource."

https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf
(page 63)
  • Loading branch information
Benjamin Moody committed Oct 23, 2023
1 parent 6998a3c commit e6a9536
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions physionet-django/console/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,24 @@ def generate_doi_payload(project, core_project=False, event="draft"):
else:
relation = []

# projects from which this project is derived
for parent_project in project.parent_projects:
if parent_project.doi:
relation.append({
"relationType": "IsDerivedFrom",
"relatedIdentifier": parent_project.doi,
"relatedIdentifierType": "DOI",
})
else:
url = "https://{0}{1}".format(current_site, reverse(
'published_project',
args=(parent_project.slug, parent_project.version)))
relation.append({
"relationType": "IsDerivedFrom",
"relatedIdentifier": url,
"relatedIdentifierType": "URL",
})

resource_type = 'Dataset'
if project.resource_type.name == 'Software':
resource_type = 'Software'
Expand Down

0 comments on commit e6a9536

Please sign in to comment.