Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amendments to the "new literal profile" PR #387

Merged
merged 2 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading