Skip to content

Commit

Permalink
Filled in some more gaps in the NMDC implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-cohere committed Sep 25, 2024
1 parent 626623c commit d3f112b
Show file tree
Hide file tree
Showing 2 changed files with 346 additions and 408 deletions.
52 changes: 22 additions & 30 deletions credit/metadata.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package credit

/*
* Represents a contributor to the resource.
- Represents a contributor to the resource.
Contributors must have a 'contributor_type', either 'Person' or 'Organization', and
one of the 'name' fields: either 'given_name' and 'family_name' (for a person), or 'name' (for an organization or a person).
Expand All @@ -13,8 +13,7 @@ appropriate roles, please see the following links:
DataCite contributor roles: https://support.datacite.org/docs/datacite-metadata-schema-v44-recommended-and-optional-properties#7a-contributortype
CRediT contributor role taxonomy: https://credit.niso.org
*/
*/
type Contributor struct {
/*
* Must be either 'Person' or 'Organization'
Expand Down Expand Up @@ -47,7 +46,7 @@ type Contributor struct {
}

/*
* Represents the credit metadata associated with an object.
- Represents the credit metadata associated with an object.
In the following documentation, 'Resource' is used to refer to the object
that the CM pertains to, for example, a KBase Workspace object or a
Expand Down Expand Up @@ -76,8 +75,7 @@ the last update (if applicable).
The resource_type field is required, but as there is currently only a single valid
value, 'dataset', it is automatically populated if no value is supplied.
*/
*/
type CreditMetadata struct {
/*
* List of strings of freeform text providing extra information about this credit metadata.
Expand Down Expand Up @@ -112,11 +110,11 @@ type CreditMetadata struct {
*/
Identifier string `json:"identifier"`
/*
* Usage license for the resource. Use one of the SPDX license identifiers or provide a link to the license text if no SPDX ID is available.
* Usage license for the resource. Use one of the SPDX license identifiers or provide a link to the license text if no SPDX ID is available.
All data published at KBase is done so under a Creative Commons 0 or Creative Commons 4.0 license.
All data published at KBase is done so under a Creative Commons 0 or Creative Commons 4.0 license.
*/
*/
License License `json:"license"`
/*
* Metadata for this credit information, including submitter, schema version, and timestamp.
Expand Down Expand Up @@ -167,11 +165,10 @@ type Description struct {
}

/*
* Represents an event in the lifecycle of a resource and the date it occurred on.
- Represents an event in the lifecycle of a resource and the date it occurred on.
See https://support.datacite.org/docs/datacite-metadata-schema-v44-recommended-and-optional-properties#8-date for more information on the events.
*/
*/
type EventDate struct {
/*
* The date associated with the event. The date may be in the format YYYY, YYYY-MM, or YYYY-MM-DD.
Expand All @@ -184,7 +181,7 @@ type EventDate struct {
}

/*
* Represents a funding source for a resource, including the funding body and the grant awarded.
- Represents a funding source for a resource, including the funding body and the grant awarded.
The 'funder_name' field is required; all others are optional.
Expand All @@ -194,8 +191,7 @@ Recommended resources for organization identifiers include:
- Crossref Funder Registry, https://www.crossref.org/services/funder-registry/ (to be subsumed into ROR)
Some organizations may have a digital object identifier (DOI).
*/
*/
type FundingReference struct {
/*
* Code for the grant, assigned by the funder
Expand Down Expand Up @@ -248,18 +244,18 @@ type Metadata struct {
}

/*
* Represents an organization.
- Represents an organization.
Recommended resources for organization identifiers and canonical organization names include:
- Research Organization Registry, http://ror.org
- International Standard Name Identifier, https://isni.org
- Crossref Funder Registry, https://www.crossref.org/services/funder-registry/
For example, the US DOE would be entered as:
organization_name: United States Department of Energy
organization_id: ROR:01bj3aw27
*/
organization_name: United States Department of Energy
organization_id: ROR:01bj3aw27
*/
type Organization struct {
/*
* Persistent unique identifier for the organization in the format <database name>:<identifier within database>
Expand All @@ -272,7 +268,7 @@ type Organization struct {
}

/*
* Represents a persistent unique identifier for an entity, with an optional relationship to some other entity.
- Represents a persistent unique identifier for an entity, with an optional relationship to some other entity.
The 'id' field and 'relationship_type' fields are required.
Expand All @@ -281,8 +277,7 @@ The values in the 'relationship_type' field come from controlled vocabularies ma
DataCite relation types: https://support.datacite.org/docs/datacite-metadata-schema-v44-recommended-and-optional-properties#12b-relationtype
Crossref relation types: https://www.crossref.org/documentation/schema-library/markup-guide-metadata-segments/relationships/
*/
*/
type PermanentID struct {
/*
* Persistent unique ID for an entity. Should be in the format <database name>:<identifier within database>.
Expand All @@ -293,19 +288,18 @@ type PermanentID struct {
*/
Description string `json:"description"`
/*
* The relationship between the ID and some other entity.
For example, when a PermanentID class is used to represent objects in the CreditMetadata field 'related_identifiers', the 'relationship_type' field captures the relationship between the CreditMetadata and this ID.
* The relationship between the ID and some other entity.
For example, when a PermanentID class is used to represent objects in the CreditMetadata field 'related_identifiers', the 'relationship_type' field captures the relationship between the CreditMetadata and this ID.
*/
*/
RelationshipType string `json:"relationship_type"`
}

/*
* Represents the title or name of a resource, the type of that title, and the language used (if appropriate).
- Represents the title or name of a resource, the type of that title, and the language used (if appropriate).
The 'title' field is required; 'title_type' is only necessary if the text is not the primary title.
*/
*/
type Title struct {
/*
* The language in which the title is written, using the appropriate IETF BCP-47 notation.
Expand All @@ -320,5 +314,3 @@ type Title struct {
*/
TitleType string `json:"title_type"`
}


Loading

0 comments on commit d3f112b

Please sign in to comment.