Skip to content

Commit

Permalink
Amendments to the "new literal profile" PR (#387)
Browse files Browse the repository at this point in the history
This commit amends the #384 PR to:

* describe what literal mappings are and how they should be used;
* remove the old page about “SSSOM profiles”, which is no longer
relevant (literal mappings are not a “profile”);
* attempt to better describe `rdfs literal` in the built-in schema
documentation.
  • Loading branch information
gouttegd authored Aug 6, 2024
1 parent 9fa9b6f commit 2e33756
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions src/docs/spec-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<a id="literal-mappings"></a>

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.
Expand Down
17 changes: 0 additions & 17 deletions src/docs/sssom-profiles.md

This file was deleted.

4 changes: 2 additions & 2 deletions src/sssom_schema/schema/sssom_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e33756

Please # to comment.