From 160bd851e57ce1e102c9ad39410a7c4307a7ef2a Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Tue, 6 Aug 2024 18:54:03 +0100 Subject: [PATCH 1/2] Describe literal mappings in the specification. Remove the old page about the "literal profile" (which no longer exists). Instead, add a section to the introductory page about the model to explain what literal mappings are and how to use them. --- mkdocs.yml | 1 - src/docs/spec-model.md | 19 +++++++++++++++++++ src/docs/sssom-profiles.md | 17 ----------------- src/sssom_schema/schema/sssom_schema.yaml | 2 +- 4 files changed, 20 insertions(+), 19 deletions(-) delete mode 100644 src/docs/sssom-profiles.md diff --git a/mkdocs.yml b/mkdocs.yml index ed017174..3e90c221 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -33,7 +33,6 @@ nav: - Introduction: spec-model.md - Applying Chaining Rules: chaining-rules.md - LinkML documentation: linkml-index.md - - SSSOM profiles: sssom-profiles.md - Serialisations: - Introduction: spec-formats.md - SSSOM/TSV serialisation: spec-formats-tsv.md diff --git a/src/docs/spec-model.md b/src/docs/spec-model.md index e06637a4..655f0451 100644 --- a/src/docs/spec-model.md +++ b/src/docs/spec-model.md @@ -83,6 +83,25 @@ In addition, predicates from the following sources MAY also be encouraged: * any relation under [skos:mappingRelation](http://www.w3.org/2004/02/skos/core#mappingRelation) in the [Semantic Mapping Vocabulary](https://mapping-commons.github.io/semantic-mapping-vocabulary/). +## Literal mappings + + + +The SSSOM model is primarily intended to represent mappings between semantic entities. However, it may also be used to represent mappings where one side is a literal string that does not have an identifier of its own. Any such mapping is henceforth called a _literal mapping_. + +To represent a mapping whose subject (resp. object) is a literal: + +* the `subject_type` (resp. `object_type`) slot is set to `rdfs literal`; +* the `subject_label` (resp. `object_label`) slot is set to the literal itself; +* the `subject_id` (resp. `object_id`) slot is left empty. + +The last point is an exception to the normal rules about required slots, which state that a mapping must always have a `subject_id` and an `object_id`. Implementations MUST accept a mapping without a `subject_id` (resp. `object_id`) _if and only if_ the `subject_type` (resp. `object_type`) slot is set to `rdfs literal`. + +All other slots in the `Mapping` class may be used normally in a literal mapping, with the same meaning as for a non-literal mapping. + +When computing the cardinality of mappings in a set (e.g. to set the value of the `mapping_cardinality` slot), if the mapping has a literal subject (resp. object), then the `subject_label` (resp. `object_label`) slot must be used for determining the number of occurrences of the subject (resp. object) in the set. + + ## Representing unmapped entities The special value `sssom:NoTermFound` MAY be used as the `object_id` of a mapping to explicitly state that the subject of said mapping cannot be mapped to any entity in the domain represented by the `object_source` slot. diff --git a/src/docs/sssom-profiles.md b/src/docs/sssom-profiles.md deleted file mode 100644 index b46e838d..00000000 --- a/src/docs/sssom-profiles.md +++ /dev/null @@ -1,17 +0,0 @@ -## SSSOM Profiles - -- [Literal Mappings](#literal) - - - -### Literal Mappings - -The SSSOM profile for literal mappings is a version of SSSOM that allows the dissemination and standardisation of mappings between identifers and literals. - -As of 01.08.2023, the first version of this profile has been published, and it is still subject to change. We recommend to reach out on the [SSSOM issue tracker](https://github.com/mapping-commons/sssom/issues) if you are interested in using the literal profile. Note: we dont expect there to be any major breaking changes. - -**Demand better docs now**: https://github.com/mapping-commons/sssom/issues - -- [Slides](https://docs.google.com/presentation/d/1mBZK6KS7JgmXlEtszQiOa_Cl7SXg_Z8wRp0tZHaL57Y/edit) -- [PR](https://github.com/mapping-commons/sssom/pull/235) -- [Recording/discussion](events/mc2023.md) \ No newline at end of file diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index 9227f7d4..b20b2718 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -47,7 +47,7 @@ enums: meaning: rdfs:Literal description: "'rdfs literal' used in SSSOM files to express that an entity is represented by a literal." see_also: - - https://mapping-commons.github.io/sssom/sssom-profiles/ + - https://mapping-commons.github.io/sssom/spec-model/#literal-mappings - https://github.com/mapping-commons/sssom/issues/234 rdfs datatype: meaning: rdfs:Datatype From 7ee07d3238917faa553e401e2550d0f35d7b412b Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Tue, 6 Aug 2024 19:41:33 +0100 Subject: [PATCH 2/2] Amend in-schema description of "rdfs literal". Attempt to clarify the in-schema description of the `rdfs literal` value. Also explicitly state that it can only be used to describe the subject and/or the object, but not the predicate. --- src/sssom_schema/schema/sssom_schema.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index b20b2718..67e6e258 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -45,7 +45,7 @@ enums: meaning: rdfs:Class rdfs literal: meaning: rdfs:Literal - description: "'rdfs literal' used in SSSOM files to express that an entity is represented by a literal." + description: This value indicate that the entity being mapped is not a semantic entity with a distinct identifier, but is instead represented entirely by its literal label. This value MUST NOT be used in the predicate_type slot. see_also: - https://mapping-commons.github.io/sssom/spec-model/#literal-mappings - https://github.com/mapping-commons/sssom/issues/234