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..67e6e258 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -45,9 +45,9 @@ 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/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