diff --git a/CHANGELOG.md b/CHANGELOG.md index 14db1dbe..0fbf32c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next - Add the concept of "propagatable slots". +- Add the `curie_map` to the model (instead of it being a specificity of the SSSOM/TSV format). - 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)) diff --git a/examples/schema/curie_map.sssom.tsv b/examples/schema/curie_map.sssom.tsv new file mode 100644 index 00000000..1dfc3549 --- /dev/null +++ b/examples/schema/curie_map.sssom.tsv @@ -0,0 +1,14 @@ +#curie_map: +# HP: http://purl.obolibrary.org/obo/HP_ +# MP: http://purl.obolibrary.org/obo/MP_ +# orcid: https://orcid.org/ +#mapping_set_id: https://w3id.org/sssom/commons/examples/curie_map.sssom.tsv +#license: "https://creativecommons.org/publicdomain/zero/1.0/" +#creator_id: +# - orcid:0000-0002-7356-1779 +#mapping_provider: "https://w3id.org/sssom/core_team" +#comment: This is an example file for the SSSOM for illustration only. Its contents are entirely fabricated. +subject_id predicate_id object_id mapping_justification +HP:0009124 skos:exactMatch MP:0000003 semapv:ManualMappingCuration +HP:0008551 skos:exactMatch MP:0000018 semapv:ManualMappingCuration +HP:0000411 skos:exactMatch MP:0000021 semapv:ManualMappingCuration diff --git a/project/excel/sssom_schema.xlsx b/project/excel/sssom_schema.xlsx index 7216460e..ad3f8580 100644 Binary files a/project/excel/sssom_schema.xlsx and b/project/excel/sssom_schema.xlsx differ diff --git a/project/graphql/sssom_schema.graphql b/project/graphql/sssom_schema.graphql index d0f66a04..6601b366 100644 --- a/project/graphql/sssom_schema.graphql +++ b/project/graphql/sssom_schema.graphql @@ -5,47 +5,6 @@ type ExtensionDefinition 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! @@ -86,8 +45,8 @@ type Mapping matchString: [String] subjectPreprocessing: [EntityReference] objectPreprocessing: [EntityReference] - semanticSimilarityScore: Double - semanticSimilarityMeasure: String + similarityScore: Double + similarityMeasure: String seeAlso: [String] issueTrackerItem: EntityReference other: String @@ -108,6 +67,7 @@ type MappingRegistry type MappingSet { + curieMap: [Prefix] mappings: [Mapping] mappingSetId: Uri! mappingSetVersion: String @@ -149,6 +109,16 @@ type MappingSetReference localName: String } +type NoTermFound + { + } + +type Prefix + { + prefixName: Ncname! + prefixUrl: Uri + } + type Propagatable { propagated: Boolean diff --git a/project/jsonld/sssom_schema.context.jsonld b/project/jsonld/sssom_schema.context.jsonld index e1851867..390edf8f 100644 --- a/project/jsonld/sssom_schema.context.jsonld +++ b/project/jsonld/sssom_schema.context.jsonld @@ -1,7 +1,7 @@ { "comments": { "description": "Auto generated by LinkML jsonld context generator", - "generation_date": "2024-08-05T10:18:22", + "generation_date": "2024-08-06T18:58:48", "source": "sssom_schema.yaml" }, "@context": { @@ -46,6 +46,10 @@ "curation_rule_text": { "@id": "curation_rule_text" }, + "curie_map": { + "@type": "@id", + "@id": "curie_map" + }, "documentation": { "@type": "@id", "@id": "documentation" @@ -89,24 +93,6 @@ "@type": "@id", "@id": "dcterms:license" }, - "literal": { - "@id": "owl:annotatedTarget" - }, - "literal_datatype": { - "@type": "@id", - "@id": "rdf:datatype" - }, - "literal_preprocessing": { - "@type": "rdfs:Resource", - "@id": "literal_preprocessing" - }, - "literal_source": { - "@type": "rdfs:Resource", - "@id": "literal_source" - }, - "literal_source_version": { - "@id": "literal_source_version" - }, "local_name": { "@id": "local_name" }, @@ -248,6 +234,13 @@ }, "@id": "predicate_type" }, + "prefix_name": { + "@id": "prefix_name" + }, + "prefix_url": { + "@type": "@id", + "@id": "prefix_url" + }, "propagated": { "@type": "xsd:boolean", "@id": "propagated" @@ -270,13 +263,6 @@ "see_also": { "@id": "rdfs:seeAlso" }, - "semantic_similarity_measure": { - "@id": "semantic_similarity_measure" - }, - "semantic_similarity_score": { - "@type": "xsd:double", - "@id": "semantic_similarity_score" - }, "similarity_measure": { "@id": "similarity_measure" }, @@ -321,9 +307,6 @@ "ExtensionDefinition": { "@id": "ExtensionDefinition" }, - "LiteralMapping": { - "@id": "owl:Axiom" - }, "Mapping": { "@id": "owl:Axiom" }, @@ -336,6 +319,12 @@ "MappingSetReference": { "@id": "MappingSetReference" }, + "NoTermFound": { + "@id": "NoTermFound" + }, + "Prefix": { + "@id": "Prefix" + }, "Propagatable": { "@id": "Propagatable" } diff --git a/project/jsonld/sssom_schema.jsonld b/project/jsonld/sssom_schema.jsonld index a0a43e18..f894b457 100644 --- a/project/jsonld/sssom_schema.jsonld +++ b/project/jsonld/sssom_schema.jsonld @@ -482,6 +482,52 @@ } ], "slots": [ + { + "name": "prefix_name", + "definition_uri": "https://w3id.org/sssom/prefix_name", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/prefix_name", + "key": true, + "owner": "Prefix", + "domain_of": [ + "Prefix" + ], + "range": "ncname", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "prefix_url", + "definition_uri": "https://w3id.org/sssom/prefix_url", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/prefix_url", + "owner": "Prefix", + "domain_of": [ + "Prefix" + ], + "range": "uri", + "@type": "SlotDefinition" + }, + { + "name": "curie_map", + "definition_uri": "https://w3id.org/sssom/curie_map", + "description": "A dictionary that contains prefixes as keys and their URI expansions as values.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/225", + "https://github.com/mapping-commons/sssom/pull/349", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/curie_map.sssom.tsv" + ], + "slot_uri": "https://w3id.org/sssom/curie_map", + "multivalued": true, + "owner": "MappingSet", + "domain_of": [ + "MappingSet" + ], + "range": "Prefix", + "inlined": true, + "@type": "SlotDefinition" + }, { "name": "mirror_from", "definition_uri": "https://w3id.org/sssom/mirror_from", @@ -672,55 +718,6 @@ "required": true, "@type": "SlotDefinition" }, - { - "name": "literal", - "definition_uri": "https://w3id.org/sssom/literal", - "description": "The literal being mapped", - "examples": [ - { - "value": "Alzheimer", - "description": "A string referring to some thing.", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "mappings": [ - "http://www.w3.org/2002/07/owl#annotatedTarget", - "http://www.w3.org/2002/07/owl#annotatedSource" - ], - "slot_uri": "http://www.w3.org/2002/07/owl#annotatedTarget", - "owner": "LiteralMapping", - "domain_of": [ - "LiteralMapping" - ], - "range": "string", - "required": true, - "@type": "SlotDefinition" - }, - { - "name": "literal_datatype", - "definition_uri": "https://w3id.org/sssom/literal_datatype", - "description": "The datatype of the literal being mapped", - "examples": [ - { - "value": "xsd:string", - "description": "A string referring to some thing.", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "mappings": [ - "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype", - "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype" - ], - "slot_uri": "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype", - "owner": "LiteralMapping", - "domain_of": [ - "LiteralMapping" - ], - "range": "uri", - "@type": "SlotDefinition" - }, { "name": "subject_label", "definition_uri": "https://w3id.org/sssom/subject_label", @@ -809,55 +806,6 @@ "name": "predicate_id", "definition_uri": "https://w3id.org/sssom/predicate_id", "description": "The ID of the predicate or relation that relates the subject and object of this match.", - "examples": [ - { - "value": "skos:exactMatch", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "mappings": [ - "http://www.w3.org/2002/07/owl#annotatedProperty", - "http://www.w3.org/2002/07/owl#annotatedProperty" - ], - "slot_uri": "http://www.w3.org/2002/07/owl#annotatedProperty", - "owner": "LiteralMapping", - "domain_of": [ - "Mapping", - "LiteralMapping" - ], - "range": "EntityReference", - "required": true, - "@type": "SlotDefinition" - }, - { - "name": "predicate_modifier", - "definition_uri": "https://w3id.org/sssom/predicate_modifier", - "description": "A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion", - "examples": [ - { - "value": "Not", - "description": "Negates the predicate, see documentation of predicate_modifier_enum", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "see_also": [ - "https://github.com/mapping-commons/sssom/issues/107" - ], - "slot_uri": "https://w3id.org/sssom/predicate_modifier", - "owner": "LiteralMapping", - "domain_of": [ - "Mapping", - "LiteralMapping" - ], - "range": "predicate_modifier_enum", - "@type": "SlotDefinition" - }, - { - "name": "predicate_label", - "definition_uri": "https://w3id.org/sssom/predicate_label", - "description": "The label of the predicate/relation of the mapping", "examples": [ { "value": "owl:sameAs", @@ -921,11 +869,58 @@ } ], "from_schema": "https://w3id.org/sssom/schema/", + "mappings": [ + "http://www.w3.org/2002/07/owl#annotatedProperty", + "http://www.w3.org/2002/07/owl#annotatedProperty" + ], + "slot_uri": "http://www.w3.org/2002/07/owl#annotatedProperty", + "owner": "Mapping", + "domain_of": [ + "Mapping" + ], + "range": "EntityReference", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "predicate_modifier", + "definition_uri": "https://w3id.org/sssom/predicate_modifier", + "description": "A modifier for negating the predicate. See https://github.com/mapping-commons/sssom/issues/40 for discussion", + "examples": [ + { + "value": "Not", + "description": "Negates the predicate, see documentation of predicate_modifier_enum", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/107" + ], + "slot_uri": "https://w3id.org/sssom/predicate_modifier", + "owner": "Mapping", + "domain_of": [ + "Mapping" + ], + "range": "predicate_modifier_enum", + "@type": "SlotDefinition" + }, + { + "name": "predicate_label", + "definition_uri": "https://w3id.org/sssom/predicate_label", + "description": "The label of the predicate/relation of the mapping", + "examples": [ + { + "value": "has cross-reference", + "description": "The label of the oboInOwl:hasDbXref property to represent cross-references.", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/predicate_label", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -966,10 +961,9 @@ "http://www.w3.org/2002/07/owl#annotatedTarget" ], "slot_uri": "http://www.w3.org/2002/07/owl#annotatedTarget", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "required": true, @@ -987,10 +981,9 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_label", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "recommended": true, @@ -1023,10 +1016,9 @@ "https://github.com/mapping-commons/sssom/issues/256" ], "slot_uri": "https://w3id.org/sssom/object_category", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1047,10 +1039,9 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_justification", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "required": true, @@ -1117,11 +1108,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_type", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "entity_type_enum", "@type": "SlotDefinition" @@ -1243,11 +1233,10 @@ ], "slot_uri": "http://purl.org/dc/terms/creator", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1259,11 +1248,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/creator_label", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1278,10 +1266,9 @@ ], "slot_uri": "http://purl.org/pav/authoredBy", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1293,10 +1280,9 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/author_label", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1308,10 +1294,9 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_id", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1323,10 +1308,9 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_label", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1340,11 +1324,10 @@ "http://purl.org/dc/terms/license" ], "slot_uri": "http://purl.org/dc/terms/license", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1416,51 +1399,6 @@ "range": "string", "@type": "SlotDefinition" }, - { - "name": "literal_source", - "definition_uri": "https://w3id.org/sssom/literal_source", - "description": "URI of ontology source for the literal.", - "examples": [ - { - "value": "obo:mondo.owl", - "description": "A persistent OBO CURIE pointing to the latest version of the Mondo ontology.", - "@type": "Example" - }, - { - "value": "wikidata:Q7876491", - "description": "A Wikidata identifier for the Uberon ontology resource.", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "slot_uri": "https://w3id.org/sssom/literal_source", - "owner": "LiteralMapping", - "domain_of": [ - "LiteralMapping" - ], - "range": "EntityReference", - "@type": "SlotDefinition" - }, - { - "name": "literal_source_version", - "definition_uri": "https://w3id.org/sssom/literal_source_version", - "description": "Version IRI or version string of the source of the literal.", - "examples": [ - { - "value": "http://purl.obolibrary.org/obo/mondo/releases/2021-01-30/mondo.owl", - "description": "(A persistent Version IRI pointing to the Mondo version '2021-01-30')", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "slot_uri": "https://w3id.org/sssom/literal_source_version", - "owner": "LiteralMapping", - "domain_of": [ - "LiteralMapping" - ], - "range": "string", - "@type": "SlotDefinition" - }, { "name": "object_source", "definition_uri": "https://w3id.org/sssom/object_source", @@ -1489,11 +1427,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1521,11 +1458,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source_version", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1546,11 +1482,10 @@ "description": "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_provider", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1591,10 +1526,9 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_source", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1605,10 +1539,9 @@ "description": "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_cardinality", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "mapping_cardinality_enum", "@type": "SlotDefinition" @@ -1635,11 +1568,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1666,11 +1598,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool_version", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1694,11 +1625,10 @@ "http://purl.org/pav/authoredOn" ], "slot_uri": "http://purl.org/pav/authoredOn", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "date", "@type": "SlotDefinition" @@ -1726,10 +1656,9 @@ "description": "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/confidence", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "double", "minimum_value": 0.0, @@ -1778,11 +1707,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_match_field", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1794,10 +1722,9 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/match_string", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1864,35 +1791,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_preprocessing", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" - ], - "range": "EntityReference", - "@type": "SlotDefinition" - }, - { - "name": "literal_preprocessing", - "definition_uri": "https://w3id.org/sssom/literal_preprocessing", - "description": "Method of preprocessing applied to the literal.", - "examples": [ - { - "value": "semapv:Stemming", - "@type": "Example" - }, - { - "value": "semapv:StopWordRemoval", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "slot_uri": "https://w3id.org/sssom/literal_preprocessing", - "multivalued": true, - "owner": "LiteralMapping", - "domain_of": [ - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1935,50 +1837,20 @@ "range": "string", "@type": "SlotDefinition" }, - { - "name": "semantic_similarity_score", - "definition_uri": "https://w3id.org/sssom/semantic_similarity_score", - "description": "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence.", - "from_schema": "https://w3id.org/sssom/schema/", - "slot_uri": "https://w3id.org/sssom/semantic_similarity_score", - "owner": "Mapping", - "domain_of": [ - "Mapping" - ], - "range": "double", - "minimum_value": 0.0, - "maximum_value": 1.0, - "@type": "SlotDefinition" - }, - { - "name": "semantic_similarity_measure", - "definition_uri": "https://w3id.org/sssom/semantic_similarity_measure", - "description": "The measure used for computing the the semantic similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable.", - "examples": [ - { - "value": "https://www.wikidata.org/wiki/Q865360", - "description": "(the Wikidata identifier for the Jaccard index measure).", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "slot_uri": "https://w3id.org/sssom/semantic_similarity_measure", - "owner": "Mapping", - "domain_of": [ - "Mapping" - ], - "range": "string", - "@type": "SlotDefinition" - }, { "name": "similarity_score", "definition_uri": "https://w3id.org/sssom/similarity_score", - "description": "A score between 0 and 1 to denote the similarity, where 1 denotes equivalence.", + "description": "A score between 0 and 1 to denote the similarity between two entities, where 1 denotes equivalence, and 0 denotes disjointness. The score is meant to be used in conjunction with the similarity_measure field, to document, for example, the lexical or semantic match of a matching algorithm.", "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/385", + "https://github.com/mapping-commons/sssom/pull/386", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/similarity_score.sssom.tsv" + ], "slot_uri": "https://w3id.org/sssom/similarity_score", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "LiteralMapping" + "Mapping" ], "range": "double", "minimum_value": 0.0, @@ -1988,19 +1860,34 @@ { "name": "similarity_measure", "definition_uri": "https://w3id.org/sssom/similarity_measure", - "description": "The measure used for computing the the similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable.", + "description": "The measure used for computing a similarity score. This field is meant to be used in conjunction with the similarity_score field, to document, for example, the lexical or semantic match of a matching algorithm. To make processing this field as unambiguous as possible, we recommend using wikidata CURIEs, but the type of this field is deliberately unspecified.", "examples": [ { - "value": "https://www.wikidata.org/wiki/Q865360", - "description": "(the Wikidata identifier for the Jaccard index measure).", + "value": "https://www.wikidata.org/entity/Q865360", + "description": "(the Wikidata IRI for the Jaccard index measure).", + "@type": "Example" + }, + { + "value": "wikidata:Q865360", + "description": "(the Wikidata CURIE for the Jaccard index measure).", + "@type": "Example" + }, + { + "value": "Levenshtein distance", + "description": "(a score to measure the distance between two character sequences).", "@type": "Example" } ], "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/385", + "https://github.com/mapping-commons/sssom/pull/386", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/similarity_score.sssom.tsv" + ], "slot_uri": "https://w3id.org/sssom/similarity_measure", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -2066,11 +1953,10 @@ ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#seeAlso", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -2081,11 +1967,10 @@ "description": "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/other", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -2099,11 +1984,10 @@ "http://www.w3.org/2000/01/rdf-schema#comment" ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#comment", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -2210,6 +2094,7 @@ "description": "Represents a set of mappings", "from_schema": "https://w3id.org/sssom/schema/", "slots": [ + "curie_map", "mappings", "mapping_set_id", "mapping_set_version", @@ -2291,64 +2176,10 @@ "match_string", "subject_preprocessing", "object_preprocessing", - "semantic_similarity_score", - "semantic_similarity_measure", - "see_also", - "issue_tracker_item", - "other", - "comment" - ], - "slot_usage": {}, - "class_uri": "http://www.w3.org/2002/07/owl#Axiom", - "@type": "ClassDefinition" - }, - { - "name": "LiteralMapping", - "definition_uri": "https://w3id.org/sssom/LiteralMapping", - "description": "Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change.", - "from_schema": "https://w3id.org/sssom/schema/", - "see_also": [ - "https://mapping-commons.github.io/sssom/sssom-profiles/" - ], - "mappings": [ - "owl:Axiom" - ], - "slots": [ - "literal", - "literal_datatype", - "predicate_id", - "predicate_label", - "predicate_modifier", - "object_id", - "object_label", - "object_category", - "mapping_justification", - "author_id", - "author_label", - "reviewer_id", - "reviewer_label", - "creator_id", - "creator_label", - "license", - "literal_source", - "literal_source_version", - "object_type", - "object_source", - "object_source_version", - "mapping_provider", - "mapping_source", - "mapping_cardinality", - "mapping_tool", - "mapping_tool_version", - "mapping_date", - "confidence", - "object_match_field", - "match_string", - "literal_preprocessing", - "object_preprocessing", "similarity_score", "similarity_measure", "see_also", + "issue_tracker_item", "other", "comment" ], @@ -2392,6 +2223,18 @@ "class_uri": "https://w3id.org/sssom/MappingSetReference", "@type": "ClassDefinition" }, + { + "name": "Prefix", + "definition_uri": "https://w3id.org/sssom/Prefix", + "from_schema": "https://w3id.org/sssom/schema/", + "slots": [ + "prefix_name", + "prefix_url" + ], + "slot_usage": {}, + "class_uri": "https://w3id.org/sssom/Prefix", + "@type": "ClassDefinition" + }, { "name": "ExtensionDefinition", "definition_uri": "https://w3id.org/sssom/ExtensionDefinition", @@ -2452,13 +2295,29 @@ ], "class_uri": "https://w3id.org/sssom/Propagatable", "@type": "ClassDefinition" + }, + { + "name": "NoTermFound", + "definition_uri": "https://w3id.org/sssom/NoTermFound", + "description": "sssom:NoTermFound can be used in place of a subject_id or object_id when the corresponding entity could not be found. It SHOULD be used in conjuction with a corresponding subject_source or object_source to signify where the term was not found.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/28", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/no_term_found.sssom.tsv" + ], + "mappings": [ + "sssom:NoTermFound" + ], + "slot_usage": {}, + "class_uri": "https://w3id.org/sssom/NoTermFound", + "@type": "ClassDefinition" } ], "metamodel_version": "1.7.0", "source_file": "sssom_schema.yaml", - "source_file_date": "2024-08-04T07:56:31", - "source_file_size": 32305, - "generation_date": "2024-08-05T10:18:22", + "source_file_date": "2024-08-06T18:58:28", + "source_file_size": 31410, + "generation_date": "2024-08-06T18:58:48", "@type": "SchemaDefinition", "@context": [ "project/jsonld/sssom_schema.context.jsonld", diff --git a/project/jsonschema/sssom_schema.schema.json b/project/jsonschema/sssom_schema.schema.json index 18658521..870e5d8a 100644 --- a/project/jsonschema/sssom_schema.schema.json +++ b/project/jsonschema/sssom_schema.schema.json @@ -41,236 +41,6 @@ "title": "ExtensionDefinition", "type": "object" }, - "LiteralMapping": { - "additionalProperties": false, - "description": "Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change.", - "properties": { - "author_id": { - "description": "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "author_label": { - "description": "A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead.", - "items": { - "type": "string" - }, - "type": "array" - }, - "comment": { - "description": "Free text field containing either curator notes or text generated by tool providing additional informative information.", - "type": "string" - }, - "confidence": { - "description": "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence.", - "maximum": 1.0, - "minimum": 0.0, - "type": "number" - }, - "creator_id": { - "description": "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creator_label": { - "description": "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead.", - "items": { - "type": "string" - }, - "type": "array" - }, - "license": { - "description": "A url to the license of the mapping. In absence of a license we assume no license.", - "type": "string" - }, - "literal": { - "description": "The literal being mapped", - "type": "string" - }, - "literal_datatype": { - "description": "The datatype of the literal being mapped", - "type": "string" - }, - "literal_preprocessing": { - "description": "Method of preprocessing applied to the literal.", - "items": { - "type": "string" - }, - "type": "array" - }, - "literal_source": { - "description": "URI of ontology source for the literal.", - "type": "string" - }, - "literal_source_version": { - "description": "Version IRI or version string of the source of the literal.", - "type": "string" - }, - "mapping_cardinality": { - "$ref": "#/$defs/MappingCardinalityEnum", - "description": "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set." - }, - "mapping_date": { - "description": "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file.", - "format": "date", - "type": "string" - }, - "mapping_justification": { - "anyOf": [ - { - "const": "semapv:LexicalMatching" - }, - { - "const": "semapv:LogicalReasoning" - }, - { - "const": "semapv:CompositeMatching" - }, - { - "const": "semapv:UnspecifiedMatching" - }, - { - "const": "semapv:SemanticSimilarityThresholdMatching" - }, - { - "const": "semapv:LexicalSimilarityThresholdMatching" - }, - { - "const": "semapv:MappingChaining" - }, - { - "const": "semapv:MappingReview" - }, - { - "const": "semapv:ManualMappingCuration" - } - ], - "description": "A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable.", - "pattern": "^semapv:(MappingReview|ManualMappingCuration|LogicalReasoning|LexicalMatching|CompositeMatching|UnspecifiedMatching|SemanticSimilarityThresholdMatching|LexicalSimilarityThresholdMatching|MappingChaining)$", - "type": "string" - }, - "mapping_provider": { - "description": "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived.", - "type": "string" - }, - "mapping_source": { - "description": "The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another.", - "type": "string" - }, - "mapping_tool": { - "description": "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text.", - "type": "string" - }, - "mapping_tool_version": { - "description": "Version string that denotes the version of the mapping tool used.", - "type": "string" - }, - "match_string": { - "description": "String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots.", - "items": { - "type": "string" - }, - "type": "array" - }, - "object_category": { - "description": "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases.", - "type": "string" - }, - "object_id": { - "description": "The ID of the object of the mapping.", - "type": "string" - }, - "object_label": { - "description": "The label of object of the mapping", - "type": "string" - }, - "object_match_field": { - "description": "A list of properties (term annotations on the object) that was used for the match.", - "items": { - "type": "string" - }, - "type": "array" - }, - "object_preprocessing": { - "description": "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", - "items": { - "type": "string" - }, - "type": "array" - }, - "object_source": { - "description": "URI of vocabulary or identifier source for the object.", - "type": "string" - }, - "object_source_version": { - "description": "Version IRI or version string of the source of the object term.", - "type": "string" - }, - "object_type": { - "$ref": "#/$defs/EntityTypeEnum", - "description": "The type of entity that is being mapped." - }, - "other": { - "description": "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data.", - "type": "string" - }, - "predicate_id": { - "description": "The ID of the predicate or relation that relates the subject and object of this match.", - "type": "string" - }, - "predicate_label": { - "description": "The label of the predicate/relation of the mapping", - "type": "string" - }, - "predicate_modifier": { - "$ref": "#/$defs/PredicateModifierEnum", - "description": "A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" - }, - "reviewer_id": { - "description": "Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "reviewer_label": { - "description": "A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead.", - "items": { - "type": "string" - }, - "type": "array" - }, - "see_also": { - "description": "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment", - "items": { - "type": "string" - }, - "type": "array" - }, - "similarity_measure": { - "description": "The measure used for computing the the similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable.", - "type": "string" - }, - "similarity_score": { - "description": "A score between 0 and 1 to denote the similarity, where 1 denotes equivalence.", - "maximum": 1.0, - "minimum": 0.0, - "type": "number" - } - }, - "required": [ - "literal", - "predicate_id", - "object_id", - "mapping_justification" - ], - "title": "LiteralMapping", - "type": "object" - }, "Mapping": { "additionalProperties": false, "description": "Represents an individual mapping between a pair of entities", @@ -453,7 +223,7 @@ }, "predicate_modifier": { "$ref": "#/$defs/PredicateModifierEnum", - "description": "A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" + "description": "A modifier for negating the predicate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" }, "publication_date": { "description": "The date the mapping was published. This is different from the date the mapping was asserted.", @@ -481,12 +251,12 @@ }, "type": "array" }, - "semantic_similarity_measure": { - "description": "The measure used for computing the the semantic similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable.", + "similarity_measure": { + "description": "The measure used for computing a similarity score. This field is meant to be used in conjunction with the similarity_score field, to document, for example, the lexical or semantic match of a matching algorithm. To make processing this field as unambiguous as possible, we recommend using wikidata CURIEs, but the type of this field is deliberately unspecified.", "type": "string" }, - "semantic_similarity_score": { - "description": "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence.", + "similarity_score": { + "description": "A score between 0 and 1 to denote the similarity between two entities, where 1 denotes equivalence, and 0 denotes disjointness. The score is meant to be used in conjunction with the similarity_measure field, to document, for example, the lexical or semantic match of a matching algorithm.", "maximum": 1.0, "minimum": 0.0, "type": "number" @@ -623,6 +393,23 @@ }, "type": "array" }, + "curie_map": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/$defs/Prefix__identifier_optional" + }, + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "description": "A dictionary that contains prefixes as keys and their URI expansions as values.", + "type": "object" + }, "extension_definitions": { "description": "A list that defines the extension slots used in the mapping set.", "items": { @@ -797,6 +584,12 @@ "title": "MappingSetReference", "type": "object" }, + "NoTermFound": { + "additionalProperties": false, + "description": "sssom:NoTermFound can be used in place of a subject_id or object_id when the corresponding entity could not be found. It SHOULD be used in conjuction with a corresponding subject_source or object_source to signify where the term was not found.", + "title": "NoTermFound", + "type": "object" + }, "PredicateModifierEnum": { "description": "", "enum": [ @@ -805,6 +598,38 @@ "title": "PredicateModifierEnum", "type": "string" }, + "Prefix": { + "additionalProperties": false, + "description": "", + "properties": { + "prefix_name": { + "type": "string" + }, + "prefix_url": { + "type": "string" + } + }, + "required": [ + "prefix_name" + ], + "title": "Prefix", + "type": "object" + }, + "Prefix__identifier_optional": { + "additionalProperties": false, + "description": "", + "properties": { + "prefix_name": { + "type": "string" + }, + "prefix_url": { + "type": "string" + } + }, + "required": [], + "title": "Prefix", + "type": "object" + }, "Propagatable": { "additionalProperties": false, "description": "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class.", diff --git a/project/prefixmap/sssom_schema.yaml b/project/prefixmap/sssom_schema.yaml index 52f4e269..3c3a21cd 100644 --- a/project/prefixmap/sssom_schema.yaml +++ b/project/prefixmap/sssom_schema.yaml @@ -11,9 +11,6 @@ "skos": "http://www.w3.org/2004/02/skos/core#", "sssom": "https://w3id.org/sssom/", "xsd": "http://www.w3.org/2001/XMLSchema#", - "LiteralMapping": { - "@id": "owl:Axiom" - }, "Mapping": { "@id": "owl:Axiom" } diff --git a/project/protobuf/sssom_schema.proto b/project/protobuf/sssom_schema.proto index 0416f611..1e888573 100644 --- a/project/protobuf/sssom_schema.proto +++ b/project/protobuf/sssom_schema.proto @@ -5,47 +5,6 @@ message ExtensionDefinition uriorcurie property = 0 uriorcurie typeHint = 0 } -// Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change. -message LiteralMapping - { - string literal = 0 - uri literalDatatype = 0 - entityReference predicateId = 0 - string predicateLabel = 0 - predicateModifierEnum predicateModifier = 0 - entityReference objectId = 0 - string objectLabel = 0 - string objectCategory = 0 - entityReference mappingJustification = 0 - repeated entityReference authorId = 0 - repeated string authorLabel = 0 - repeated entityReference reviewerId = 0 - repeated string reviewerLabel = 0 - repeated entityReference creatorId = 0 - repeated string creatorLabel = 0 - uri license = 0 - entityReference literalSource = 0 - string literalSourceVersion = 0 - entityTypeEnum objectType = 0 - entityReference objectSource = 0 - string objectSourceVersion = 0 - uri mappingProvider = 0 - entityReference mappingSource = 0 - mappingCardinalityEnum mappingCardinality = 0 - string mappingTool = 0 - string mappingToolVersion = 0 - date mappingDate = 0 - double confidence = 0 - repeated entityReference objectMatchField = 0 - repeated string matchString = 0 - repeated entityReference literalPreprocessing = 0 - repeated entityReference objectPreprocessing = 0 - double similarityScore = 0 - string similarityMeasure = 0 - repeated string seeAlso = 0 - string other = 0 - string comment = 0 - } // Represents an individual mapping between a pair of entities message Mapping { @@ -87,8 +46,8 @@ message Mapping repeated string matchString = 0 repeated entityReference subjectPreprocessing = 0 repeated entityReference objectPreprocessing = 0 - double semanticSimilarityScore = 0 - string semanticSimilarityMeasure = 0 + double similarityScore = 0 + string similarityMeasure = 0 repeated string seeAlso = 0 entityReference issueTrackerItem = 0 string other = 0 @@ -109,6 +68,7 @@ message MappingRegistry // Represents a set of mappings message MappingSet { + repeated prefix curieMap = 0 repeated mapping mappings = 0 uri mappingSetId = 0 string mappingSetVersion = 0 @@ -149,6 +109,11 @@ message MappingSetReference date lastUpdated = 0 string localName = 0 } +message Prefix + { + ncname prefixName = 0 + uri prefixUrl = 0 + } // Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class. message Propagatable { diff --git a/project/shacl/sssom_schema.shacl.ttl b/project/shacl/sssom_schema.shacl.ttl index 33edeecb..7e550916 100644 --- a/project/shacl/sssom_schema.shacl.ttl +++ b/project/shacl/sssom_schema.shacl.ttl @@ -13,11 +13,25 @@ sssom:MappingRegistry a sh:NodeShape ; sh:closed true ; sh:description "A registry for managing mapping sets. It holds a set of mapping set references, and can import other registries." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; - sh:description "The description of a mapping registry." ; + sh:property [ sh:datatype xsd:anyURI ; + sh:description "A URL to the documentation of this mapping commons." ; sh:maxCount 1 ; - sh:order 2 ; - sh:path sssom:mapping_registry_description ], + sh:order 5 ; + sh:path sssom:documentation ], + [ sh:datatype xsd:anyURI ; + sh:description "A URL location of the issue tracker for this entity." ; + sh:maxCount 1 ; + sh:order 7 ; + sh:path sssom:issue_tracker ], + [ sh:datatype xsd:anyURI ; + sh:description "A list of registries that should be imported into this one." ; + sh:order 3 ; + sh:path sssom:imports ], + [ sh:class sssom:MappingSetReference ; + sh:description "A list of mapping set references." ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 4 ; + sh:path sssom:mapping_set_references ], [ sh:datatype xsd:string ; sh:description "The title of a mapping registry." ; sh:maxCount 1 ; @@ -33,165 +47,162 @@ sssom:MappingRegistry a sh:NodeShape ; sh:minCount 1 ; sh:order 0 ; sh:path sssom:mapping_registry_id ], - [ sh:datatype xsd:anyURI ; - sh:description "A URL to the documentation of this mapping commons." ; - sh:maxCount 1 ; - sh:order 5 ; - sh:path sssom:documentation ], - [ sh:datatype xsd:anyURI ; - sh:description "A list of registries that should be imported into this one." ; - sh:order 3 ; - sh:path sssom:imports ], - [ sh:datatype xsd:anyURI ; - sh:description "A URL location of the issue tracker for this entity." ; + [ sh:datatype xsd:string ; + sh:description "The description of a mapping registry." ; sh:maxCount 1 ; - sh:order 7 ; - sh:path sssom:issue_tracker ], - [ sh:class sssom:MappingSetReference ; - sh:description "A list of mapping set references." ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 4 ; - sh:path sssom:mapping_set_references ] ; + sh:order 2 ; + sh:path sssom:mapping_registry_description ] ; sh:targetClass sssom:MappingRegistry . sssom:MappingSet a sh:NodeShape ; sh:closed true ; sh:description "Represents a set of mappings" ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:date ; - sh:description "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file." ; + sh:property [ sh:class owl:Axiom ; + sh:description "Contains a list of mapping objects" ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 1 ; + sh:path sssom:mappings ], + [ sh:description "URI of vocabulary or identifier source for the object." ; sh:maxCount 1 ; - sh:order 18 ; - sh:path pav:authoredOn ], - [ sh:description "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; - sh:order 22 ; - sh:path sssom:subject_preprocessing ], + sh:order 14 ; + sh:path sssom:object_source ], [ sh:description "The type of entity that is being mapped." ; sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; sh:maxCount 1 ; - sh:order 12 ; + sh:order 13 ; sh:path sssom:object_type ], [ sh:datatype xsd:string ; - sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; + sh:description "A description of the mapping set." ; sh:maxCount 1 ; - sh:order 27 ; - sh:path rdfs:comment ], - [ sh:description "A list of properties (term annotations on the object) that was used for the match." ; - sh:order 21 ; - sh:path sssom:object_match_field ], - [ sh:class owl:Axiom ; - sh:description "Contains a list of mapping objects" ; + sh:order 6 ; + sh:path dcterms:description ], + [ sh:class sssom:Prefix ; + sh:description "A dictionary that contains prefixes as keys and their URI expansions as values." ; sh:nodeKind sh:BlankNodeOrIRI ; sh:order 0 ; - sh:path sssom:mappings ], - [ sh:description "A list of properties (term annotations on the subject) that was used for the match." ; + sh:path sssom:curie_map ], + [ sh:datatype xsd:string ; + sh:description "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead." ; + sh:order 8 ; + sh:path sssom:creator_label ], + [ sh:datatype xsd:date ; + sh:description "The date the mapping was published. This is different from the date the mapping was asserted." ; + sh:maxCount 1 ; sh:order 20 ; - sh:path sssom:subject_match_field ], + sh:path dcterms:created ], + [ sh:datatype xsd:string ; + sh:description "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text." ; + sh:maxCount 1 ; + sh:order 17 ; + sh:path sssom:mapping_tool ], [ sh:datatype xsd:string ; sh:description "The display name of a mapping set." ; sh:maxCount 1 ; - sh:order 4 ; + sh:order 5 ; sh:path dcterms:title ], - [ sh:datatype xsd:string ; - sh:description "Version IRI or version string of the source of the subject term." ; + [ sh:datatype xsd:date ; + sh:description "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file." ; sh:maxCount 1 ; - sh:order 11 ; - sh:path sssom:subject_source_version ], + sh:order 19 ; + sh:path pav:authoredOn ], [ sh:datatype xsd:string ; sh:description "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment" ; - sh:order 24 ; + sh:order 25 ; sh:path rdfs:seeAlso ], + [ sh:description "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; + sh:order 7 ; + sh:path dcterms:creator ], [ sh:datatype xsd:string ; - sh:description "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text." ; + sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; sh:maxCount 1 ; - sh:order 16 ; - sh:path sssom:mapping_tool ], + sh:order 28 ; + sh:path rdfs:comment ], + [ sh:description "The type of entity that is being mapped." ; + sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; + sh:maxCount 1 ; + sh:order 10 ; + sh:path sssom:subject_type ], [ sh:datatype xsd:anyURI ; - sh:description "A URL location of the issue tracker for this entity." ; + sh:description "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived." ; sh:maxCount 1 ; - sh:order 25 ; - sh:path sssom:issue_tracker ], + sh:order 16 ; + sh:path sssom:mapping_provider ], [ sh:datatype xsd:string ; sh:description "Version string that denotes the version of the mapping tool used." ; sh:maxCount 1 ; - sh:order 17 ; + sh:order 18 ; sh:path sssom:mapping_tool_version ], - [ sh:description "URI of vocabulary or identifier source for the object." ; - sh:maxCount 1 ; - sh:order 13 ; - sh:path sssom:object_source ], - [ sh:datatype xsd:string ; - sh:description "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead." ; - sh:order 7 ; - sh:path sssom:creator_label ], + [ sh:description "A list of properties (term annotations on the object) that was used for the match." ; + sh:order 22 ; + sh:path sssom:object_match_field ], [ sh:datatype xsd:string ; - sh:description "Version IRI or version string of the source of the object term." ; - sh:maxCount 1 ; - sh:order 14 ; - sh:path sssom:object_source_version ], - [ sh:description "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; - sh:order 23 ; - sh:path sssom:object_preprocessing ], - [ sh:description "URI of vocabulary or identifier source for the subject." ; + sh:description "A version string for the mapping." ; sh:maxCount 1 ; - sh:order 10 ; - sh:path sssom:subject_source ], - [ sh:datatype xsd:anyURI ; - sh:description "A mapping set or set of mapping set that was used to derive the mapping set." ; sh:order 3 ; - sh:path prov:wasDerivedFrom ], - [ sh:class sssom:ExtensionDefinition ; - sh:description "A list that defines the extension slots used in the mapping set." ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 28 ; - sh:path sssom:extension_definitions ], + sh:path owl:versionInfo ], [ sh:datatype xsd:anyURI ; - sh:description "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable." ; + sh:description "A URL location of the issue tracker for this entity." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 1 ; - sh:path sssom:mapping_set_id ], - [ sh:datatype xsd:anyURI ; - sh:description "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived." ; + sh:order 26 ; + sh:path sssom:issue_tracker ], + [ sh:description "URI of vocabulary or identifier source for the subject." ; sh:maxCount 1 ; - sh:order 15 ; - sh:path sssom:mapping_provider ], - [ sh:datatype xsd:date ; - sh:description "The date the mapping was published. This is different from the date the mapping was asserted." ; + sh:order 11 ; + sh:path sssom:subject_source ], + [ sh:datatype xsd:string ; + sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; sh:maxCount 1 ; - sh:order 19 ; - sh:path dcterms:created ], + sh:order 27 ; + sh:path sssom:other ], + [ sh:description "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; + sh:order 23 ; + sh:path sssom:subject_preprocessing ], + [ sh:description "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; + sh:order 24 ; + sh:path sssom:object_preprocessing ], [ sh:datatype xsd:anyURI ; sh:description "A url to the license of the mapping. In absence of a license we assume no license." ; sh:maxCount 1 ; sh:minCount 1 ; - sh:order 8 ; + sh:order 9 ; sh:path dcterms:license ], - [ sh:description "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 6 ; - sh:path dcterms:creator ], [ sh:datatype xsd:string ; - sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; - sh:maxCount 1 ; - sh:order 26 ; - sh:path sssom:other ], - [ sh:description "The type of entity that is being mapped." ; - sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; + sh:description "Version IRI or version string of the source of the object term." ; sh:maxCount 1 ; - sh:order 9 ; - sh:path sssom:subject_type ], + sh:order 15 ; + sh:path sssom:object_source_version ], + [ sh:class sssom:ExtensionDefinition ; + sh:description "A list that defines the extension slots used in the mapping set." ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 29 ; + sh:path sssom:extension_definitions ], + [ sh:datatype xsd:anyURI ; + sh:description "A mapping set or set of mapping set that was used to derive the mapping set." ; + sh:order 4 ; + sh:path prov:wasDerivedFrom ], + [ sh:description "A list of properties (term annotations on the subject) that was used for the match." ; + sh:order 21 ; + sh:path sssom:subject_match_field ], [ sh:datatype xsd:string ; - sh:description "A description of the mapping set." ; + sh:description "Version IRI or version string of the source of the subject term." ; sh:maxCount 1 ; - sh:order 5 ; - sh:path dcterms:description ], - [ sh:datatype xsd:string ; - sh:description "A version string for the mapping." ; + sh:order 12 ; + sh:path sssom:subject_source_version ], + [ sh:datatype xsd:anyURI ; + sh:description "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable." ; sh:maxCount 1 ; + sh:minCount 1 ; sh:order 2 ; - sh:path owl:versionInfo ] ; + sh:path sssom:mapping_set_id ] ; sh:targetClass sssom:MappingSet . +sssom:NoTermFound a sh:NodeShape ; + sh:closed true ; + sh:description "sssom:NoTermFound can be used in place of a subject_id or object_id when the corresponding entity could not be found. It SHOULD be used in conjuction with a corresponding subject_source or object_source to signify where the term was not found." ; + sh:ignoredProperties ( rdf:type ) ; + sh:targetClass sssom:NoTermFound . + sssom:Propagatable a sh:NodeShape ; sh:closed true ; sh:description "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class." ; @@ -205,400 +216,227 @@ sssom:Propagatable a sh:NodeShape ; owl:Axiom a sh:NodeShape ; sh:closed true ; - sh:description "Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change.", - "Represents an individual mapping between a pair of entities" ; - sh:ignoredProperties ( rdf:type ), - ( rdf:type ) ; - sh:property [ sh:datatype xsd:anyURI ; - sh:description "A url to the license of the mapping. In absence of a license we assume no license." ; - sh:maxCount 1 ; - sh:order 15 ; - sh:path dcterms:license ], - [ sh:description "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule is captured as a resource rather than a string, which enables higher levels of transparency and sharing across mapping sets. The URI representation of the curation rule is expected to be a resolvable identifier which provides details about the nature of the curation rule." ; - sh:order 31 ; - sh:path sssom:curation_rule ], - [ sh:datatype xsd:string ; - sh:description "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead." ; - sh:order 14 ; - sh:path sssom:creator_label ], - [ sh:description "A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" ; - sh:in ( "Not" ) ; - sh:maxCount 1 ; - sh:order 4 ; - sh:path sssom:predicate_modifier ], - [ sh:datatype xsd:double ; - sh:description "A score between 0 and 1 to denote the similarity, where 1 denotes equivalence." ; - sh:maxCount 1 ; - sh:maxInclusive 1e+00 ; - sh:minInclusive 0e+00 ; - sh:order 32 ; - sh:path sssom:similarity_score ], - [ sh:datatype xsd:string ; + sh:description "Represents an individual mapping between a pair of entities" ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype xsd:string ; sh:description "Version IRI or version string of the source of the object term." ; sh:maxCount 1 ; sh:order 22 ; sh:path sssom:object_source_version ], [ sh:datatype xsd:string ; - sh:description "Version string that denotes the version of the mapping tool used." ; - sh:maxCount 1 ; - sh:order 27 ; - sh:path sssom:mapping_tool_version ], - [ sh:datatype xsd:string ; - sh:description "The literal being mapped" ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 0 ; - sh:path owl:annotatedTarget ], - [ sh:datatype xsd:string ; - sh:description "Version IRI or version string of the source of the literal." ; - sh:maxCount 1 ; - sh:order 17 ; - sh:path sssom:literal_source_version ], - [ sh:datatype xsd:anyURI ; - sh:description "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived." ; + sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; sh:maxCount 1 ; - sh:order 23 ; - sh:path sssom:mapping_provider ], + sh:order 43 ; + sh:path rdfs:comment ], [ sh:datatype xsd:string ; sh:description "The label of object of the mapping" ; sh:maxCount 1 ; - sh:order 6 ; + sh:order 7 ; sh:path sssom:object_label ], - [ sh:description "The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another." ; + [ sh:description "The issue tracker item discussing this mapping." ; sh:maxCount 1 ; - sh:order 22 ; - sh:path sssom:mapping_source ], - [ sh:datatype xsd:string ; - sh:description "The label of the predicate/relation of the mapping" ; + sh:order 41 ; + sh:path sssom:issue_tracker_item ], + [ sh:description "The ID of the predicate or relation that relates the subject and object of this match." ; sh:maxCount 1 ; + sh:minCount 1 ; sh:order 3 ; - sh:path sssom:predicate_label ], - [ sh:datatype xsd:string ; - sh:description "The label of the predicate/relation of the mapping" ; - sh:maxCount 1 ; - sh:order 4 ; - sh:path sssom:predicate_label ], - [ sh:datatype xsd:string ; - sh:description "A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead." ; - sh:order 11 ; - sh:path sssom:author_label ], - [ sh:description "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set." ; - sh:in ( "1:1" "1:n" "n:1" "1:0" "0:1" "n:n" ) ; - sh:maxCount 1 ; - sh:order 25 ; - sh:path sssom:mapping_cardinality ], - [ sh:description "A list of properties (term annotations on the object) that was used for the match." ; - sh:order 34 ; - sh:path sssom:object_match_field ], - [ sh:description "URI of vocabulary or identifier source for the object." ; - sh:maxCount 1 ; - sh:order 21 ; - sh:path sssom:object_source ], - [ sh:datatype xsd:string ; - sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; - sh:maxCount 1 ; - sh:order 35 ; - sh:path sssom:other ], - [ sh:description "URI of ontology source for the literal." ; - sh:maxCount 1 ; - sh:order 16 ; - sh:path sssom:literal_source ], - [ sh:datatype xsd:string ; - sh:description "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment" ; - sh:order 34 ; - sh:path rdfs:seeAlso ], + sh:path owl:annotatedProperty ], [ sh:datatype xsd:string ; sh:description "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases." ; sh:maxCount 1 ; sh:order 2 ; sh:path sssom:subject_category ], - [ sh:description "URI of vocabulary or identifier source for the subject." ; - sh:maxCount 1 ; - sh:order 18 ; - sh:path sssom:subject_source ], - [ sh:description "The ID of the object of the mapping." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 5 ; - sh:path owl:annotatedTarget ], - [ sh:description "A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:or ( [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] ) ; - sh:order 9 ; - sh:path sssom:mapping_justification ], - [ sh:datatype xsd:string ; - sh:description "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text." ; - sh:maxCount 1 ; - sh:order 26 ; - sh:path sssom:mapping_tool ], - [ sh:description "A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:or ( [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] ) ; - sh:order 8 ; - sh:path sssom:mapping_justification ], - [ sh:description "The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another." ; - sh:maxCount 1 ; - sh:order 24 ; - sh:path sssom:mapping_source ], - [ sh:datatype xsd:anyURI ; - sh:description "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived." ; - sh:maxCount 1 ; - sh:order 21 ; - sh:path sssom:mapping_provider ], - [ sh:datatype xsd:string ; - sh:description "String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots." ; - sh:order 29 ; - sh:path sssom:match_string ], - [ sh:description "URI of vocabulary or identifier source for the object." ; - sh:maxCount 1 ; - sh:order 19 ; - sh:path sssom:object_source ], - [ sh:description "The type of entity that is being mapped." ; - sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; - sh:maxCount 1 ; - sh:order 18 ; - sh:path sssom:object_type ], - [ sh:description "The ID of the object of the mapping." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 6 ; - sh:path owl:annotatedTarget ], - [ sh:datatype xsd:double ; - sh:description "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence." ; - sh:maxCount 1 ; - sh:maxInclusive 1e+00 ; - sh:minInclusive 0e+00 ; - sh:order 27 ; - sh:path sssom:confidence ], - [ sh:datatype xsd:string ; - sh:description "A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead." ; - sh:order 13 ; - sh:path sssom:reviewer_label ], - [ sh:datatype xsd:string ; - sh:description "The measure used for computing the the semantic similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable." ; - sh:maxCount 1 ; - sh:order 39 ; - sh:path sssom:semantic_similarity_measure ], - [ sh:datatype xsd:date ; - sh:description "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file." ; - sh:maxCount 1 ; - sh:order 28 ; - sh:path pav:authoredOn ], - [ sh:description "The ID of the predicate or relation that relates the subject and object of this match." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 3 ; - sh:path owl:annotatedProperty ], [ sh:description "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; sh:order 37 ; sh:path sssom:object_preprocessing ], - [ sh:description "A list of properties (term annotations on the object) that was used for the match." ; - sh:order 28 ; - sh:path sssom:object_match_field ], - [ sh:description "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 9 ; - sh:path pav:authoredBy ], [ sh:datatype xsd:anyURI ; sh:description "A url to the license of the mapping. In absence of a license we assume no license." ; sh:maxCount 1 ; sh:order 16 ; sh:path dcterms:license ], - [ sh:description "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 13 ; - sh:path dcterms:creator ], - [ sh:description "The type of entity that is being mapped." ; - sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; + [ sh:datatype xsd:double ; + sh:description "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence." ; sh:maxCount 1 ; - sh:order 20 ; - sh:path sssom:object_type ], + sh:maxInclusive 1e+00 ; + sh:minInclusive 0e+00 ; + sh:order 30 ; + sh:path sssom:confidence ], [ sh:datatype xsd:string ; - sh:description "The measure used for computing the the similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable." ; + sh:description "Version string that denotes the version of the mapping tool used." ; sh:maxCount 1 ; - sh:order 33 ; - sh:path sssom:similarity_measure ], + sh:order 27 ; + sh:path sssom:mapping_tool_version ], [ sh:datatype xsd:string ; - sh:description "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases." ; - sh:maxCount 1 ; - sh:order 7 ; - sh:path sssom:object_category ], + sh:description "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment" ; + sh:order 40 ; + sh:path rdfs:seeAlso ], [ sh:datatype xsd:string ; - sh:description "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule should be captured as a resource (entity reference) rather than a string (see curation_rule element), which enables higher levels of transparency and sharing across mapping sets. The textual representation of curation rule is intended to be used in cases where (1) the creation of a resource is not practical from the perspective of the mapping_provider and (2) as an additional piece of metadata to augment the curation_rule element with a human readable text." ; - sh:order 32 ; - sh:path sssom:curation_rule_text ], + sh:description "A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead." ; + sh:order 11 ; + sh:path sssom:author_label ], [ sh:datatype xsd:string ; - sh:description "Version IRI or version string of the source of the object term." ; + sh:description "A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead." ; + sh:order 13 ; + sh:path sssom:reviewer_label ], + [ sh:datatype xsd:string ; + sh:description "String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots." ; + sh:order 35 ; + sh:path sssom:match_string ], + [ sh:description "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule is captured as a resource rather than a string, which enables higher levels of transparency and sharing across mapping sets. The URI representation of the curation rule is expected to be a resolvable identifier which provides details about the nature of the curation rule." ; + sh:order 31 ; + sh:path sssom:curation_rule ], + [ sh:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the subject term." ; sh:maxCount 1 ; - sh:order 20 ; - sh:path sssom:object_source_version ], - [ sh:description "The ID of the predicate or relation that relates the subject and object of this match." ; + sh:order 19 ; + sh:path sssom:subject_source_version ], + [ sh:datatype xsd:string ; + sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; + sh:maxCount 1 ; + sh:order 42 ; + sh:path sssom:other ], + [ sh:description "The ID of the object of the mapping." ; sh:maxCount 1 ; sh:minCount 1 ; - sh:order 2 ; - sh:path owl:annotatedProperty ], + sh:order 6 ; + sh:path owl:annotatedTarget ], [ sh:datatype xsd:string ; - sh:description "A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead." ; - sh:order 10 ; - sh:path sssom:author_label ], - [ sh:datatype xsd:anyURI ; - sh:description "The datatype of the literal being mapped" ; + sh:description "The label of subject of the mapping" ; sh:maxCount 1 ; sh:order 1 ; - sh:path rdf:datatype ], + sh:path sssom:subject_label ], [ sh:datatype xsd:date ; sh:description "The date the mapping was published. This is different from the date the mapping was asserted." ; sh:maxCount 1 ; sh:order 29 ; sh:path dcterms:created ], - [ sh:datatype xsd:string ; - sh:description "Version string that denotes the version of the mapping tool used." ; + [ sh:description "A list of properties (term annotations on the object) that was used for the match." ; + sh:order 34 ; + sh:path sssom:object_match_field ], + [ sh:description "The ID of the subject of the mapping." ; sh:maxCount 1 ; - sh:order 25 ; - sh:path sssom:mapping_tool_version ], - [ sh:datatype xsd:double ; - sh:description "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence." ; + sh:minCount 1 ; + sh:order 0 ; + sh:path owl:annotatedSource ], + [ sh:description "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; + sh:order 14 ; + sh:path dcterms:creator ], + [ sh:datatype xsd:date ; + sh:description "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file." ; sh:maxCount 1 ; - sh:maxInclusive 1e+00 ; - sh:minInclusive 0e+00 ; - sh:order 30 ; - sh:path sssom:confidence ], + sh:order 28 ; + sh:path pav:authoredOn ], + [ sh:datatype xsd:string ; + sh:description "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases." ; + sh:maxCount 1 ; + sh:order 8 ; + sh:path sssom:object_category ], [ sh:description "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set." ; sh:in ( "1:1" "1:n" "n:1" "1:0" "0:1" "n:n" ) ; sh:maxCount 1 ; - sh:order 23 ; + sh:order 25 ; sh:path sssom:mapping_cardinality ], [ sh:description "The type of entity that is being mapped." ; sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; sh:maxCount 1 ; sh:order 17 ; sh:path sssom:subject_type ], - [ sh:description "A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" ; - sh:in ( "Not" ) ; - sh:maxCount 1 ; - sh:order 5 ; - sh:path sssom:predicate_modifier ], - [ sh:description "The issue tracker item discussing this mapping." ; + [ sh:description "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; + sh:order 36 ; + sh:path sssom:subject_preprocessing ], + [ sh:description "The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another." ; sh:maxCount 1 ; - sh:order 41 ; - sh:path sssom:issue_tracker_item ], - [ sh:datatype xsd:string ; - sh:description "A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead." ; - sh:order 12 ; - sh:path sssom:reviewer_label ], + sh:order 24 ; + sh:path sssom:mapping_source ], [ sh:description "Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; sh:order 12 ; sh:path sssom:reviewer_id ], - [ sh:description "The ID of the subject of the mapping." ; + [ sh:description "URI of vocabulary or identifier source for the object." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 0 ; - sh:path owl:annotatedSource ], - [ sh:description "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; - sh:order 36 ; - sh:path sssom:subject_preprocessing ], + sh:order 21 ; + sh:path sssom:object_source ], [ sh:datatype xsd:string ; - sh:description "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment" ; - sh:order 40 ; - sh:path rdfs:seeAlso ], - [ sh:description "Method of preprocessing applied to the literal." ; - sh:order 30 ; - sh:path sssom:literal_preprocessing ], - [ sh:description "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 10 ; - sh:path pav:authoredBy ], + sh:description "The label of the predicate/relation of the mapping" ; + sh:maxCount 1 ; + sh:order 4 ; + sh:path sssom:predicate_label ], [ sh:datatype xsd:string ; - sh:description "String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots." ; - sh:order 35 ; - sh:path sssom:match_string ], + sh:description "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule should be captured as a resource (entity reference) rather than a string (see curation_rule element), which enables higher levels of transparency and sharing across mapping sets. The textual representation of curation rule is intended to be used in cases where (1) the creation of a resource is not practical from the perspective of the mapping_provider and (2) as an additional piece of metadata to augment the curation_rule element with a human readable text." ; + sh:order 32 ; + sh:path sssom:curation_rule_text ], + [ sh:datatype xsd:string ; + sh:description "The measure used for computing a similarity score. This field is meant to be used in conjunction with the similarity_score field, to document, for example, the lexical or semantic match of a matching algorithm. To make processing this field as unambiguous as possible, we recommend using wikidata CURIEs, but the type of this field is deliberately unspecified." ; + sh:maxCount 1 ; + sh:order 39 ; + sh:path sssom:similarity_measure ], [ sh:datatype xsd:string ; sh:description "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead." ; sh:order 15 ; sh:path sssom:creator_label ], - [ sh:datatype xsd:string ; - sh:description "The label of object of the mapping" ; - sh:maxCount 1 ; - sh:order 7 ; - sh:path sssom:object_label ], - [ sh:description "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 14 ; - sh:path dcterms:creator ], - [ sh:datatype xsd:string ; - sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; + [ sh:description "The type of entity that is being mapped." ; + sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; sh:maxCount 1 ; - sh:order 36 ; - sh:path rdfs:comment ], - [ sh:datatype xsd:string ; - sh:description "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases." ; + sh:order 20 ; + sh:path sssom:object_type ], + [ sh:description "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; + sh:order 10 ; + sh:path pav:authoredBy ], + [ sh:description "A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable." ; sh:maxCount 1 ; - sh:order 8 ; - sh:path sssom:object_category ], + sh:minCount 1 ; + sh:or ( [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] ) ; + sh:order 9 ; + sh:path sssom:mapping_justification ], [ sh:datatype xsd:double ; - sh:description "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence." ; + sh:description "A score between 0 and 1 to denote the similarity between two entities, where 1 denotes equivalence, and 0 denotes disjointness. The score is meant to be used in conjunction with the similarity_measure field, to document, for example, the lexical or semantic match of a matching algorithm." ; sh:maxCount 1 ; sh:maxInclusive 1e+00 ; sh:minInclusive 0e+00 ; sh:order 38 ; - sh:path sssom:semantic_similarity_score ], - [ sh:datatype xsd:date ; - sh:description "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file." ; - sh:maxCount 1 ; - sh:order 26 ; - sh:path pav:authoredOn ], - [ sh:datatype xsd:string ; - sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; - sh:maxCount 1 ; - sh:order 42 ; - sh:path sssom:other ], + sh:path sssom:similarity_score ], [ sh:description "A list of properties (term annotations on the subject) that was used for the match." ; sh:order 33 ; sh:path sssom:subject_match_field ], - [ sh:description "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; - sh:order 31 ; - sh:path sssom:object_preprocessing ], + [ sh:datatype xsd:anyURI ; + sh:description "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived." ; + sh:maxCount 1 ; + sh:order 23 ; + sh:path sssom:mapping_provider ], [ sh:datatype xsd:string ; sh:description "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text." ; sh:maxCount 1 ; - sh:order 24 ; + sh:order 26 ; sh:path sssom:mapping_tool ], - [ sh:datatype xsd:string ; - sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; - sh:maxCount 1 ; - sh:order 43 ; - sh:path rdfs:comment ], - [ sh:description "Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 11 ; - sh:path sssom:reviewer_id ], - [ sh:datatype xsd:string ; - sh:description "Version IRI or version string of the source of the subject term." ; + [ sh:description "URI of vocabulary or identifier source for the subject." ; sh:maxCount 1 ; - sh:order 19 ; - sh:path sssom:subject_source_version ], - [ sh:datatype xsd:string ; - sh:description "The label of subject of the mapping" ; + sh:order 18 ; + sh:path sssom:subject_source ], + [ sh:description "A modifier for negating the predicate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" ; + sh:in ( "Not" ) ; sh:maxCount 1 ; - sh:order 1 ; - sh:path sssom:subject_label ] ; + sh:order 5 ; + sh:path sssom:predicate_modifier ] ; sh:targetClass owl:Axiom . sssom:ExtensionDefinition a sh:NodeShape ; sh:closed true ; sh:description "A definition of an extension (non-standard) slot." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "The property associated with the extension slot. It is intended to provide a non-ambiguous meaning to the slot (contrary to the slot_name, which for brevity reasons may be ambiguous)." ; + sh:property [ sh:datatype xsd:string ; + sh:description "The name of the extension slot." ; sh:maxCount 1 ; - sh:order 1 ; - sh:path sssom:property ], + sh:minCount 1 ; + sh:order 0 ; + sh:path sssom:slot_name ], [ sh:description "Expected type of the values of the extension slot." ; sh:maxCount 1 ; sh:order 2 ; sh:path sssom:type_hint ], - [ sh:datatype xsd:string ; - sh:description "The name of the extension slot." ; + [ sh:description "The property associated with the extension slot. It is intended to provide a non-ambiguous meaning to the slot (contrary to the slot_name, which for brevity reasons may be ambiguous)." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 0 ; - sh:path sssom:slot_name ] ; + sh:order 1 ; + sh:path sssom:property ] ; sh:targetClass sssom:ExtensionDefinition . sssom:MappingSetReference a sh:NodeShape ; @@ -611,30 +449,43 @@ sssom:MappingSetReference a sh:NodeShape ; sh:minCount 1 ; sh:order 0 ; sh:path sssom:mapping_set_id ], + [ sh:datatype xsd:anyURI ; + sh:description "A URL location from which to obtain a resource, such as a mapping set." ; + sh:maxCount 1 ; + sh:order 1 ; + sh:path sssom:mirror_from ], + [ sh:datatype xsd:string ; + sh:description "Set by the owners of the mapping registry. A way to group ." ; + sh:maxCount 1 ; + sh:order 3 ; + sh:path sssom:mapping_set_group ], [ sh:datatype xsd:date ; sh:description "The date this reference was last updated." ; sh:maxCount 1 ; sh:order 4 ; sh:path sssom:last_updated ], - [ sh:datatype xsd:string ; - sh:description "The local name assigned to file that corresponds to the downloaded mapping set." ; - sh:maxCount 1 ; - sh:order 5 ; - sh:path sssom:local_name ], [ sh:datatype xsd:double ; sh:description "This value is set by the registry that indexes the mapping set. It reflects the confidence the registry has in the correctness of the mappings in the mapping set." ; sh:maxCount 1 ; sh:order 2 ; sh:path sssom:registry_confidence ], [ sh:datatype xsd:string ; - sh:description "Set by the owners of the mapping registry. A way to group ." ; + sh:description "The local name assigned to file that corresponds to the downloaded mapping set." ; sh:maxCount 1 ; - sh:order 3 ; - sh:path sssom:mapping_set_group ], - [ sh:datatype xsd:anyURI ; - sh:description "A URL location from which to obtain a resource, such as a mapping set." ; + sh:order 5 ; + sh:path sssom:local_name ] ; + sh:targetClass sssom:MappingSetReference . + +sssom:Prefix a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype xsd:anyURI ; sh:maxCount 1 ; sh:order 1 ; - sh:path sssom:mirror_from ] ; - sh:targetClass sssom:MappingSetReference . + sh:path sssom:prefix_url ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:order 0 ; + sh:path sssom:prefix_name ] ; + sh:targetClass sssom:Prefix . diff --git a/project/shex/sssom_schema.shex b/project/shex/sssom_schema.shex index 12fabf9b..78c7304b 100644 --- a/project/shex/sssom_schema.shex +++ b/project/shex/sssom_schema.shex @@ -59,53 +59,6 @@ linkml:Sparqlpath xsd:string ) } - CLOSED { - ( $ ( owl:annotatedTarget @linkml:String ; - rdf:datatype @linkml:Uri ? ; - owl:annotatedProperty @ ; - @linkml:String ? ; - [ ] ? ; - owl:annotatedTarget @ ; - @linkml:String ? ; - @linkml:String ? ; - @ ; - pav:authoredBy @ * ; - @linkml:String * ; - @ * ; - @linkml:String * ; - dc1:creator @ * ; - @linkml:String * ; - dc1:license @linkml:Uri ? ; - @ ? ; - @linkml:String ? ; - [ owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept - rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ] ? ; - @ ? ; - @linkml:String ? ; - @linkml:Uri ? ; - @ ? ; - [ - - - ] ? ; - @linkml:String ? ; - @linkml:String ? ; - pav:authoredOn @linkml:Date ? ; - @linkml:Double ? ; - @ * ; - @linkml:String * ; - @ * ; - @ * ; - @linkml:Double ? ; - @linkml:String ? ; - rdfs:seeAlso @linkml:String * ; - @linkml:String ? ; - rdfs:comment @linkml:String ? - ) ; - rdf:type [ owl:Axiom ] ? - ) -} - CLOSED { ( $ ( owl:annotatedSource @ ; @linkml:String ? ; @@ -150,8 +103,8 @@ linkml:Sparqlpath xsd:string @linkml:String * ; @ * ; @ * ; - @linkml:Double ? ; - @linkml:String ? ; + @linkml:Double ? ; + @linkml:String ? ; rdfs:seeAlso @linkml:String * ; @ ? ; @linkml:String ? ; @@ -176,7 +129,8 @@ linkml:Sparqlpath xsd:string } CLOSED { - ( $ ( @ * ; + ( $ ( @ * ; + @ * ; @linkml:Uri ; owl:versionInfo @linkml:String ? ; prov:wasDerivedFrom @linkml:Uri * ; @@ -224,6 +178,20 @@ linkml:Sparqlpath xsd:string ) } + CLOSED { + ( $ rdf:type . * ; + rdf:type [ ] ? + ) +} + + CLOSED { + ( $ ( @linkml:Ncname ; + @linkml:Uri ? + ) ; + rdf:type [ ] + ) +} + CLOSED { ( $ @linkml:Boolean ? ; rdf:type [ ] ? diff --git a/project/sqlschema/sssom_schema.sql b/project/sqlschema/sssom_schema.sql index b69eaa2d..7aa0506f 100644 --- a/project/sqlschema/sssom_schema.sql +++ b/project/sqlschema/sssom_schema.sql @@ -26,7 +26,7 @@ -- * Slot: subject_category Description: The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases. -- * Slot: predicate_id Description: The ID of the predicate or relation that relates the subject and object of this match. -- * Slot: predicate_label Description: The label of the predicate/relation of the mapping --- * Slot: predicate_modifier Description: A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion +-- * Slot: predicate_modifier Description: A modifier for negating the predicate. See https://github.com/mapping-commons/sssom/issues/40 for discussion -- * Slot: object_id Description: The ID of the object of the mapping. -- * Slot: object_label Description: The label of object of the mapping -- * Slot: object_category Description: The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases. @@ -46,40 +46,12 @@ -- * Slot: mapping_date Description: The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file. -- * Slot: publication_date Description: The date the mapping was published. This is different from the date the mapping was asserted. -- * Slot: confidence Description: A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence. --- * Slot: semantic_similarity_score Description: A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence. --- * Slot: semantic_similarity_measure Description: The measure used for computing the the semantic similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable. +-- * Slot: similarity_score Description: A score between 0 and 1 to denote the similarity between two entities, where 1 denotes equivalence, and 0 denotes disjointness. The score is meant to be used in conjunction with the similarity_measure field, to document, for example, the lexical or semantic match of a matching algorithm. +-- * Slot: similarity_measure Description: The measure used for computing a similarity score. This field is meant to be used in conjunction with the similarity_score field, to document, for example, the lexical or semantic match of a matching algorithm. To make processing this field as unambiguous as possible, we recommend using wikidata CURIEs, but the type of this field is deliberately unspecified. -- * Slot: issue_tracker_item Description: The issue tracker item discussing this mapping. -- * Slot: other Description: Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data. -- * Slot: comment Description: Free text field containing either curator notes or text generated by tool providing additional informative information. -- * Slot: mapping set_id Description: Autocreated FK slot --- # Class: "literal mapping" Description: "Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change." --- * Slot: id Description: --- * Slot: literal Description: The literal being mapped --- * Slot: literal_datatype Description: The datatype of the literal being mapped --- * Slot: predicate_id Description: The ID of the predicate or relation that relates the subject and object of this match. --- * Slot: predicate_label Description: The label of the predicate/relation of the mapping --- * Slot: predicate_modifier Description: A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion --- * Slot: object_id Description: The ID of the object of the mapping. --- * Slot: object_label Description: The label of object of the mapping --- * Slot: object_category Description: The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases. --- * Slot: mapping_justification Description: A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable. --- * Slot: license Description: A url to the license of the mapping. In absence of a license we assume no license. --- * Slot: literal_source Description: URI of ontology source for the literal. --- * Slot: literal_source_version Description: Version IRI or version string of the source of the literal. --- * Slot: object_type Description: The type of entity that is being mapped. --- * Slot: object_source Description: URI of vocabulary or identifier source for the object. --- * Slot: object_source_version Description: Version IRI or version string of the source of the object term. --- * Slot: mapping_provider Description: URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived. --- * Slot: mapping_source Description: The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another. --- * Slot: mapping_cardinality Description: A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set. --- * Slot: mapping_tool Description: A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text. --- * Slot: mapping_tool_version Description: Version string that denotes the version of the mapping tool used. --- * Slot: mapping_date Description: The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file. --- * Slot: confidence Description: A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence. --- * Slot: similarity_score Description: A score between 0 and 1 to denote the similarity, where 1 denotes equivalence. --- * Slot: similarity_measure Description: The measure used for computing the the similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable. --- * Slot: other Description: Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data. --- * Slot: comment Description: Free text field containing either curator notes or text generated by tool providing additional informative information. -- # Class: "mapping registry" Description: "A registry for managing mapping sets. It holds a set of mapping set references, and can import other registries." -- * Slot: id Description: -- * Slot: mapping_registry_id Description: The unique identifier of a mapping registry. @@ -96,6 +68,10 @@ -- * Slot: mapping_set_group Description: Set by the owners of the mapping registry. A way to group . -- * Slot: last_updated Description: The date this reference was last updated. -- * Slot: local_name Description: The local name assigned to file that corresponds to the downloaded mapping set. +-- # Class: "prefix" Description: "" +-- * Slot: prefix_name Description: +-- * Slot: prefix_url Description: +-- * Slot: mapping set_id Description: Autocreated FK slot -- # Class: "extension definition" Description: "A definition of an extension (non-standard) slot." -- * Slot: id Description: -- * Slot: slot_name Description: The name of the extension slot. @@ -104,6 +80,8 @@ -- # Class: "Propagatable" Description: "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class." -- * Slot: id Description: -- * Slot: propagated Description: Indicates whether a slot can be propagated from a mapping down to individual mappings. +-- # Class: "NoTermFound" Description: "sssom:NoTermFound can be used in place of a subject_id or object_id when the corresponding entity could not be found. It SHOULD be used in conjuction with a corresponding subject_source or object_source to signify where the term was not found." +-- * Slot: id Description: -- # Class: "mapping set_mapping_set_source" Description: "" -- * Slot: mapping set_id Description: Autocreated FK slot -- * Slot: mapping_set_source Description: A mapping set or set of mapping set that was used to derive the mapping set. @@ -173,39 +151,6 @@ -- # Class: "mapping_see_also" Description: "" -- * Slot: mapping_id Description: Autocreated FK slot -- * Slot: see_also Description: A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment --- # Class: "literal mapping_author_id" Description: "" --- * Slot: literal mapping_id Description: Autocreated FK slot --- * Slot: author_id Description: Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs. --- # Class: "literal mapping_author_label" Description: "" --- * Slot: literal mapping_id Description: Autocreated FK slot --- * Slot: author_label Description: A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead. --- # Class: "literal mapping_reviewer_id" Description: "" --- * Slot: literal mapping_id Description: Autocreated FK slot --- * Slot: reviewer_id Description: Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs. --- # Class: "literal mapping_reviewer_label" Description: "" --- * Slot: literal mapping_id Description: Autocreated FK slot --- * Slot: reviewer_label Description: A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead. --- # Class: "literal mapping_creator_id" Description: "" --- * Slot: literal mapping_id Description: Autocreated FK slot --- * Slot: creator_id Description: Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs. --- # Class: "literal mapping_creator_label" Description: "" --- * Slot: literal mapping_id Description: Autocreated FK slot --- * Slot: creator_label Description: A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead. --- # Class: "literal mapping_object_match_field" Description: "" --- * Slot: literal mapping_id Description: Autocreated FK slot --- * Slot: object_match_field Description: A list of properties (term annotations on the object) that was used for the match. --- # Class: "literal mapping_match_string" Description: "" --- * Slot: literal mapping_id Description: Autocreated FK slot --- * Slot: match_string Description: String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots. --- # Class: "literal mapping_literal_preprocessing" Description: "" --- * Slot: literal mapping_id Description: Autocreated FK slot --- * Slot: literal_preprocessing Description: Method of preprocessing applied to the literal. --- # Class: "literal mapping_object_preprocessing" Description: "" --- * Slot: literal mapping_id Description: Autocreated FK slot --- * Slot: object_preprocessing Description: Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows. --- # Class: "literal mapping_see_also" Description: "" --- * Slot: literal mapping_id Description: Autocreated FK slot --- * Slot: see_also Description: A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment -- # Class: "mapping registry_imports" Description: "" -- * Slot: mapping registry_id Description: Autocreated FK slot -- * Slot: imports Description: A list of registries that should be imported into this one. @@ -236,36 +181,6 @@ CREATE TABLE "mapping set" ( comment TEXT, PRIMARY KEY (id) ); -CREATE TABLE "literal mapping" ( - id INTEGER NOT NULL, - literal TEXT NOT NULL, - literal_datatype TEXT, - predicate_id TEXT NOT NULL, - predicate_label TEXT, - predicate_modifier VARCHAR(3), - object_id TEXT NOT NULL, - object_label TEXT, - object_category TEXT, - mapping_justification TEXT NOT NULL, - license TEXT, - literal_source TEXT, - literal_source_version TEXT, - object_type VARCHAR(23), - object_source TEXT, - object_source_version TEXT, - mapping_provider TEXT, - mapping_source TEXT, - mapping_cardinality VARCHAR(3), - mapping_tool TEXT, - mapping_tool_version TEXT, - mapping_date DATE, - confidence FLOAT, - similarity_score FLOAT, - similarity_measure TEXT, - other TEXT, - comment TEXT, - PRIMARY KEY (id) -); CREATE TABLE "mapping registry" ( id INTEGER NOT NULL, mapping_registry_id TEXT NOT NULL, @@ -298,6 +213,10 @@ CREATE TABLE "Propagatable" ( propagated BOOLEAN, PRIMARY KEY (id) ); +CREATE TABLE "NoTermFound" ( + id INTEGER NOT NULL, + PRIMARY KEY (id) +); CREATE TABLE mapping ( id INTEGER NOT NULL, subject_id TEXT NOT NULL, @@ -325,8 +244,8 @@ CREATE TABLE mapping ( mapping_date DATE, publication_date DATE, confidence FLOAT, - semantic_similarity_score FLOAT, - semantic_similarity_measure TEXT, + similarity_score FLOAT, + similarity_measure TEXT, issue_tracker_item TEXT, other TEXT, comment TEXT, @@ -334,6 +253,13 @@ CREATE TABLE mapping ( PRIMARY KEY (id), FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) ); +CREATE TABLE prefix ( + prefix_name TEXT NOT NULL, + prefix_url TEXT, + "mapping set_id" INTEGER, + PRIMARY KEY (prefix_name, prefix_url, "mapping set_id"), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); CREATE TABLE "mapping set_mapping_set_source" ( "mapping set_id" INTEGER, mapping_set_source TEXT, @@ -389,72 +315,6 @@ CREATE TABLE "mapping set_extension_definitions" ( FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id), FOREIGN KEY(extension_definitions_id) REFERENCES "extension definition" (id) ); -CREATE TABLE "literal mapping_author_id" ( - "literal mapping_id" INTEGER, - author_id TEXT, - PRIMARY KEY ("literal mapping_id", author_id), - FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) -); -CREATE TABLE "literal mapping_author_label" ( - "literal mapping_id" INTEGER, - author_label TEXT, - PRIMARY KEY ("literal mapping_id", author_label), - FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) -); -CREATE TABLE "literal mapping_reviewer_id" ( - "literal mapping_id" INTEGER, - reviewer_id TEXT, - PRIMARY KEY ("literal mapping_id", reviewer_id), - FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) -); -CREATE TABLE "literal mapping_reviewer_label" ( - "literal mapping_id" INTEGER, - reviewer_label TEXT, - PRIMARY KEY ("literal mapping_id", reviewer_label), - FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) -); -CREATE TABLE "literal mapping_creator_id" ( - "literal mapping_id" INTEGER, - creator_id TEXT, - PRIMARY KEY ("literal mapping_id", creator_id), - FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) -); -CREATE TABLE "literal mapping_creator_label" ( - "literal mapping_id" INTEGER, - creator_label TEXT, - PRIMARY KEY ("literal mapping_id", creator_label), - FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) -); -CREATE TABLE "literal mapping_object_match_field" ( - "literal mapping_id" INTEGER, - object_match_field TEXT, - PRIMARY KEY ("literal mapping_id", object_match_field), - FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) -); -CREATE TABLE "literal mapping_match_string" ( - "literal mapping_id" INTEGER, - match_string TEXT, - PRIMARY KEY ("literal mapping_id", match_string), - FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) -); -CREATE TABLE "literal mapping_literal_preprocessing" ( - "literal mapping_id" INTEGER, - literal_preprocessing TEXT, - PRIMARY KEY ("literal mapping_id", literal_preprocessing), - FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) -); -CREATE TABLE "literal mapping_object_preprocessing" ( - "literal mapping_id" INTEGER, - object_preprocessing TEXT, - PRIMARY KEY ("literal mapping_id", object_preprocessing), - FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) -); -CREATE TABLE "literal mapping_see_also" ( - "literal mapping_id" INTEGER, - see_also TEXT, - PRIMARY KEY ("literal mapping_id", see_also), - FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) -); CREATE TABLE "mapping registry_imports" ( "mapping registry_id" INTEGER, imports TEXT, diff --git a/src/docs/spec-formats-tsv.md b/src/docs/spec-formats-tsv.md index c500676f..16b2420c 100644 --- a/src/docs/spec-formats-tsv.md +++ b/src/docs/spec-formats-tsv.md @@ -106,11 +106,9 @@ SSSOM/TSV files MUST be encoded in UTF-8 ([RFC 3629](https://datatracker.ietf.or All identifiers in a SSSOM/TSV file, that is, all the values of slots typed as [EntityReference](EntityReference.md), MUST be serialised in [CURIE syntax](https://www.w3.org/TR/curie/). SSSOM/TSV parsers SHOULD reject files containing identifiers serialised as IRIs. -To allow unambiguous resolution of all CURIEs present in a SSSOM/TSV file, the metadata block MUST contain an additional `curie_map` field, which is a map of prefix names to IRI prefixes. The `curie_map` field SHOULD appear at the beginning of the metadata block. +As stated in the description of the model ([Identifiers section](spec-model.md#identifiers)), all prefix names used in CURIEs MUST be declared in the `curie_map` slot of the mapping set object, unless the prefix is a “built-in” prefix (in which case it MAY be omitted). SSSOM/TSV parsers MUST reject a file with undeclared, non-built-in prefix names. -Any prefix name used in a SSSOM/TSV file MUST be declared with a corresponding entry in the CURIE map. SSSOM/TSV parsers MUST reject a file with undeclared prefix names. - -Prefix names listed in the table found in the [IRI prefixes](spec-intro.md#iri-prefixes) section are considered “built-in”. As such, they MAY be omitted from the CURIE map. If they are not omitted, they MUST point to the same IRI prefixes as in the aforementioned table. +A SSSOM/TSV writer SHOULD refuse to serialise a mapping set that contains IRIs that cannot be contracted into CURIEs because there is no suitable prefix declaration in its CURIE map. The use of a custom, ad-hoc logic to infer a possible prefix name where none has been provided (e.g., “if the IRI ends with a `ZZZ_NNNNNNN` pattern, turn it into a `ZZZ:NNNNNNN` CURIE”) is strongly discouraged. ## Propagatable slots @@ -230,7 +228,6 @@ When writing the metadata block, a canonical SSSOM/TSV writer: * MUST serialise multi-valued slots as YAML “block sequences” ([YAML Specification §8.2.1](https://yaml.org/spec/1.2.2/#821-block-sequences)) – even when the list of values contains only one item; * MUST serialise scalar values in YAML “plain style” ([YAML Specification §7.3.3](https://yaml.org/spec/1.2.2/#733-plain-style)) whenever possible, otherwise in “double-quoted style” ([YAML Specification §7.3.1](https://yaml.org/spec/1.2.2/#731-double-quoted-style)); * MUST serialise the slots in the order they appear in the [“Slots” table](MappingSet.md#slots), in the documentation for the `MappingSet` class; -* MUST write the `curie_map` at the beginning of the block, before any other slots; * MUST NOT include in the CURIE map the prefix names that are considered “built-in”; * MUST NOT include in the CURIE map any prefix name that is not used anywhere in the set; * MUST sort the prefix names in the CURIE map in lexicographical order. diff --git a/src/docs/spec-model.md b/src/docs/spec-model.md index e06637a4..5a0e491b 100644 --- a/src/docs/spec-model.md +++ b/src/docs/spec-model.md @@ -23,6 +23,15 @@ The `MappingSet` class represents, well, a set of individual mappings, which are Of note, within a set, a mapping may not necessarily be uniquely identified by the combination of its four mandatory slots (`subject_id`, `predicate_id`, `object_id`, and `mapping_justification`). A set may very well contain several mappings with the same subject, predicate, object, and justification, but that differ on some of the other, complementary slots. +## Identifiers + +Throughout the model, identifiers to external resources are represented using the custom type [`EntityReference`](EntityReference.md) (based on the LinkML type [`uriorcurie`](https://w3id.org/linkml/Uriorcurie)), which accepts both full-length IRIs and [CURIEs](https://www.w3.org/TR/curie/) as possible identifier formats. (Note however that serialisation formats may mandate the use of one identifier format over the other; for example, the [SSSOM/TSV](spec-formats-tsv.md) format requires the systematic use of CURIEs, whereas the [OWL/RDF](spec-formats-owl.md) format conversely requires the systematic use of IRIs). + +Whenever the CURIE syntax is used in a mapping set (whether this is by choice of the SSSOM producer, or because it is mandated by the serialisation format), all CURIEs MUST be unambiguously resolvable into corresponding full-length IRIs without requiring any external resources. This means that any prefix name used MUST be properly declared in the set’s `curie_map` slot, which is a dictionary associating a prefix name to an IRI prefix. + +By exception, prefix names listed in the table found in the [IRI prefixes](spec-intro.md#iri-prefixes) section are considered “built-in”. As such, they MAY be omitted from the `curie_map`. If they are not omitted, they MUST point to the same IRI prefixes as in the aforementioned table. + + ## Propagation of mapping set slots As mentioned briefly above, there are two different types of slots in the `MappingSet` class: diff --git a/src/sssom_schema/context/sssom_schema.context.jsonld b/src/sssom_schema/context/sssom_schema.context.jsonld index e1851867..390edf8f 100644 --- a/src/sssom_schema/context/sssom_schema.context.jsonld +++ b/src/sssom_schema/context/sssom_schema.context.jsonld @@ -1,7 +1,7 @@ { "comments": { "description": "Auto generated by LinkML jsonld context generator", - "generation_date": "2024-08-05T10:18:22", + "generation_date": "2024-08-06T18:58:48", "source": "sssom_schema.yaml" }, "@context": { @@ -46,6 +46,10 @@ "curation_rule_text": { "@id": "curation_rule_text" }, + "curie_map": { + "@type": "@id", + "@id": "curie_map" + }, "documentation": { "@type": "@id", "@id": "documentation" @@ -89,24 +93,6 @@ "@type": "@id", "@id": "dcterms:license" }, - "literal": { - "@id": "owl:annotatedTarget" - }, - "literal_datatype": { - "@type": "@id", - "@id": "rdf:datatype" - }, - "literal_preprocessing": { - "@type": "rdfs:Resource", - "@id": "literal_preprocessing" - }, - "literal_source": { - "@type": "rdfs:Resource", - "@id": "literal_source" - }, - "literal_source_version": { - "@id": "literal_source_version" - }, "local_name": { "@id": "local_name" }, @@ -248,6 +234,13 @@ }, "@id": "predicate_type" }, + "prefix_name": { + "@id": "prefix_name" + }, + "prefix_url": { + "@type": "@id", + "@id": "prefix_url" + }, "propagated": { "@type": "xsd:boolean", "@id": "propagated" @@ -270,13 +263,6 @@ "see_also": { "@id": "rdfs:seeAlso" }, - "semantic_similarity_measure": { - "@id": "semantic_similarity_measure" - }, - "semantic_similarity_score": { - "@type": "xsd:double", - "@id": "semantic_similarity_score" - }, "similarity_measure": { "@id": "similarity_measure" }, @@ -321,9 +307,6 @@ "ExtensionDefinition": { "@id": "ExtensionDefinition" }, - "LiteralMapping": { - "@id": "owl:Axiom" - }, "Mapping": { "@id": "owl:Axiom" }, @@ -336,6 +319,12 @@ "MappingSetReference": { "@id": "MappingSetReference" }, + "NoTermFound": { + "@id": "NoTermFound" + }, + "Prefix": { + "@id": "Prefix" + }, "Propagatable": { "@id": "Propagatable" } diff --git a/src/sssom_schema/context/sssom_schema.jsonld b/src/sssom_schema/context/sssom_schema.jsonld index a0a43e18..f894b457 100644 --- a/src/sssom_schema/context/sssom_schema.jsonld +++ b/src/sssom_schema/context/sssom_schema.jsonld @@ -482,6 +482,52 @@ } ], "slots": [ + { + "name": "prefix_name", + "definition_uri": "https://w3id.org/sssom/prefix_name", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/prefix_name", + "key": true, + "owner": "Prefix", + "domain_of": [ + "Prefix" + ], + "range": "ncname", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "prefix_url", + "definition_uri": "https://w3id.org/sssom/prefix_url", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/prefix_url", + "owner": "Prefix", + "domain_of": [ + "Prefix" + ], + "range": "uri", + "@type": "SlotDefinition" + }, + { + "name": "curie_map", + "definition_uri": "https://w3id.org/sssom/curie_map", + "description": "A dictionary that contains prefixes as keys and their URI expansions as values.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/225", + "https://github.com/mapping-commons/sssom/pull/349", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/curie_map.sssom.tsv" + ], + "slot_uri": "https://w3id.org/sssom/curie_map", + "multivalued": true, + "owner": "MappingSet", + "domain_of": [ + "MappingSet" + ], + "range": "Prefix", + "inlined": true, + "@type": "SlotDefinition" + }, { "name": "mirror_from", "definition_uri": "https://w3id.org/sssom/mirror_from", @@ -672,55 +718,6 @@ "required": true, "@type": "SlotDefinition" }, - { - "name": "literal", - "definition_uri": "https://w3id.org/sssom/literal", - "description": "The literal being mapped", - "examples": [ - { - "value": "Alzheimer", - "description": "A string referring to some thing.", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "mappings": [ - "http://www.w3.org/2002/07/owl#annotatedTarget", - "http://www.w3.org/2002/07/owl#annotatedSource" - ], - "slot_uri": "http://www.w3.org/2002/07/owl#annotatedTarget", - "owner": "LiteralMapping", - "domain_of": [ - "LiteralMapping" - ], - "range": "string", - "required": true, - "@type": "SlotDefinition" - }, - { - "name": "literal_datatype", - "definition_uri": "https://w3id.org/sssom/literal_datatype", - "description": "The datatype of the literal being mapped", - "examples": [ - { - "value": "xsd:string", - "description": "A string referring to some thing.", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "mappings": [ - "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype", - "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype" - ], - "slot_uri": "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype", - "owner": "LiteralMapping", - "domain_of": [ - "LiteralMapping" - ], - "range": "uri", - "@type": "SlotDefinition" - }, { "name": "subject_label", "definition_uri": "https://w3id.org/sssom/subject_label", @@ -809,55 +806,6 @@ "name": "predicate_id", "definition_uri": "https://w3id.org/sssom/predicate_id", "description": "The ID of the predicate or relation that relates the subject and object of this match.", - "examples": [ - { - "value": "skos:exactMatch", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "mappings": [ - "http://www.w3.org/2002/07/owl#annotatedProperty", - "http://www.w3.org/2002/07/owl#annotatedProperty" - ], - "slot_uri": "http://www.w3.org/2002/07/owl#annotatedProperty", - "owner": "LiteralMapping", - "domain_of": [ - "Mapping", - "LiteralMapping" - ], - "range": "EntityReference", - "required": true, - "@type": "SlotDefinition" - }, - { - "name": "predicate_modifier", - "definition_uri": "https://w3id.org/sssom/predicate_modifier", - "description": "A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion", - "examples": [ - { - "value": "Not", - "description": "Negates the predicate, see documentation of predicate_modifier_enum", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "see_also": [ - "https://github.com/mapping-commons/sssom/issues/107" - ], - "slot_uri": "https://w3id.org/sssom/predicate_modifier", - "owner": "LiteralMapping", - "domain_of": [ - "Mapping", - "LiteralMapping" - ], - "range": "predicate_modifier_enum", - "@type": "SlotDefinition" - }, - { - "name": "predicate_label", - "definition_uri": "https://w3id.org/sssom/predicate_label", - "description": "The label of the predicate/relation of the mapping", "examples": [ { "value": "owl:sameAs", @@ -921,11 +869,58 @@ } ], "from_schema": "https://w3id.org/sssom/schema/", + "mappings": [ + "http://www.w3.org/2002/07/owl#annotatedProperty", + "http://www.w3.org/2002/07/owl#annotatedProperty" + ], + "slot_uri": "http://www.w3.org/2002/07/owl#annotatedProperty", + "owner": "Mapping", + "domain_of": [ + "Mapping" + ], + "range": "EntityReference", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "predicate_modifier", + "definition_uri": "https://w3id.org/sssom/predicate_modifier", + "description": "A modifier for negating the predicate. See https://github.com/mapping-commons/sssom/issues/40 for discussion", + "examples": [ + { + "value": "Not", + "description": "Negates the predicate, see documentation of predicate_modifier_enum", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/107" + ], + "slot_uri": "https://w3id.org/sssom/predicate_modifier", + "owner": "Mapping", + "domain_of": [ + "Mapping" + ], + "range": "predicate_modifier_enum", + "@type": "SlotDefinition" + }, + { + "name": "predicate_label", + "definition_uri": "https://w3id.org/sssom/predicate_label", + "description": "The label of the predicate/relation of the mapping", + "examples": [ + { + "value": "has cross-reference", + "description": "The label of the oboInOwl:hasDbXref property to represent cross-references.", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/predicate_label", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -966,10 +961,9 @@ "http://www.w3.org/2002/07/owl#annotatedTarget" ], "slot_uri": "http://www.w3.org/2002/07/owl#annotatedTarget", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "required": true, @@ -987,10 +981,9 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_label", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "recommended": true, @@ -1023,10 +1016,9 @@ "https://github.com/mapping-commons/sssom/issues/256" ], "slot_uri": "https://w3id.org/sssom/object_category", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1047,10 +1039,9 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_justification", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "required": true, @@ -1117,11 +1108,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_type", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "entity_type_enum", "@type": "SlotDefinition" @@ -1243,11 +1233,10 @@ ], "slot_uri": "http://purl.org/dc/terms/creator", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1259,11 +1248,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/creator_label", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1278,10 +1266,9 @@ ], "slot_uri": "http://purl.org/pav/authoredBy", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1293,10 +1280,9 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/author_label", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1308,10 +1294,9 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_id", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1323,10 +1308,9 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_label", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1340,11 +1324,10 @@ "http://purl.org/dc/terms/license" ], "slot_uri": "http://purl.org/dc/terms/license", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1416,51 +1399,6 @@ "range": "string", "@type": "SlotDefinition" }, - { - "name": "literal_source", - "definition_uri": "https://w3id.org/sssom/literal_source", - "description": "URI of ontology source for the literal.", - "examples": [ - { - "value": "obo:mondo.owl", - "description": "A persistent OBO CURIE pointing to the latest version of the Mondo ontology.", - "@type": "Example" - }, - { - "value": "wikidata:Q7876491", - "description": "A Wikidata identifier for the Uberon ontology resource.", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "slot_uri": "https://w3id.org/sssom/literal_source", - "owner": "LiteralMapping", - "domain_of": [ - "LiteralMapping" - ], - "range": "EntityReference", - "@type": "SlotDefinition" - }, - { - "name": "literal_source_version", - "definition_uri": "https://w3id.org/sssom/literal_source_version", - "description": "Version IRI or version string of the source of the literal.", - "examples": [ - { - "value": "http://purl.obolibrary.org/obo/mondo/releases/2021-01-30/mondo.owl", - "description": "(A persistent Version IRI pointing to the Mondo version '2021-01-30')", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "slot_uri": "https://w3id.org/sssom/literal_source_version", - "owner": "LiteralMapping", - "domain_of": [ - "LiteralMapping" - ], - "range": "string", - "@type": "SlotDefinition" - }, { "name": "object_source", "definition_uri": "https://w3id.org/sssom/object_source", @@ -1489,11 +1427,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1521,11 +1458,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source_version", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1546,11 +1482,10 @@ "description": "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_provider", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1591,10 +1526,9 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_source", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1605,10 +1539,9 @@ "description": "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_cardinality", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "mapping_cardinality_enum", "@type": "SlotDefinition" @@ -1635,11 +1568,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1666,11 +1598,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool_version", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1694,11 +1625,10 @@ "http://purl.org/pav/authoredOn" ], "slot_uri": "http://purl.org/pav/authoredOn", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "date", "@type": "SlotDefinition" @@ -1726,10 +1656,9 @@ "description": "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/confidence", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "double", "minimum_value": 0.0, @@ -1778,11 +1707,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_match_field", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1794,10 +1722,9 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/match_string", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -1864,35 +1791,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_preprocessing", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" - ], - "range": "EntityReference", - "@type": "SlotDefinition" - }, - { - "name": "literal_preprocessing", - "definition_uri": "https://w3id.org/sssom/literal_preprocessing", - "description": "Method of preprocessing applied to the literal.", - "examples": [ - { - "value": "semapv:Stemming", - "@type": "Example" - }, - { - "value": "semapv:StopWordRemoval", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "slot_uri": "https://w3id.org/sssom/literal_preprocessing", - "multivalued": true, - "owner": "LiteralMapping", - "domain_of": [ - "LiteralMapping" + "Mapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1935,50 +1837,20 @@ "range": "string", "@type": "SlotDefinition" }, - { - "name": "semantic_similarity_score", - "definition_uri": "https://w3id.org/sssom/semantic_similarity_score", - "description": "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence.", - "from_schema": "https://w3id.org/sssom/schema/", - "slot_uri": "https://w3id.org/sssom/semantic_similarity_score", - "owner": "Mapping", - "domain_of": [ - "Mapping" - ], - "range": "double", - "minimum_value": 0.0, - "maximum_value": 1.0, - "@type": "SlotDefinition" - }, - { - "name": "semantic_similarity_measure", - "definition_uri": "https://w3id.org/sssom/semantic_similarity_measure", - "description": "The measure used for computing the the semantic similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable.", - "examples": [ - { - "value": "https://www.wikidata.org/wiki/Q865360", - "description": "(the Wikidata identifier for the Jaccard index measure).", - "@type": "Example" - } - ], - "from_schema": "https://w3id.org/sssom/schema/", - "slot_uri": "https://w3id.org/sssom/semantic_similarity_measure", - "owner": "Mapping", - "domain_of": [ - "Mapping" - ], - "range": "string", - "@type": "SlotDefinition" - }, { "name": "similarity_score", "definition_uri": "https://w3id.org/sssom/similarity_score", - "description": "A score between 0 and 1 to denote the similarity, where 1 denotes equivalence.", + "description": "A score between 0 and 1 to denote the similarity between two entities, where 1 denotes equivalence, and 0 denotes disjointness. The score is meant to be used in conjunction with the similarity_measure field, to document, for example, the lexical or semantic match of a matching algorithm.", "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/385", + "https://github.com/mapping-commons/sssom/pull/386", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/similarity_score.sssom.tsv" + ], "slot_uri": "https://w3id.org/sssom/similarity_score", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "LiteralMapping" + "Mapping" ], "range": "double", "minimum_value": 0.0, @@ -1988,19 +1860,34 @@ { "name": "similarity_measure", "definition_uri": "https://w3id.org/sssom/similarity_measure", - "description": "The measure used for computing the the similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable.", + "description": "The measure used for computing a similarity score. This field is meant to be used in conjunction with the similarity_score field, to document, for example, the lexical or semantic match of a matching algorithm. To make processing this field as unambiguous as possible, we recommend using wikidata CURIEs, but the type of this field is deliberately unspecified.", "examples": [ { - "value": "https://www.wikidata.org/wiki/Q865360", - "description": "(the Wikidata identifier for the Jaccard index measure).", + "value": "https://www.wikidata.org/entity/Q865360", + "description": "(the Wikidata IRI for the Jaccard index measure).", + "@type": "Example" + }, + { + "value": "wikidata:Q865360", + "description": "(the Wikidata CURIE for the Jaccard index measure).", + "@type": "Example" + }, + { + "value": "Levenshtein distance", + "description": "(a score to measure the distance between two character sequences).", "@type": "Example" } ], "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/385", + "https://github.com/mapping-commons/sssom/pull/386", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/similarity_score.sssom.tsv" + ], "slot_uri": "https://w3id.org/sssom/similarity_measure", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -2066,11 +1953,10 @@ ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#seeAlso", "multivalued": true, - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -2081,11 +1967,10 @@ "description": "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/other", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -2099,11 +1984,10 @@ "http://www.w3.org/2000/01/rdf-schema#comment" ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#comment", - "owner": "LiteralMapping", + "owner": "Mapping", "domain_of": [ "MappingSet", - "Mapping", - "LiteralMapping" + "Mapping" ], "range": "string", "@type": "SlotDefinition" @@ -2210,6 +2094,7 @@ "description": "Represents a set of mappings", "from_schema": "https://w3id.org/sssom/schema/", "slots": [ + "curie_map", "mappings", "mapping_set_id", "mapping_set_version", @@ -2291,64 +2176,10 @@ "match_string", "subject_preprocessing", "object_preprocessing", - "semantic_similarity_score", - "semantic_similarity_measure", - "see_also", - "issue_tracker_item", - "other", - "comment" - ], - "slot_usage": {}, - "class_uri": "http://www.w3.org/2002/07/owl#Axiom", - "@type": "ClassDefinition" - }, - { - "name": "LiteralMapping", - "definition_uri": "https://w3id.org/sssom/LiteralMapping", - "description": "Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change.", - "from_schema": "https://w3id.org/sssom/schema/", - "see_also": [ - "https://mapping-commons.github.io/sssom/sssom-profiles/" - ], - "mappings": [ - "owl:Axiom" - ], - "slots": [ - "literal", - "literal_datatype", - "predicate_id", - "predicate_label", - "predicate_modifier", - "object_id", - "object_label", - "object_category", - "mapping_justification", - "author_id", - "author_label", - "reviewer_id", - "reviewer_label", - "creator_id", - "creator_label", - "license", - "literal_source", - "literal_source_version", - "object_type", - "object_source", - "object_source_version", - "mapping_provider", - "mapping_source", - "mapping_cardinality", - "mapping_tool", - "mapping_tool_version", - "mapping_date", - "confidence", - "object_match_field", - "match_string", - "literal_preprocessing", - "object_preprocessing", "similarity_score", "similarity_measure", "see_also", + "issue_tracker_item", "other", "comment" ], @@ -2392,6 +2223,18 @@ "class_uri": "https://w3id.org/sssom/MappingSetReference", "@type": "ClassDefinition" }, + { + "name": "Prefix", + "definition_uri": "https://w3id.org/sssom/Prefix", + "from_schema": "https://w3id.org/sssom/schema/", + "slots": [ + "prefix_name", + "prefix_url" + ], + "slot_usage": {}, + "class_uri": "https://w3id.org/sssom/Prefix", + "@type": "ClassDefinition" + }, { "name": "ExtensionDefinition", "definition_uri": "https://w3id.org/sssom/ExtensionDefinition", @@ -2452,13 +2295,29 @@ ], "class_uri": "https://w3id.org/sssom/Propagatable", "@type": "ClassDefinition" + }, + { + "name": "NoTermFound", + "definition_uri": "https://w3id.org/sssom/NoTermFound", + "description": "sssom:NoTermFound can be used in place of a subject_id or object_id when the corresponding entity could not be found. It SHOULD be used in conjuction with a corresponding subject_source or object_source to signify where the term was not found.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/28", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/no_term_found.sssom.tsv" + ], + "mappings": [ + "sssom:NoTermFound" + ], + "slot_usage": {}, + "class_uri": "https://w3id.org/sssom/NoTermFound", + "@type": "ClassDefinition" } ], "metamodel_version": "1.7.0", "source_file": "sssom_schema.yaml", - "source_file_date": "2024-08-04T07:56:31", - "source_file_size": 32305, - "generation_date": "2024-08-05T10:18:22", + "source_file_date": "2024-08-06T18:58:28", + "source_file_size": 31410, + "generation_date": "2024-08-06T18:58:48", "@type": "SchemaDefinition", "@context": [ "project/jsonld/sssom_schema.context.jsonld", diff --git a/src/sssom_schema/datamodel/sssom_schema.py b/src/sssom_schema/datamodel/sssom_schema.py index 9367487c..aee3262c 100644 --- a/src/sssom_schema/datamodel/sssom_schema.py +++ b/src/sssom_schema/datamodel/sssom_schema.py @@ -1,5 +1,5 @@ # Auto generated from sssom_schema.yaml by pythongen.py version: 0.0.1 -# Generation date: 2024-08-05T10:18:23 +# Generation date: 2024-08-06T18:58:49 # Schema: sssom # # id: https://w3id.org/sssom/schema/ @@ -58,7 +58,8 @@ class EntityReference(Uriorcurie): # Class references - +class PrefixPrefixName(NCName): + pass @dataclass @@ -75,6 +76,7 @@ class MappingSet(YAMLRoot): mapping_set_id: Union[str, URI] = None license: Union[str, URI] = None + curie_map: Optional[Union[Dict[Union[str, PrefixPrefixName], Union[dict, "Prefix"]], List[Union[dict, "Prefix"]]]] = empty_dict() mappings: Optional[Union[Union[dict, "Mapping"], List[Union[dict, "Mapping"]]]] = empty_list() mapping_set_version: Optional[str] = None mapping_set_source: Optional[Union[Union[str, URI], List[Union[str, URI]]]] = empty_list() @@ -114,6 +116,8 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if not isinstance(self.license, URI): self.license = URI(self.license) + self._normalize_inlined_as_dict(slot_name="curie_map", slot_type=Prefix, key_name="prefix_name", keyed=True) + if not isinstance(self.mappings, list): self.mappings = [self.mappings] if self.mappings is not None else [] self.mappings = [v if isinstance(v, Mapping) else Mapping(**as_dict(v)) for v in self.mappings] @@ -256,8 +260,8 @@ class Mapping(YAMLRoot): match_string: Optional[Union[str, List[str]]] = empty_list() subject_preprocessing: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() object_preprocessing: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() - semantic_similarity_score: Optional[float] = None - semantic_similarity_measure: Optional[str] = None + similarity_score: Optional[float] = None + similarity_measure: Optional[str] = None see_also: Optional[Union[str, List[str]]] = empty_list() issue_tracker_item: Optional[Union[str, EntityReference]] = None other: Optional[str] = None @@ -399,194 +403,6 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): self.object_preprocessing = [self.object_preprocessing] if self.object_preprocessing is not None else [] self.object_preprocessing = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.object_preprocessing] - if self.semantic_similarity_score is not None and not isinstance(self.semantic_similarity_score, float): - self.semantic_similarity_score = float(self.semantic_similarity_score) - - if self.semantic_similarity_measure is not None and not isinstance(self.semantic_similarity_measure, str): - self.semantic_similarity_measure = str(self.semantic_similarity_measure) - - if not isinstance(self.see_also, list): - self.see_also = [self.see_also] if self.see_also is not None else [] - self.see_also = [v if isinstance(v, str) else str(v) for v in self.see_also] - - if self.issue_tracker_item is not None and not isinstance(self.issue_tracker_item, EntityReference): - self.issue_tracker_item = EntityReference(self.issue_tracker_item) - - if self.other is not None and not isinstance(self.other, str): - self.other = str(self.other) - - if self.comment is not None and not isinstance(self.comment, str): - self.comment = str(self.comment) - - super().__post_init__(**kwargs) - - -@dataclass -class LiteralMapping(YAMLRoot): - """ - Represents an individual mapping between a literal and an entity. Note that this schema has been created on - 01.08.2023 and is subject to change. - """ - _inherited_slots: ClassVar[List[str]] = [] - - class_class_uri: ClassVar[URIRef] = OWL["Axiom"] - class_class_curie: ClassVar[str] = "owl:Axiom" - class_name: ClassVar[str] = "literal mapping" - class_model_uri: ClassVar[URIRef] = SSSOM.LiteralMapping - - literal: str = None - predicate_id: Union[str, EntityReference] = None - object_id: Union[str, EntityReference] = None - mapping_justification: Union[str, EntityReference] = None - literal_datatype: Optional[Union[str, URI]] = None - predicate_label: Optional[str] = None - predicate_modifier: Optional[Union[str, "PredicateModifierEnum"]] = None - object_label: Optional[str] = None - object_category: Optional[str] = None - author_id: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() - author_label: Optional[Union[str, List[str]]] = empty_list() - reviewer_id: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() - reviewer_label: Optional[Union[str, List[str]]] = empty_list() - creator_id: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() - creator_label: Optional[Union[str, List[str]]] = empty_list() - license: Optional[Union[str, URI]] = None - literal_source: Optional[Union[str, EntityReference]] = None - literal_source_version: Optional[str] = None - object_type: Optional[Union[str, "EntityTypeEnum"]] = None - object_source: Optional[Union[str, EntityReference]] = None - object_source_version: Optional[str] = None - mapping_provider: Optional[Union[str, URI]] = None - mapping_source: Optional[Union[str, EntityReference]] = None - mapping_cardinality: Optional[Union[str, "MappingCardinalityEnum"]] = None - mapping_tool: Optional[str] = None - mapping_tool_version: Optional[str] = None - mapping_date: Optional[Union[str, XSDDate]] = None - confidence: Optional[float] = None - object_match_field: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() - match_string: Optional[Union[str, List[str]]] = empty_list() - literal_preprocessing: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() - object_preprocessing: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() - similarity_score: Optional[float] = None - similarity_measure: Optional[str] = None - see_also: Optional[Union[str, List[str]]] = empty_list() - other: Optional[str] = None - comment: Optional[str] = None - - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): - if self._is_empty(self.literal): - self.MissingRequiredField("literal") - if not isinstance(self.literal, str): - self.literal = str(self.literal) - - if self._is_empty(self.predicate_id): - self.MissingRequiredField("predicate_id") - if not isinstance(self.predicate_id, EntityReference): - self.predicate_id = EntityReference(self.predicate_id) - - if self._is_empty(self.object_id): - self.MissingRequiredField("object_id") - if not isinstance(self.object_id, EntityReference): - self.object_id = EntityReference(self.object_id) - - if self._is_empty(self.mapping_justification): - self.MissingRequiredField("mapping_justification") - if not isinstance(self.mapping_justification, EntityReference): - self.mapping_justification = EntityReference(self.mapping_justification) - - if self.literal_datatype is not None and not isinstance(self.literal_datatype, URI): - self.literal_datatype = URI(self.literal_datatype) - - if self.predicate_label is not None and not isinstance(self.predicate_label, str): - self.predicate_label = str(self.predicate_label) - - if self.predicate_modifier is not None and not isinstance(self.predicate_modifier, PredicateModifierEnum): - self.predicate_modifier = PredicateModifierEnum(self.predicate_modifier) - - if self.object_label is not None and not isinstance(self.object_label, str): - self.object_label = str(self.object_label) - - if self.object_category is not None and not isinstance(self.object_category, str): - self.object_category = str(self.object_category) - - if not isinstance(self.author_id, list): - self.author_id = [self.author_id] if self.author_id is not None else [] - self.author_id = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.author_id] - - if not isinstance(self.author_label, list): - self.author_label = [self.author_label] if self.author_label is not None else [] - self.author_label = [v if isinstance(v, str) else str(v) for v in self.author_label] - - if not isinstance(self.reviewer_id, list): - self.reviewer_id = [self.reviewer_id] if self.reviewer_id is not None else [] - self.reviewer_id = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.reviewer_id] - - if not isinstance(self.reviewer_label, list): - self.reviewer_label = [self.reviewer_label] if self.reviewer_label is not None else [] - self.reviewer_label = [v if isinstance(v, str) else str(v) for v in self.reviewer_label] - - if not isinstance(self.creator_id, list): - self.creator_id = [self.creator_id] if self.creator_id is not None else [] - self.creator_id = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.creator_id] - - if not isinstance(self.creator_label, list): - self.creator_label = [self.creator_label] if self.creator_label is not None else [] - self.creator_label = [v if isinstance(v, str) else str(v) for v in self.creator_label] - - if self.license is not None and not isinstance(self.license, URI): - self.license = URI(self.license) - - if self.literal_source is not None and not isinstance(self.literal_source, EntityReference): - self.literal_source = EntityReference(self.literal_source) - - if self.literal_source_version is not None and not isinstance(self.literal_source_version, str): - self.literal_source_version = str(self.literal_source_version) - - if self.object_type is not None and not isinstance(self.object_type, EntityTypeEnum): - self.object_type = EntityTypeEnum(self.object_type) - - if self.object_source is not None and not isinstance(self.object_source, EntityReference): - self.object_source = EntityReference(self.object_source) - - if self.object_source_version is not None and not isinstance(self.object_source_version, str): - self.object_source_version = str(self.object_source_version) - - if self.mapping_provider is not None and not isinstance(self.mapping_provider, URI): - self.mapping_provider = URI(self.mapping_provider) - - if self.mapping_source is not None and not isinstance(self.mapping_source, EntityReference): - self.mapping_source = EntityReference(self.mapping_source) - - if self.mapping_cardinality is not None and not isinstance(self.mapping_cardinality, MappingCardinalityEnum): - self.mapping_cardinality = MappingCardinalityEnum(self.mapping_cardinality) - - if self.mapping_tool is not None and not isinstance(self.mapping_tool, str): - self.mapping_tool = str(self.mapping_tool) - - if self.mapping_tool_version is not None and not isinstance(self.mapping_tool_version, str): - self.mapping_tool_version = str(self.mapping_tool_version) - - if self.mapping_date is not None and not isinstance(self.mapping_date, XSDDate): - self.mapping_date = XSDDate(self.mapping_date) - - if self.confidence is not None and not isinstance(self.confidence, float): - self.confidence = float(self.confidence) - - if not isinstance(self.object_match_field, list): - self.object_match_field = [self.object_match_field] if self.object_match_field is not None else [] - self.object_match_field = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.object_match_field] - - if not isinstance(self.match_string, list): - self.match_string = [self.match_string] if self.match_string is not None else [] - self.match_string = [v if isinstance(v, str) else str(v) for v in self.match_string] - - if not isinstance(self.literal_preprocessing, list): - self.literal_preprocessing = [self.literal_preprocessing] if self.literal_preprocessing is not None else [] - self.literal_preprocessing = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.literal_preprocessing] - - if not isinstance(self.object_preprocessing, list): - self.object_preprocessing = [self.object_preprocessing] if self.object_preprocessing is not None else [] - self.object_preprocessing = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.object_preprocessing] - if self.similarity_score is not None and not isinstance(self.similarity_score, float): self.similarity_score = float(self.similarity_score) @@ -597,6 +413,9 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): self.see_also = [self.see_also] if self.see_also is not None else [] self.see_also = [v if isinstance(v, str) else str(v) for v in self.see_also] + if self.issue_tracker_item is not None and not isinstance(self.issue_tracker_item, EntityReference): + self.issue_tracker_item = EntityReference(self.issue_tracker_item) + if self.other is not None and not isinstance(self.other, str): self.other = str(self.other) @@ -701,6 +520,30 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): super().__post_init__(**kwargs) +@dataclass +class Prefix(YAMLRoot): + _inherited_slots: ClassVar[List[str]] = [] + + class_class_uri: ClassVar[URIRef] = SSSOM["Prefix"] + class_class_curie: ClassVar[str] = "sssom:Prefix" + class_name: ClassVar[str] = "prefix" + class_model_uri: ClassVar[URIRef] = SSSOM.Prefix + + prefix_name: Union[str, PrefixPrefixName] = None + prefix_url: Optional[Union[str, URI]] = None + + def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + if self._is_empty(self.prefix_name): + self.MissingRequiredField("prefix_name") + if not isinstance(self.prefix_name, PrefixPrefixName): + self.prefix_name = PrefixPrefixName(self.prefix_name) + + if self.prefix_url is not None and not isinstance(self.prefix_url, URI): + self.prefix_url = URI(self.prefix_url) + + super().__post_init__(**kwargs) + + @dataclass class ExtensionDefinition(YAMLRoot): """ @@ -754,6 +597,20 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): super().__post_init__(**kwargs) +class NoTermFound(YAMLRoot): + """ + sssom:NoTermFound can be used in place of a subject_id or object_id when the corresponding entity could not be + found. It SHOULD be used in conjuction with a corresponding subject_source or object_source to signify where the + term was not found. + """ + _inherited_slots: ClassVar[List[str]] = [] + + class_class_uri: ClassVar[URIRef] = SSSOM["NoTermFound"] + class_class_curie: ClassVar[str] = "sssom:NoTermFound" + class_name: ClassVar[str] = "NoTermFound" + class_model_uri: ClassVar[URIRef] = SSSOM.NoTermFound + + # Enumerations class EntityTypeEnum(EnumDefinitionImpl): @@ -855,6 +712,15 @@ def _addvals(cls): class slots: pass +slots.prefix_name = Slot(uri=SSSOM.prefix_name, name="prefix_name", curie=SSSOM.curie('prefix_name'), + model_uri=SSSOM.prefix_name, domain=None, range=URIRef) + +slots.prefix_url = Slot(uri=SSSOM.prefix_url, name="prefix_url", curie=SSSOM.curie('prefix_url'), + model_uri=SSSOM.prefix_url, domain=None, range=Optional[Union[str, URI]]) + +slots.curie_map = Slot(uri=SSSOM.curie_map, name="curie_map", curie=SSSOM.curie('curie_map'), + model_uri=SSSOM.curie_map, domain=None, range=Optional[Union[Dict[Union[str, PrefixPrefixName], Union[dict, Prefix]], List[Union[dict, Prefix]]]]) + slots.mirror_from = Slot(uri=SSSOM.mirror_from, name="mirror_from", curie=SSSOM.curie('mirror_from'), model_uri=SSSOM.mirror_from, domain=None, range=Optional[Union[str, URI]]) @@ -894,12 +760,6 @@ class slots: slots.subject_id = Slot(uri=OWL.annotatedSource, name="subject_id", curie=OWL.curie('annotatedSource'), model_uri=SSSOM.subject_id, domain=None, range=Union[str, EntityReference]) -slots.literal = Slot(uri=OWL.annotatedTarget, name="literal", curie=OWL.curie('annotatedTarget'), - model_uri=SSSOM.literal, domain=None, range=str, mappings = [OWL["annotatedSource"]]) - -slots.literal_datatype = Slot(uri=RDF.datatype, name="literal_datatype", curie=RDF.curie('datatype'), - model_uri=SSSOM.literal_datatype, domain=None, range=Optional[Union[str, URI]]) - slots.subject_label = Slot(uri=SSSOM.subject_label, name="subject_label", curie=SSSOM.curie('subject_label'), model_uri=SSSOM.subject_label, domain=None, range=Optional[str]) @@ -979,12 +839,6 @@ class slots: slots.subject_source_version = Slot(uri=SSSOM.subject_source_version, name="subject_source_version", curie=SSSOM.curie('subject_source_version'), model_uri=SSSOM.subject_source_version, domain=None, range=Optional[str]) -slots.literal_source = Slot(uri=SSSOM.literal_source, name="literal_source", curie=SSSOM.curie('literal_source'), - model_uri=SSSOM.literal_source, domain=None, range=Optional[Union[str, EntityReference]]) - -slots.literal_source_version = Slot(uri=SSSOM.literal_source_version, name="literal_source_version", curie=SSSOM.curie('literal_source_version'), - model_uri=SSSOM.literal_source_version, domain=None, range=Optional[str]) - slots.object_source = Slot(uri=SSSOM.object_source, name="object_source", curie=SSSOM.curie('object_source'), model_uri=SSSOM.object_source, domain=None, range=Optional[Union[str, EntityReference]]) @@ -1033,21 +887,12 @@ class slots: slots.object_preprocessing = Slot(uri=SSSOM.object_preprocessing, name="object_preprocessing", curie=SSSOM.curie('object_preprocessing'), model_uri=SSSOM.object_preprocessing, domain=None, range=Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]]) -slots.literal_preprocessing = Slot(uri=SSSOM.literal_preprocessing, name="literal_preprocessing", curie=SSSOM.curie('literal_preprocessing'), - model_uri=SSSOM.literal_preprocessing, domain=None, range=Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]]) - slots.curation_rule = Slot(uri=SSSOM.curation_rule, name="curation_rule", curie=SSSOM.curie('curation_rule'), model_uri=SSSOM.curation_rule, domain=None, range=Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]]) slots.curation_rule_text = Slot(uri=SSSOM.curation_rule_text, name="curation_rule_text", curie=SSSOM.curie('curation_rule_text'), model_uri=SSSOM.curation_rule_text, domain=None, range=Optional[Union[str, List[str]]]) -slots.semantic_similarity_score = Slot(uri=SSSOM.semantic_similarity_score, name="semantic_similarity_score", curie=SSSOM.curie('semantic_similarity_score'), - model_uri=SSSOM.semantic_similarity_score, domain=None, range=Optional[float]) - -slots.semantic_similarity_measure = Slot(uri=SSSOM.semantic_similarity_measure, name="semantic_similarity_measure", curie=SSSOM.curie('semantic_similarity_measure'), - model_uri=SSSOM.semantic_similarity_measure, domain=None, range=Optional[str]) - slots.similarity_score = Slot(uri=SSSOM.similarity_score, name="similarity_score", curie=SSSOM.curie('similarity_score'), model_uri=SSSOM.similarity_score, domain=None, range=Optional[float]) diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index 0f58e3d3..e30103dd 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -72,6 +72,20 @@ types: - https://mapping-commons.github.io/sssom/spec/#tsv slots: + prefix_name: + key: true + range: ncname + prefix_url: + range: uri + curie_map: + description: A dictionary that contains prefixes as keys and their URI expansions as values. + range: prefix + multivalued: true + inlined: true + see_also: + - https://github.com/mapping-commons/sssom/issues/225 + - https://github.com/mapping-commons/sssom/pull/349 + - https://github.com/mapping-commons/sssom/blob/master/examples/schema/curie_map.sssom.tsv mirror_from: description: A URL location from which to obtain a resource, such as a mapping set. range: uri @@ -597,6 +611,7 @@ classes: license: required: true slots: + - curie_map - mappings - mapping_set_id - mapping_set_version @@ -697,6 +712,10 @@ classes: - mapping_set_group - last_updated - local_name + prefix: + slots: + - prefix_name + - prefix_url extension definition: description: A definition of an extension (non-standard) slot. attributes: