diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ab083c2..efdc2bba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next - Add the concept of "propagatable slots". +- Add `curie_map` as an [explicit element of the SSSOM model](https://github.com/mapping-commons/sssom/issues/225) ## SSSOM version 0.15.1 diff --git a/examples/schema/curie_map.sssom.tsv b/examples/schema/curie_map.sssom.tsv new file mode 100644 index 00000000..8772e84f --- /dev/null +++ b/examples/schema/curie_map.sssom.tsv @@ -0,0 +1,13 @@ +#curie_map: +# HP: http://purl.obolibrary.org/obo/HP_ +# MP: http://purl.obolibrary.org/obo/MP_ +# orcid: https://orcid.org/ +#mapping_set_id: https://w3id.org/sssom/commons/examples/issue_tracker.sssom.tsv +#license: "https://creativecommons.org/publicdomain/zero/1.0/" +#creator_id: orcid:0000-0002-7356-1779 +#mapping_provider: "https://w3id.org/sssom/core_team" +#comment: This is an example file for the SSSOM for illustration only. Its contents are entirely fabricated. +subject_id predicate_id object_id mapping_justification +HP:0009124 skos:exactMatch MP:0000003 semapv:ManualMappingCuration +HP:0008551 skos:exactMatch MP:0000018 semapv:ManualMappingCuration +HP:0000411 skos:exactMatch MP:0000021 semapv:ManualMappingCuration diff --git a/src/docs/spec-formats-tsv.md b/src/docs/spec-formats-tsv.md index 6a12dc7f..49fe5dcb 100644 --- a/src/docs/spec-formats-tsv.md +++ b/src/docs/spec-formats-tsv.md @@ -112,6 +112,9 @@ Any prefix name used in a SSSOM/TSV file MUST be declared with a corresponding e Prefix names listed in the table found in the [IRI prefixes](spec-intro.md#iri-prefixes) section are considered “built-in”. As such, they MAY be omitted from the CURIE map. If they are not omitted, they MUST point to the same IRI prefixes as in the aforementioned table. +_Note_ that as of SSSOM version 0.15.3, the `curie_map` element is part of the metadata model. +This does not have any consequences for SSSOM users, but developers building tools based on +the LinkML model of the SSSOM schema may have to adjust their parsers and serialisers accordingly. ## Propagatable slots diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index 877ae9e5..d9461655 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -72,6 +72,20 @@ types: - https://mapping-commons.github.io/sssom/spec/#tsv slots: + prefix_name: + key: true + range: ncname + prefix_url: + range: uri + curie_map: + description: A dictionary that contains prefixes as keys and their URI expansions as values. + range: prefix + multivalued: true + inlined: true + see_also: + - https://github.com/mapping-commons/sssom/issues/225 + - https://github.com/mapping-commons/sssom/pull/349 + - https://github.com/mapping-commons/sssom/blob/master/examples/schema/curie_map.sssom.tsv mirror_from: description: A URL location from which to obtain a resource, such as a mapping set. range: uri @@ -627,6 +641,7 @@ classes: license: required: true slots: + - curie_map - mappings - mapping_set_id - mapping_set_version @@ -770,6 +785,12 @@ classes: - mapping_set_group - last_updated - local_name + + prefix: + slots: + - prefix_name + - prefix_url + Propagatable: class_uri: sssom:Propagatable description: Metamodel extension class to describe slots whose value can be