Skip to content

Commit

Permalink
Add support for extension slots (#375)
Browse files Browse the repository at this point in the history
This commit updates the SSSOM model to allow for _defined extensions_ as
proposed in #328.

It also updates the description of the data model to describe the use of
both defined and undefined extension, and the specification of the
SSSOM/TSV format to explain how SSSOM/TSV parsers and writers should
deal with such extensions.

Overall, this is exactly what was proposed in [this
comment](#328 (comment))
in #328, except that here we need to split the specification in two
parts (one about extensions in general, independently of the
serialisation format, and one about the SSSOM/TSV serialisation of
extensions), while the initial proposition was in a single block.

Co-authored-by: Nico Matentzoglu <[email protected]>
  • Loading branch information
gouttegd and matentzn authored Aug 6, 2024
1 parent 66d32ad commit 47d2a3f
Show file tree
Hide file tree
Showing 19 changed files with 4,170 additions and 1,055 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Next

- Add the concept of "propagatable slots".
- Add the concept of "extension slots".
- Add the entity reference `sssom:NoTermFound` to express the concept of an "unmapped entity" ([issue](https://github.com/mapping-commons/sssom/issues/28))
- Replace `semantic_similarity_score` with `similarity_score` and `semantic_similarity_measure` with `similarity_measure` in the data model ([issue](https://github.com/mapping-commons/sssom/issues/385))

Expand Down
23 changes: 23 additions & 0 deletions examples/schema/extension-slots.sssom.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#curie_map:
# COMENT: https://example.com/entities/
# EXPROP: https://example.org/properties/
# ORGENT: https://example.org/entities/
#mapping_set_id: https://example.org/sets/exo2c-with-extensions
#mapping_set_title: Sample set EXO2C with extension slots
#license: https://creativecommons.org/licenses/by/4.0/
#extension_definitions:
# - slot_name: ext_bar
# property: EXPROP:barProperty
# type_hint: xsd:integer
# - slot_name: ext_baz
# property: EXPROP:bazProperty
# type_hint: linkml:Uriorcurie
# - slot_name: ext_foo
# property: EXPROP:fooProperty
#ext_foo: Foo A
#ext_undeclared_foo: Foo B
subject_id subject_label predicate_id object_id object_label mapping_justification ext_bar ext_baz ext_undeclared_baz
ORGENT:0001 alice skos:closeMatch COMENT:0011 alpha semapv:ManualMappingCuration 111 ORGENT:BAZ_0001 BAZ A
ORGENT:0002 bob skos:closeMatch COMENT:0012 beta semapv:ManualMappingCuration 112 ORGENT:BAZ_0002
ORGENT:0004 daphne skos:closeMatch COMENT:0014 delta semapv:ManualMappingCuration 114 Baz C
ORGENT:0005 eve skos:closeMatch COMENT:0015 epsilon semapv:ManualMappingCuration 115 ORGENT:BAZ_0005 Baz E
Binary file modified project/excel/sssom_schema.xlsx
Binary file not shown.
54 changes: 54 additions & 0 deletions project/graphql/sssom_schema.graphql
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
type ExtensionDefinition
{
slotName: Ncname!
property: Uriorcurie
typeHint: Uriorcurie
}

type LiteralMapping
{
literal: String!
literalDatatype: Uri
predicateId: EntityReference!
predicateLabel: String
predicateModifier: PredicateModifierEnum
objectId: EntityReference!
objectLabel: String
objectCategory: String
mappingJustification: EntityReference!
authorId: [EntityReference]
authorLabel: [String]
reviewerId: [EntityReference]
reviewerLabel: [String]
creatorId: [EntityReference]
creatorLabel: [String]
license: Uri
literalSource: EntityReference
literalSourceVersion: String
objectType: EntityTypeEnum
objectSource: EntityReference
objectSourceVersion: String
mappingProvider: Uri
mappingSource: EntityReference
mappingCardinality: MappingCardinalityEnum
mappingTool: String
mappingToolVersion: String
mappingDate: Date
confidence: Double
objectMatchField: [EntityReference]
matchString: [String]
literalPreprocessing: [EntityReference]
objectPreprocessing: [EntityReference]
similarityScore: Double
similarityMeasure: String
seeAlso: [String]
other: String
comment: String
}

type Mapping
{
subjectId: EntityReference!
Expand Down Expand Up @@ -88,6 +136,7 @@ type MappingSet
issueTracker: Uri
other: String
comment: String
extensionDefinitions: [ExtensionDefinition]
}

type MappingSetReference
Expand All @@ -100,3 +149,8 @@ type MappingSetReference
localName: String
}

type Propagatable
{
propagated: Boolean
}

Loading

0 comments on commit 47d2a3f

Please sign in to comment.