diff --git a/CHANGELOG.md b/CHANGELOG.md index 691970c6..14db1dbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next - Add the concept of "propagatable slots". +- Add the concept of "extension slots". - Add the entity reference `sssom:NoTermFound` to express the concept of an "unmapped entity" ([issue](https://github.com/mapping-commons/sssom/issues/28)) - Replace `semantic_similarity_score` with `similarity_score` and `semantic_similarity_measure` with `similarity_measure` in the data model ([issue](https://github.com/mapping-commons/sssom/issues/385)) diff --git a/examples/schema/extension-slots.sssom.tsv b/examples/schema/extension-slots.sssom.tsv new file mode 100644 index 00000000..c25414e0 --- /dev/null +++ b/examples/schema/extension-slots.sssom.tsv @@ -0,0 +1,23 @@ +#curie_map: +# COMENT: https://example.com/entities/ +# EXPROP: https://example.org/properties/ +# ORGENT: https://example.org/entities/ +#mapping_set_id: https://example.org/sets/exo2c-with-extensions +#mapping_set_title: Sample set EXO2C with extension slots +#license: https://creativecommons.org/licenses/by/4.0/ +#extension_definitions: +# - slot_name: ext_bar +# property: EXPROP:barProperty +# type_hint: xsd:integer +# - slot_name: ext_baz +# property: EXPROP:bazProperty +# type_hint: linkml:Uriorcurie +# - slot_name: ext_foo +# property: EXPROP:fooProperty +#ext_foo: Foo A +#ext_undeclared_foo: Foo B +subject_id subject_label predicate_id object_id object_label mapping_justification ext_bar ext_baz ext_undeclared_baz +ORGENT:0001 alice skos:closeMatch COMENT:0011 alpha semapv:ManualMappingCuration 111 ORGENT:BAZ_0001 BAZ A +ORGENT:0002 bob skos:closeMatch COMENT:0012 beta semapv:ManualMappingCuration 112 ORGENT:BAZ_0002 +ORGENT:0004 daphne skos:closeMatch COMENT:0014 delta semapv:ManualMappingCuration 114 Baz C +ORGENT:0005 eve skos:closeMatch COMENT:0015 epsilon semapv:ManualMappingCuration 115 ORGENT:BAZ_0005 Baz E diff --git a/project/excel/sssom_schema.xlsx b/project/excel/sssom_schema.xlsx index 682cb486..7216460e 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 5cdac918..d0f66a04 100644 --- a/project/graphql/sssom_schema.graphql +++ b/project/graphql/sssom_schema.graphql @@ -1,3 +1,51 @@ +type ExtensionDefinition + { + slotName: Ncname! + property: Uriorcurie + typeHint: Uriorcurie + } + +type LiteralMapping + { + literal: String! + literalDatatype: Uri + predicateId: EntityReference! + predicateLabel: String + predicateModifier: PredicateModifierEnum + objectId: EntityReference! + objectLabel: String + objectCategory: String + mappingJustification: EntityReference! + authorId: [EntityReference] + authorLabel: [String] + reviewerId: [EntityReference] + reviewerLabel: [String] + creatorId: [EntityReference] + creatorLabel: [String] + license: Uri + literalSource: EntityReference + literalSourceVersion: String + objectType: EntityTypeEnum + objectSource: EntityReference + objectSourceVersion: String + mappingProvider: Uri + mappingSource: EntityReference + mappingCardinality: MappingCardinalityEnum + mappingTool: String + mappingToolVersion: String + mappingDate: Date + confidence: Double + objectMatchField: [EntityReference] + matchString: [String] + literalPreprocessing: [EntityReference] + objectPreprocessing: [EntityReference] + similarityScore: Double + similarityMeasure: String + seeAlso: [String] + other: String + comment: String + } + type Mapping { subjectId: EntityReference! @@ -88,6 +136,7 @@ type MappingSet issueTracker: Uri other: String comment: String + extensionDefinitions: [ExtensionDefinition] } type MappingSetReference @@ -100,3 +149,8 @@ type MappingSetReference localName: String } +type Propagatable + { + propagated: Boolean + } + diff --git a/project/jsonld/sssom_schema.context.jsonld b/project/jsonld/sssom_schema.context.jsonld index fc8fd2bf..e1851867 100644 --- a/project/jsonld/sssom_schema.context.jsonld +++ b/project/jsonld/sssom_schema.context.jsonld @@ -1,5 +1,9 @@ { - "_comments": "Auto generated from sssom_schema.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2023-07-31T17:42:54\n Schema: sssom\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/sssom/schema/\n description: Datamodel for Simple Standard for Sharing Ontological Mappings (SSSOM)\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ", + "comments": { + "description": "Auto generated by LinkML jsonld context generator", + "generation_date": "2024-08-05T10:18:22", + "source": "sssom_schema.yaml" + }, "@context": { "dcterms": "http://purl.org/dc/terms/", "linkml": "https://w3id.org/linkml/", @@ -12,75 +16,144 @@ "semapv": "https://w3id.org/semapv/vocab/", "skos": "http://www.w3.org/2004/02/skos/core#", "sssom": "https://w3id.org/sssom/", + "xsd": "http://www.w3.org/2001/XMLSchema#", "@vocab": "https://w3id.org/sssom/", "author_id": { "@type": "rdfs:Resource", "@id": "pav:authoredBy" }, + "author_label": { + "@id": "author_label" + }, "comment": { "@id": "rdfs:comment" }, "confidence": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "confidence" }, "creator_id": { "@type": "rdfs:Resource", "@id": "dcterms:creator" }, + "creator_label": { + "@id": "creator_label" + }, "curation_rule": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "curation_rule" + }, + "curation_rule_text": { + "@id": "curation_rule_text" }, "documentation": { - "@type": "@id" + "@type": "@id", + "@id": "documentation" + }, + "extension_definitions": { + "@type": "@id", + "@id": "extension_definitions" + }, + "property": { + "@type": "@id", + "@id": "property" + }, + "slot_name": { + "@id": "slot_name" + }, + "type_hint": { + "@type": "@id", + "@id": "type_hint" }, "homepage": { - "@type": "@id" + "@type": "@id", + "@id": "homepage" }, "imports": { - "@type": "@id" + "@type": "@id", + "@id": "imports" }, "issue_tracker": { - "@type": "@id" + "@type": "@id", + "@id": "issue_tracker" }, "issue_tracker_item": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "issue_tracker_item" }, "last_updated": { - "@type": "xsd:date" + "@type": "xsd:date", + "@id": "last_updated" }, "license": { "@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" + }, "mapping_cardinality": { "@context": { "@vocab": "@null", "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "mapping_cardinality" }, "mapping_date": { "@type": "xsd:date", "@id": "pav:authoredOn" }, "mapping_justification": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_justification" }, "mapping_provider": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_provider" + }, + "mapping_registry_description": { + "@id": "mapping_registry_description" }, "mapping_registry_id": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_registry_id" + }, + "mapping_registry_title": { + "@id": "mapping_registry_title" }, "mapping_set_description": { "@id": "dcterms:description" }, + "mapping_set_group": { + "@id": "mapping_set_group" + }, "mapping_set_id": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_set_id" }, "mapping_set_references": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_set_references" }, "mapping_set_source": { "@type": "@id", @@ -93,26 +166,50 @@ "@id": "owl:versionInfo" }, "mapping_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_source" + }, + "mapping_tool": { + "@id": "mapping_tool" + }, + "mapping_tool_version": { + "@id": "mapping_tool_version" }, "mappings": { - "@type": "@id" + "@type": "@id", + "@id": "mappings" + }, + "match_string": { + "@id": "match_string" }, "mirror_from": { - "@type": "@id" + "@type": "@id", + "@id": "mirror_from" + }, + "object_category": { + "@id": "object_category" }, "object_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedTarget" }, + "object_label": { + "@id": "object_label" + }, "object_match_field": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_match_field" }, "object_preprocessing": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_preprocessing" }, "object_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_source" + }, + "object_source_version": { + "@id": "object_source_version" }, "object_type": { "@context": { @@ -120,19 +217,27 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "object_type" + }, + "other": { + "@id": "other" }, "predicate_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedProperty" }, + "predicate_label": { + "@id": "predicate_label" + }, "predicate_modifier": { "@context": { "@vocab": "@null", "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "predicate_modifier" }, "predicate_type": { "@context": { @@ -140,36 +245,69 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "predicate_type" + }, + "propagated": { + "@type": "xsd:boolean", + "@id": "propagated" }, "publication_date": { "@type": "xsd:date", "@id": "dcterms:created" }, "registry_confidence": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "registry_confidence" }, "reviewer_id": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "reviewer_id" + }, + "reviewer_label": { + "@id": "reviewer_label" }, "see_also": { "@id": "rdfs:seeAlso" }, + "semantic_similarity_measure": { + "@id": "semantic_similarity_measure" + }, "semantic_similarity_score": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "semantic_similarity_score" + }, + "similarity_measure": { + "@id": "similarity_measure" + }, + "similarity_score": { + "@type": "xsd:double", + "@id": "similarity_score" + }, + "subject_category": { + "@id": "subject_category" }, "subject_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedSource" }, + "subject_label": { + "@id": "subject_label" + }, "subject_match_field": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_match_field" }, "subject_preprocessing": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_preprocessing" }, "subject_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_source" + }, + "subject_source_version": { + "@id": "subject_source_version" }, "subject_type": { "@context": { @@ -177,10 +315,29 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "subject_type" + }, + "ExtensionDefinition": { + "@id": "ExtensionDefinition" + }, + "LiteralMapping": { + "@id": "owl:Axiom" }, "Mapping": { "@id": "owl:Axiom" + }, + "MappingRegistry": { + "@id": "MappingRegistry" + }, + "MappingSet": { + "@id": "MappingSet" + }, + "MappingSetReference": { + "@id": "MappingSetReference" + }, + "Propagatable": { + "@id": "Propagatable" } } } diff --git a/project/jsonld/sssom_schema.jsonld b/project/jsonld/sssom_schema.jsonld index 47844e72..a0a43e18 100644 --- a/project/jsonld/sssom_schema.jsonld +++ b/project/jsonld/sssom_schema.jsonld @@ -47,6 +47,10 @@ "prefix_prefix": "skos", "prefix_reference": "http://www.w3.org/2004/02/skos/core#" }, + { + "prefix_prefix": "xsd", + "prefix_reference": "http://www.w3.org/2001/XMLSchema#" + }, { "prefix_prefix": "semapv", "prefix_reference": "https://w3id.org/semapv/vocab/" @@ -62,8 +66,11 @@ { "name": "EntityReference", "definition_uri": "https://w3id.org/sssom/EntityReference", - "description": "A reference to a mapped entity. This is represented internally as a string, and as a resource in RDF", + "description": "A reference to an entity involved in the mapping.\n", "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://mapping-commons.github.io/sssom/spec/#tsv" + ], "typeof": "uriorcurie", "base": "str", "uri": "http://www.w3.org/2000/01/rdf-schema#Resource", @@ -74,6 +81,9 @@ "name": "string", "definition_uri": "https://w3id.org/linkml/String", "description": "A character string", + "notes": [ + "In RDF serializations, a slot with range of string is treated as a literal or type xsd:string. If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"string\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -87,6 +97,9 @@ "name": "integer", "definition_uri": "https://w3id.org/linkml/Integer", "description": "An integer", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"integer\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -100,6 +113,9 @@ "name": "boolean", "definition_uri": "https://w3id.org/linkml/Boolean", "description": "A binary (true or false) value", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"boolean\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -114,6 +130,9 @@ "name": "float", "definition_uri": "https://w3id.org/linkml/Float", "description": "A real number that conforms to the xsd:float specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"float\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -127,6 +146,9 @@ "name": "double", "definition_uri": "https://w3id.org/linkml/Double", "description": "A real number that conforms to the xsd:double specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"double\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "close_mappings": [ @@ -140,6 +162,9 @@ "name": "decimal", "definition_uri": "https://w3id.org/linkml/Decimal", "description": "A real number with arbitrary precision that conforms to the xsd:decimal specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"decimal\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "broad_mappings": [ @@ -154,7 +179,8 @@ "definition_uri": "https://w3id.org/linkml/Time", "description": "A time object represents a (local) time of day, independent of any particular day", "notes": [ - "URI is dateTime because OWL reasoners do not work with straight date or time" + "URI is dateTime because OWL reasoners do not work with straight date or time", + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"time\"." ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", @@ -171,7 +197,8 @@ "definition_uri": "https://w3id.org/linkml/Date", "description": "a date (year, month and day) in an idealized calendar", "notes": [ - "URI is dateTime because OWL reasoners don't work with straight date or time" + "URI is dateTime because OWL reasoners don't work with straight date or time", + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"date\"." ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", @@ -187,6 +214,9 @@ "name": "datetime", "definition_uri": "https://w3id.org/linkml/Datetime", "description": "The combination of a date and time", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"datetime\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -201,6 +231,9 @@ "name": "date_or_datetime", "definition_uri": "https://w3id.org/linkml/DateOrDatetime", "description": "Either a date or a datetime", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"date_or_datetime\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -212,6 +245,9 @@ "name": "uriorcurie", "definition_uri": "https://w3id.org/linkml/Uriorcurie", "description": "a URI or a CURIE", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"uriorcurie\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "URIorCURIE", @@ -224,6 +260,9 @@ "definition_uri": "https://w3id.org/linkml/Curie", "conforms_to": "https://www.w3.org/TR/curie/", "description": "a compact URI", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"curie\"." + ], "comments": [ "in RDF serializations this MUST be expanded to a URI", "in non-RDF serializations MAY be serialized as the compact representation" @@ -240,6 +279,9 @@ "definition_uri": "https://w3id.org/linkml/Uri", "conforms_to": "https://www.ietf.org/rfc/rfc3987.txt", "description": "a complete URI", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"uri\"." + ], "comments": [ "in RDF serializations a slot with range of uri is treated as a literal or type xsd:anyURI unless it is an identifier or a reference to an identifier, in which case it is translated directly to a node" ], @@ -257,6 +299,9 @@ "name": "ncname", "definition_uri": "https://w3id.org/linkml/Ncname", "description": "Prefix part of CURIE", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"ncname\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "NCName", @@ -268,6 +313,9 @@ "name": "objectidentifier", "definition_uri": "https://w3id.org/linkml/Objectidentifier", "description": "A URI or CURIE that represents an object in the model.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"objectidentifier\"." + ], "comments": [ "Used for inheritance and type checking" ], @@ -282,6 +330,9 @@ "name": "nodeidentifier", "definition_uri": "https://w3id.org/linkml/Nodeidentifier", "description": "A URI, CURIE or BNODE that represents a node in a model.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"nodeidentifier\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "NodeIdentifier", @@ -294,6 +345,9 @@ "definition_uri": "https://w3id.org/linkml/Jsonpointer", "conforms_to": "https://datatracker.ietf.org/doc/html/rfc6901", "description": "A string encoding a JSON Pointer. The value of the string MUST conform to JSON Point syntax and SHOULD dereference to a valid object within the current instance document when encoded in tree form.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"jsonpointer\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -306,6 +360,9 @@ "definition_uri": "https://w3id.org/linkml/Jsonpath", "conforms_to": "https://www.ietf.org/archive/id/draft-goessner-dispatch-jsonpath-00.html", "description": "A string encoding a JSON Path. The value of the string MUST conform to JSON Point syntax and SHOULD dereference to zero or more valid objects within the current instance document when encoded in tree form.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"jsonpath\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -318,6 +375,9 @@ "definition_uri": "https://w3id.org/linkml/Sparqlpath", "conforms_to": "https://www.w3.org/TR/sparql11-query/#propertypaths", "description": "A string encoding a SPARQL Property Path. The value of the string MUST conform to SPARQL syntax and SHOULD dereference to zero or more valid objects within the current instance document when encoded as RDF.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"sparqlpath\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -612,6 +672,55 @@ "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", @@ -669,6 +778,16 @@ { "name": "subject_type", "definition_uri": "https://w3id.org/sssom/subject_type", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The type of entity that is being mapped.", "examples": [ { @@ -702,9 +821,10 @@ "http://www.w3.org/2002/07/owl#annotatedProperty" ], "slot_uri": "http://www.w3.org/2002/07/owl#annotatedProperty", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -726,9 +846,10 @@ "https://github.com/mapping-commons/sssom/issues/107" ], "slot_uri": "https://w3id.org/sssom/predicate_modifier", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "predicate_modifier_enum", "@type": "SlotDefinition" @@ -801,9 +922,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/predicate_label", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -844,9 +966,10 @@ "http://www.w3.org/2002/07/owl#annotatedTarget" ], "slot_uri": "http://www.w3.org/2002/07/owl#annotatedTarget", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -864,9 +987,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_label", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "recommended": true, @@ -899,9 +1023,10 @@ "https://github.com/mapping-commons/sssom/issues/256" ], "slot_uri": "https://w3id.org/sssom/object_category", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -922,9 +1047,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_justification", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -972,6 +1098,16 @@ { "name": "object_type", "definition_uri": "https://w3id.org/sssom/object_type", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The type of entity that is being mapped.", "examples": [ { @@ -981,10 +1117,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_type", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "entity_type_enum", "@type": "SlotDefinition" @@ -1106,10 +1243,11 @@ ], "slot_uri": "http://purl.org/dc/terms/creator", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1121,10 +1259,11 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/creator_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1139,9 +1278,10 @@ ], "slot_uri": "http://purl.org/pav/authoredBy", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1153,9 +1293,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/author_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1167,9 +1308,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_id", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1181,9 +1323,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1197,10 +1340,11 @@ "http://purl.org/dc/terms/license" ], "slot_uri": "http://purl.org/dc/terms/license", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1208,6 +1352,16 @@ { "name": "subject_source", "definition_uri": "https://w3id.org/sssom/subject_source", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "URI of vocabulary or identifier source for the subject.", "examples": [ { @@ -1234,6 +1388,16 @@ { "name": "subject_source_version", "definition_uri": "https://w3id.org/sssom/subject_source_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version IRI or version string of the source of the subject term.", "examples": [ { @@ -1252,9 +1416,64 @@ "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", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "URI of vocabulary or identifier source for the object.", "examples": [ { @@ -1270,10 +1489,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1281,6 +1501,16 @@ { "name": "object_source_version", "definition_uri": "https://w3id.org/sssom/object_source_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version IRI or version string of the source of the object term.", "examples": [ { @@ -1291,10 +1521,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source_version", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1302,13 +1533,24 @@ { "name": "mapping_provider", "definition_uri": "https://w3id.org/sssom/mapping_provider", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "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": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1349,9 +1591,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_source", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1362,9 +1605,10 @@ "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": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "mapping_cardinality_enum", "@type": "SlotDefinition" @@ -1372,6 +1616,16 @@ { "name": "mapping_tool", "definition_uri": "https://w3id.org/sssom/mapping_tool", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "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.", "examples": [ { @@ -1381,10 +1635,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1392,6 +1647,16 @@ { "name": "mapping_tool_version", "definition_uri": "https://w3id.org/sssom/mapping_tool_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version string that denotes the version of the mapping tool used.", "examples": [ { @@ -1401,10 +1666,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool_version", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1412,16 +1678,27 @@ { "name": "mapping_date", "definition_uri": "https://w3id.org/sssom/mapping_date", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file.", "from_schema": "https://w3id.org/sssom/schema/", "mappings": [ "http://purl.org/pav/authoredOn" ], "slot_uri": "http://purl.org/pav/authoredOn", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "date", "@type": "SlotDefinition" @@ -1449,16 +1726,29 @@ "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": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, "@type": "SlotDefinition" }, { "name": "subject_match_field", "definition_uri": "https://w3id.org/sssom/subject_match_field", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "A list of properties (term annotations on the subject) that was used for the match.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/subject_match_field", @@ -1474,14 +1764,25 @@ { "name": "object_match_field", "definition_uri": "https://w3id.org/sssom/object_match_field", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "A list of properties (term annotations on the object) that was used for the match.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_match_field", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1489,13 +1790,14 @@ { "name": "match_string", "definition_uri": "https://w3id.org/sssom/match_string", - "description": "Strings that are shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots.", + "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.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/match_string", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1503,6 +1805,16 @@ { "name": "subject_preprocessing", "definition_uri": "https://w3id.org/sssom/subject_preprocessing", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "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.", "examples": [ { @@ -1528,6 +1840,16 @@ { "name": "object_preprocessing", "definition_uri": "https://w3id.org/sssom/object_preprocessing", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "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.", "examples": [ { @@ -1542,10 +1864,35 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_preprocessing", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "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" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1599,6 +1946,8 @@ "Mapping" ], "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, "@type": "SlotDefinition" }, { @@ -1621,6 +1970,41 @@ "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.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/similarity_score", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, + "@type": "SlotDefinition" + }, + { + "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.", + "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/similarity_measure", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "string", + "@type": "SlotDefinition" + }, { "name": "issue_tracker_item", "definition_uri": "https://w3id.org/sssom/issue_tracker_item", @@ -1682,10 +2066,11 @@ ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#seeAlso", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1696,10 +2081,11 @@ "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": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1713,14 +2099,87 @@ "http://www.w3.org/2000/01/rdf-schema#comment" ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#comment", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" }, + { + "name": "extension_definitions", + "definition_uri": "https://w3id.org/sssom/extension_definitions", + "description": "A list that defines the extension slots used in the mapping set.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/328", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/extension-slots.sssom.tsv" + ], + "slot_uri": "https://w3id.org/sssom/extension_definitions", + "multivalued": true, + "owner": "MappingSet", + "domain_of": [ + "MappingSet" + ], + "range": "ExtensionDefinition", + "inlined": true, + "@type": "SlotDefinition" + }, + { + "name": "extensionDefinition__slot_name", + "description": "The name of the extension slot.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/slot_name", + "alias": "slot_name", + "owner": "ExtensionDefinition", + "domain_of": [ + "ExtensionDefinition" + ], + "range": "ncname", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "extensionDefinition__property", + "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).", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/property", + "alias": "property", + "owner": "ExtensionDefinition", + "domain_of": [ + "ExtensionDefinition" + ], + "range": "uriorcurie", + "@type": "SlotDefinition" + }, + { + "name": "extensionDefinition__type_hint", + "description": "Expected type of the values of the extension slot.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/type_hint", + "alias": "type_hint", + "owner": "ExtensionDefinition", + "domain_of": [ + "ExtensionDefinition" + ], + "range": "uriorcurie", + "@type": "SlotDefinition" + }, + { + "name": "propagatable__propagated", + "description": "Indicates whether a slot can be propagated from a mapping down to individual mappings.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/propagated", + "alias": "propagated", + "owner": "Propagatable", + "domain_of": [ + "Propagatable" + ], + "range": "boolean", + "@type": "SlotDefinition" + }, { "name": "mapping_set_license", "definition_uri": "https://w3id.org/sssom/license", @@ -1778,7 +2237,8 @@ "see_also", "issue_tracker", "other", - "comment" + "comment", + "extension_definitions" ], "slot_usage": {}, "class_uri": "https://w3id.org/sssom/MappingSet", @@ -1842,6 +2302,60 @@ "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", + "other", + "comment" + ], + "slot_usage": {}, + "class_uri": "http://www.w3.org/2002/07/owl#Axiom", + "@type": "ClassDefinition" + }, { "name": "MappingRegistry", "definition_uri": "https://w3id.org/sssom/MappingRegistry", @@ -1877,13 +2391,74 @@ "slot_usage": {}, "class_uri": "https://w3id.org/sssom/MappingSetReference", "@type": "ClassDefinition" + }, + { + "name": "ExtensionDefinition", + "definition_uri": "https://w3id.org/sssom/ExtensionDefinition", + "description": "A definition of an extension (non-standard) slot.", + "from_schema": "https://w3id.org/sssom/schema/", + "slots": [ + "extensionDefinition__slot_name", + "extensionDefinition__property", + "extensionDefinition__type_hint" + ], + "slot_usage": {}, + "attributes": [ + { + "name": "slot_name", + "description": "The name of the extension slot.", + "range": "ncname", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "property", + "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).", + "range": "uriorcurie", + "@type": "SlotDefinition" + }, + { + "name": "type_hint", + "description": "Expected type of the values of the extension slot.", + "range": "uriorcurie", + "@type": "SlotDefinition" + } + ], + "class_uri": "https://w3id.org/sssom/ExtensionDefinition", + "@type": "ClassDefinition" + }, + { + "name": "Propagatable", + "definition_uri": "https://w3id.org/sssom/Propagatable", + "description": "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/305" + ], + "mappings": [ + "sssom:Propagatable" + ], + "slots": [ + "propagatable__propagated" + ], + "slot_usage": {}, + "attributes": [ + { + "name": "propagated", + "description": "Indicates whether a slot can be propagated from a mapping down to individual mappings.", + "range": "boolean", + "@type": "SlotDefinition" + } + ], + "class_uri": "https://w3id.org/sssom/Propagatable", + "@type": "ClassDefinition" } ], "metamodel_version": "1.7.0", "source_file": "sssom_schema.yaml", - "source_file_date": "2023-07-31T17:42:04", - "source_file_size": 26565, - "generation_date": "2023-07-31T17:42:55", + "source_file_date": "2024-08-04T07:56:31", + "source_file_size": 32305, + "generation_date": "2024-08-05T10:18:22", "@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 a278a7b8..18658521 100644 --- a/project/jsonschema/sssom_schema.schema.json +++ b/project/jsonschema/sssom_schema.schema.json @@ -1,525 +1,828 @@ { - "$defs": { - "EntityTypeEnum": { - "description": "", - "enum": [ - "owl class", - "owl object property", - "owl data property", - "owl annotation property", - "owl named individual", - "skos concept", - "rdfs resource", - "rdfs class", - "rdfs literal", - "rdfs datatype", - "rdf property" - ], - "title": "EntityTypeEnum", - "type": "string" - }, - "Mapping": { - "additionalProperties": false, - "description": "Represents an individual mapping between a pair of entities", - "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.", - "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" - }, - "curation_rule": { - "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.", - "items": { - "type": "string" - }, - "type": "array" - }, - "curation_rule_text": { - "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.", - "items": { - "type": "string" - }, - "type": "array" - }, - "issue_tracker_item": { - "description": "The issue tracker item discussing this mapping.", - "type": "string" - }, - "license": { - "description": "A url to the license of the mapping. In absence of a license we assume no license.", - "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": { - "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": "Strings that are 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" - }, - "publication_date": { - "description": "The date the mapping was published. This is different from the date the mapping was asserted.", - "format": "date", - "type": "string" - }, - "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" - }, - "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.", - "type": "string" - }, - "semantic_similarity_score": { - "description": "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence.", - "type": "number" - }, - "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.", - "type": "string" - }, - "subject_id": { - "description": "The ID of the subject of the mapping.", - "type": "string" - }, - "subject_label": { - "description": "The label of subject of the mapping", - "type": "string" - }, - "subject_match_field": { - "description": "A list of properties (term annotations on the subject) that was used for the match.", - "items": { - "type": "string" - }, - "type": "array" - }, - "subject_preprocessing": { - "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.", - "items": { - "type": "string" - }, - "type": "array" - }, - "subject_source": { - "description": "URI of vocabulary or identifier source for the subject.", - "type": "string" - }, - "subject_source_version": { - "description": "Version IRI or version string of the source of the subject term.", - "type": "string" - }, - "subject_type": { - "$ref": "#/$defs/EntityTypeEnum", - "description": "The type of entity that is being mapped." - } - }, - "required": [ - "subject_id", - "predicate_id", - "object_id", - "mapping_justification" - ], - "title": "Mapping", - "type": "object" - }, - "MappingCardinalityEnum": { - "description": "", - "enum": [ - "1:1", - "1:n", - "n:1", - "1:0", - "0:1", - "n:n" - ], - "title": "MappingCardinalityEnum", - "type": "string" - }, - "MappingRegistry": { - "additionalProperties": false, - "description": "A registry for managing mapping sets. It holds a set of mapping set references, and can import other registries.", - "properties": { - "documentation": { - "description": "A URL to the documentation of this mapping commons.", - "type": "string" - }, - "homepage": { - "description": "A URL to a homepage of this mapping commons.", - "type": "string" - }, - "imports": { - "description": "A list of registries that should be imported into this one.", - "items": { - "type": "string" - }, - "type": "array" - }, - "issue_tracker": { - "description": "A URL location of the issue tracker for this entity.", - "type": "string" - }, - "mapping_registry_description": { - "description": "The description of a mapping registry.", - "type": "string" - }, - "mapping_registry_id": { - "description": "The unique identifier of a mapping registry.", - "type": "string" - }, - "mapping_registry_title": { - "description": "The title of a mapping registry.", - "type": "string" - }, - "mapping_set_references": { - "description": "A list of mapping set references.", - "items": { - "$ref": "#/$defs/MappingSetReference" - }, - "type": "array" - } - }, - "required": [ - "mapping_registry_id" - ], - "title": "MappingRegistry", - "type": "object" - }, - "MappingSet": { - "additionalProperties": false, - "description": "Represents a set of mappings", - "properties": { - "comment": { - "description": "Free text field containing either curator notes or text generated by tool providing additional informative information.", - "type": "string" - }, - "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" - }, - "issue_tracker": { - "description": "A URL location of the issue tracker for this entity.", - "type": "string" - }, - "license": { - "description": "A url to the license of the mapping. In absence of a license we assume no license.", - "type": "string" - }, - "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_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_set_description": { - "description": "A description of the mapping set.", - "type": "string" - }, - "mapping_set_id": { - "description": "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable.", - "type": "string" - }, - "mapping_set_source": { - "description": "A mapping set or set of mapping set that was used to derive the mapping set.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mapping_set_title": { - "description": "The display name of a mapping set.", - "type": "string" - }, - "mapping_set_version": { - "description": "A version string for the mapping.", - "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" - }, - "mappings": { - "description": "Contains a list of mapping objects", - "items": { - "$ref": "#/$defs/Mapping" - }, - "type": "array" - }, - "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" - }, - "publication_date": { - "description": "The date the mapping was published. This is different from the date the mapping was asserted.", - "format": "date", - "type": "string" - }, - "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" - }, - "subject_match_field": { - "description": "A list of properties (term annotations on the subject) that was used for the match.", - "items": { - "type": "string" - }, - "type": "array" - }, - "subject_preprocessing": { - "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.", - "items": { - "type": "string" - }, - "type": "array" - }, - "subject_source": { - "description": "URI of vocabulary or identifier source for the subject.", - "type": "string" - }, - "subject_source_version": { - "description": "Version IRI or version string of the source of the subject term.", - "type": "string" - }, - "subject_type": { - "$ref": "#/$defs/EntityTypeEnum", - "description": "The type of entity that is being mapped." - } - }, - "required": [ - "mapping_set_id", - "license" - ], - "title": "MappingSet", - "type": "object" - }, - "MappingSetReference": { - "additionalProperties": false, - "description": "A reference to a mapping set. It allows to augment mapping set metadata from the perspective of the registry, for example, providing confidence, or a local filename or a grouping.", - "properties": { - "last_updated": { - "description": "The date this reference was last updated.", - "format": "date", - "type": "string" - }, - "local_name": { - "description": "The local name assigned to file that corresponds to the downloaded mapping set.", - "type": "string" - }, - "mapping_set_group": { - "description": "Set by the owners of the mapping registry. A way to group .", - "type": "string" - }, - "mapping_set_id": { - "description": "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable.", - "type": "string" - }, - "mirror_from": { - "description": "A URL location from which to obtain a resource, such as a mapping set.", - "type": "string" - }, - "registry_confidence": { - "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.", - "type": "number" - } - }, - "required": [ - "mapping_set_id" - ], - "title": "MappingSetReference", - "type": "object" - }, - "PredicateModifierEnum": { - "description": "", - "enum": [ - "Not" - ], - "title": "PredicateModifierEnum", - "type": "string" - } - }, - "$id": "https://w3id.org/sssom/schema/", - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": true, - "metamodel_version": "1.7.0", - "properties": {}, - "required": [], - "title": "sssom", - "type": "object", - "version": null -} + "$defs": { + "EntityTypeEnum": { + "description": "", + "enum": [ + "owl class", + "owl object property", + "owl data property", + "owl annotation property", + "owl named individual", + "skos concept", + "rdfs resource", + "rdfs class", + "rdfs literal", + "rdfs datatype", + "rdf property" + ], + "title": "EntityTypeEnum", + "type": "string" + }, + "ExtensionDefinition": { + "additionalProperties": false, + "description": "A definition of an extension (non-standard) slot.", + "properties": { + "property": { + "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).", + "type": "string" + }, + "slot_name": { + "description": "The name of the extension slot.", + "type": "string" + }, + "type_hint": { + "description": "Expected type of the values of the extension slot.", + "type": "string" + } + }, + "required": [ + "slot_name" + ], + "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", + "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" + }, + "curation_rule": { + "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.", + "items": { + "type": "string" + }, + "type": "array" + }, + "curation_rule_text": { + "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.", + "items": { + "type": "string" + }, + "type": "array" + }, + "issue_tracker_item": { + "description": "The issue tracker item discussing this mapping.", + "type": "string" + }, + "license": { + "description": "A url to the license of the mapping. In absence of a license we assume no license.", + "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" + }, + "publication_date": { + "description": "The date the mapping was published. This is different from the date the mapping was asserted.", + "format": "date", + "type": "string" + }, + "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" + }, + "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.", + "type": "string" + }, + "semantic_similarity_score": { + "description": "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence.", + "maximum": 1.0, + "minimum": 0.0, + "type": "number" + }, + "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.", + "type": "string" + }, + "subject_id": { + "description": "The ID of the subject of the mapping.", + "type": "string" + }, + "subject_label": { + "description": "The label of subject of the mapping", + "type": "string" + }, + "subject_match_field": { + "description": "A list of properties (term annotations on the subject) that was used for the match.", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_preprocessing": { + "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.", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_source": { + "description": "URI of vocabulary or identifier source for the subject.", + "type": "string" + }, + "subject_source_version": { + "description": "Version IRI or version string of the source of the subject term.", + "type": "string" + }, + "subject_type": { + "$ref": "#/$defs/EntityTypeEnum", + "description": "The type of entity that is being mapped." + } + }, + "required": [ + "subject_id", + "predicate_id", + "object_id", + "mapping_justification" + ], + "title": "Mapping", + "type": "object" + }, + "MappingCardinalityEnum": { + "description": "", + "enum": [ + "1:1", + "1:n", + "n:1", + "1:0", + "0:1", + "n:n" + ], + "title": "MappingCardinalityEnum", + "type": "string" + }, + "MappingRegistry": { + "additionalProperties": false, + "description": "A registry for managing mapping sets. It holds a set of mapping set references, and can import other registries.", + "properties": { + "documentation": { + "description": "A URL to the documentation of this mapping commons.", + "type": "string" + }, + "homepage": { + "description": "A URL to a homepage of this mapping commons.", + "type": "string" + }, + "imports": { + "description": "A list of registries that should be imported into this one.", + "items": { + "type": "string" + }, + "type": "array" + }, + "issue_tracker": { + "description": "A URL location of the issue tracker for this entity.", + "type": "string" + }, + "mapping_registry_description": { + "description": "The description of a mapping registry.", + "type": "string" + }, + "mapping_registry_id": { + "description": "The unique identifier of a mapping registry.", + "type": "string" + }, + "mapping_registry_title": { + "description": "The title of a mapping registry.", + "type": "string" + }, + "mapping_set_references": { + "description": "A list of mapping set references.", + "items": { + "$ref": "#/$defs/MappingSetReference" + }, + "type": "array" + } + }, + "required": [ + "mapping_registry_id" + ], + "title": "MappingRegistry", + "type": "object" + }, + "MappingSet": { + "additionalProperties": false, + "description": "Represents a set of mappings", + "properties": { + "comment": { + "description": "Free text field containing either curator notes or text generated by tool providing additional informative information.", + "type": "string" + }, + "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" + }, + "extension_definitions": { + "description": "A list that defines the extension slots used in the mapping set.", + "items": { + "$ref": "#/$defs/ExtensionDefinition" + }, + "type": "array" + }, + "issue_tracker": { + "description": "A URL location of the issue tracker for this entity.", + "type": "string" + }, + "license": { + "description": "A url to the license of the mapping. In absence of a license we assume no license.", + "type": "string" + }, + "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_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_set_description": { + "description": "A description of the mapping set.", + "type": "string" + }, + "mapping_set_id": { + "description": "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable.", + "type": "string" + }, + "mapping_set_source": { + "description": "A mapping set or set of mapping set that was used to derive the mapping set.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mapping_set_title": { + "description": "The display name of a mapping set.", + "type": "string" + }, + "mapping_set_version": { + "description": "A version string for the mapping.", + "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" + }, + "mappings": { + "description": "Contains a list of mapping objects", + "items": { + "$ref": "#/$defs/Mapping" + }, + "type": "array" + }, + "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" + }, + "publication_date": { + "description": "The date the mapping was published. This is different from the date the mapping was asserted.", + "format": "date", + "type": "string" + }, + "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" + }, + "subject_match_field": { + "description": "A list of properties (term annotations on the subject) that was used for the match.", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_preprocessing": { + "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.", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_source": { + "description": "URI of vocabulary or identifier source for the subject.", + "type": "string" + }, + "subject_source_version": { + "description": "Version IRI or version string of the source of the subject term.", + "type": "string" + }, + "subject_type": { + "$ref": "#/$defs/EntityTypeEnum", + "description": "The type of entity that is being mapped." + } + }, + "required": [ + "mapping_set_id", + "license" + ], + "title": "MappingSet", + "type": "object" + }, + "MappingSetReference": { + "additionalProperties": false, + "description": "A reference to a mapping set. It allows to augment mapping set metadata from the perspective of the registry, for example, providing confidence, or a local filename or a grouping.", + "properties": { + "last_updated": { + "description": "The date this reference was last updated.", + "format": "date", + "type": "string" + }, + "local_name": { + "description": "The local name assigned to file that corresponds to the downloaded mapping set.", + "type": "string" + }, + "mapping_set_group": { + "description": "Set by the owners of the mapping registry. A way to group .", + "type": "string" + }, + "mapping_set_id": { + "description": "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable.", + "type": "string" + }, + "mirror_from": { + "description": "A URL location from which to obtain a resource, such as a mapping set.", + "type": "string" + }, + "registry_confidence": { + "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.", + "type": "number" + } + }, + "required": [ + "mapping_set_id" + ], + "title": "MappingSetReference", + "type": "object" + }, + "PredicateModifierEnum": { + "description": "", + "enum": [ + "Not" + ], + "title": "PredicateModifierEnum", + "type": "string" + }, + "Propagatable": { + "additionalProperties": false, + "description": "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class.", + "properties": { + "propagated": { + "description": "Indicates whether a slot can be propagated from a mapping down to individual mappings.", + "type": "boolean" + } + }, + "title": "Propagatable", + "type": "object" + } + }, + "$id": "https://w3id.org/sssom/schema/", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "additionalProperties": true, + "metamodel_version": "1.7.0", + "title": "sssom", + "type": "object", + "version": null +} \ No newline at end of file diff --git a/project/prefixmap/sssom_schema.yaml b/project/prefixmap/sssom_schema.yaml index f886e67d..52f4e269 100644 --- a/project/prefixmap/sssom_schema.yaml +++ b/project/prefixmap/sssom_schema.yaml @@ -10,6 +10,10 @@ "semapv": "https://w3id.org/semapv/vocab/", "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 334b2c66..0416f611 100644 --- a/project/protobuf/sssom_schema.proto +++ b/project/protobuf/sssom_schema.proto @@ -1,3 +1,51 @@ +// A definition of an extension (non-standard) slot. +message ExtensionDefinition + { + ncname slotName = 0 + 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 { @@ -89,6 +137,7 @@ message MappingSet uri issueTracker = 0 string other = 0 string comment = 0 + repeated extensionDefinition extensionDefinitions = 0 } // A reference to a mapping set. It allows to augment mapping set metadata from the perspective of the registry, for example, providing confidence, or a local filename or a grouping. message MappingSetReference @@ -100,3 +149,8 @@ message MappingSetReference date lastUpdated = 0 string localName = 0 } +// Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class. +message Propagatable + { + boolean propagated = 0 + } diff --git a/project/shacl/sssom_schema.shacl.ttl b/project/shacl/sssom_schema.shacl.ttl index 13a29f40..33edeecb 100644 --- a/project/shacl/sssom_schema.shacl.ttl +++ b/project/shacl/sssom_schema.shacl.ttl @@ -13,128 +13,165 @@ 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:description "A URL location of the issue tracker for this entity." ; - sh:maxCount 1 ; - sh:order 7 ; - sh:path sssom:issue_tracker ], - [ sh:description "The description of a mapping registry." ; + sh:property [ sh:datatype xsd:string ; + sh:description "The description of a mapping registry." ; sh:maxCount 1 ; sh:order 2 ; sh:path sssom:mapping_registry_description ], + [ sh:datatype xsd:string ; + sh:description "The title of a mapping registry." ; + sh:maxCount 1 ; + sh:order 1 ; + sh:path sssom:mapping_registry_title ], + [ sh:datatype xsd:anyURI ; + sh:description "A URL to a homepage of this mapping commons." ; + sh:maxCount 1 ; + sh:order 6 ; + sh:path sssom:homepage ], [ sh:description "The unique identifier of a mapping registry." ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 0 ; sh:path sssom:mapping_registry_id ], - [ sh:description "The title of a mapping registry." ; - sh:maxCount 1 ; - sh:order 1 ; - sh:path sssom:mapping_registry_title ], - [ sh:description "A URL to the documentation of this mapping commons." ; + [ 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:description "A list of registries that should be imported into this one." ; + [ 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: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:BlankNode ; + sh:nodeKind sh:BlankNodeOrIRI ; sh:order 4 ; - sh:path sssom:mapping_set_references ], - [ sh:description "A URL to a homepage of this mapping commons." ; - sh:maxCount 1 ; - sh:order 6 ; - sh:path sssom:homepage ] ; + sh:path sssom:mapping_set_references ] ; 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:class owl:Axiom ; + 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: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: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: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: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:nodeKind sh:BlankNode ; + sh:nodeKind sh:BlankNodeOrIRI ; sh:order 0 ; sh:path sssom:mappings ], - [ sh:description "Version IRI or version string of the source of the subject term." ; + [ sh:description "A list of properties (term annotations on the subject) that was used for the match." ; + sh:order 20 ; + sh:path sssom:subject_match_field ], + [ sh:datatype xsd:string ; + sh:description "The display name of a mapping set." ; + sh:maxCount 1 ; + sh:order 4 ; + sh:path dcterms:title ], + [ sh:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the subject term." ; sh:maxCount 1 ; sh:order 11 ; sh:path sssom:subject_source_version ], - [ 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 1 ; - sh:path sssom:mapping_set_id ], - [ 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:path dcterms:license ], - [ sh:description "The date the mapping was published. This is different from the date the mapping was asserted." ; - sh:maxCount 1 ; - sh:order 19 ; - sh:path dcterms:created ], - [ 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: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:path rdfs:seeAlso ], + [ 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 16 ; sh:path sssom:mapping_tool ], - [ 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:description "A description of the mapping set." ; + [ sh:datatype xsd:anyURI ; + sh:description "A URL location of the issue tracker for this entity." ; sh:maxCount 1 ; - sh:order 5 ; - sh:path dcterms:description ], - [ 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:path rdfs:seeAlso ], - [ sh:description "A list of properties (term annotations on the subject) that was used for the match." ; - sh:order 20 ; - sh:path sssom:subject_match_field ], - [ 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: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: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 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:description "Version string that denotes the version of the mapping tool used." ; + sh:order 25 ; + sh:path sssom:issue_tracker ], + [ sh:datatype xsd:string ; + sh:description "Version string that denotes the version of the mapping tool used." ; sh:maxCount 1 ; sh:order 17 ; sh:path sssom:mapping_tool_version ], - [ 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 15 ; - sh:path sssom:mapping_provider ], [ sh:description "URI of vocabulary or identifier source for the object." ; sh:maxCount 1 ; sh:order 13 ; sh:path sssom:object_source ], - [ sh:description "A version string for the mapping." ; + [ 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:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the object term." ; sh:maxCount 1 ; - sh:order 2 ; - sh:path owl:versionInfo ], - [ sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; + 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:maxCount 1 ; - sh:order 27 ; - sh:path rdfs:comment ], - [ sh:description "A URL location of the issue tracker for this entity." ; + 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: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:order 25 ; - sh:path sssom:issue_tracker ], - [ 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: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:maxCount 1 ; - sh:order 12 ; - sh:path sssom:object_type ], - [ 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: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:maxCount 1 ; + sh:order 19 ; + sh:path dcterms:created ], + [ 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: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 ], @@ -143,231 +180,461 @@ sssom:MappingSet a sh:NodeShape ; sh:maxCount 1 ; sh:order 9 ; sh:path sssom:subject_type ], - [ sh:description "The display name of a mapping set." ; - sh:maxCount 1 ; - sh:order 4 ; - sh:path dcterms:title ], - [ 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:datatype xsd:string ; + sh:description "A description of the mapping set." ; sh:maxCount 1 ; - sh:order 18 ; - sh:path pav:authoredOn ], - [ sh:description "URI of vocabulary or identifier source for the subject." ; + sh:order 5 ; + sh:path dcterms:description ], + [ sh:datatype xsd:string ; + sh:description "A version string for the mapping." ; sh:maxCount 1 ; - sh:order 10 ; - sh:path sssom:subject_source ], - [ 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 "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:order 2 ; + sh:path owl:versionInfo ] ; sh:targetClass sssom:MappingSet . -owl:Axiom a sh:NodeShape ; +sssom:Propagatable a sh:NodeShape ; sh:closed true ; - sh:description "Represents an individual mapping between a pair of entities" ; + sh:description "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "URI of vocabulary or identifier source for the subject." ; + sh:property [ sh:datatype xsd:boolean ; + sh:description "Indicates whether a slot can be propagated from a mapping down to individual mappings." ; sh:maxCount 1 ; - sh:order 18 ; - sh:path sssom:subject_source ], - [ sh:description "Version string that denotes the version of the mapping tool used." ; + sh:order 0 ; + sh:path sssom:propagated ] ; + sh:targetClass sssom:Propagatable . + +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 "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: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:description "The ID of the subject of the mapping." ; + [ sh:datatype xsd:string ; + sh:description "The literal being mapped" ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 0 ; - sh:path owl:annotatedSource ], - [ 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 "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; + 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 42 ; - sh:path sssom:other ], - [ sh:description "The label of the predicate/relation of the mapping" ; + 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:maxCount 1 ; + sh:order 23 ; + sh:path sssom:mapping_provider ], + [ sh:datatype xsd:string ; + sh:description "The label of object of the mapping" ; + sh:maxCount 1 ; + sh:order 6 ; + 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: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:maxCount 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: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 "A url to the license of the mapping. In absence of a license we assume no license." ; + [ 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 dcterms:license ], - [ 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: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: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 20 ; - sh:path sssom:object_type ], - [ 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:order 2 ; + sh:path sssom:subject_category ], + [ sh:description "URI of vocabulary or identifier source for the subject." ; sh:maxCount 1 ; - sh:order 17 ; - sh:path sssom:subject_type ], - [ sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; + sh:order 18 ; + sh:path sssom:subject_source ], + [ sh:description "The ID of the object of the mapping." ; sh:maxCount 1 ; - sh:order 43 ; - sh:path rdfs:comment ], + 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:description "Version IRI or version string of the source of the subject term." ; + [ 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:subject_source_version ], - [ 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: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: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 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 "The issue tracker item discussing this mapping." ; - sh:maxCount 1 ; - sh:order 41 ; - sh:path sssom:issue_tracker_item ], - [ 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: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 8 ; - sh:path sssom:object_category ], - [ sh:description "The label of object of the mapping" ; + 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 7 ; - sh:path sssom:object_label ], - [ 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: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 "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: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:description "A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable." ; + [ 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 sssom:mapping_justification ; - sh:pattern "^semapv:(MappingReview|ManualMappingCuration|LogicalReasoning|LexicalMatching|CompositeMatching|UnspecifiedMatching|SemanticSimilarityThresholdMatching|LexicalSimilarityThresholdMatching|MappingChaining)$" ], + 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:maxCount 1 ; + sh:order 20 ; + sh:path sssom:object_type ], + [ 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:maxCount 1 ; + sh:order 33 ; + sh:path sssom:similarity_measure ], + [ 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: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:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the object 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:maxCount 1 ; sh:minCount 1 ; - sh:order 3 ; + sh:order 2 ; sh:path owl:annotatedProperty ], - [ sh:description "The label of subject of the mapping" ; + [ 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:maxCount 1 ; sh:order 1 ; - sh:path sssom:subject_label ], - [ 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 "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:path rdf:datatype ], + [ 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: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:maxCount 1 ; + sh:maxInclusive 1e+00 ; + sh:minInclusive 0e+00 ; + sh:order 30 ; + sh:path sssom:confidence ], + [ 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: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 "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 "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 "The issue tracker item discussing this mapping." ; sh:maxCount 1 ; - sh:order 26 ; - sh:path sssom:mapping_tool ], + 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: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: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: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 "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:description "Strings that are shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots." ; + [ 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: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 "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: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 2 ; - sh:path sssom:subject_category ], - [ sh:description "URI of vocabulary or identifier source for the object." ; + 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:maxCount 1 ; - sh:order 21 ; - sh:path sssom:object_source ], + 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:maxCount 1 ; + sh:order 8 ; + sh:path sssom:object_category ], + [ sh:datatype xsd:double ; + sh:description "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence." ; + 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: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 "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence." ; + [ 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: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 38 ; - sh:path sssom:semantic_similarity_score ], - [ 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 24 ; + 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 23 ; - sh:path sssom:mapping_provider ], - [ 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 "Version IRI or version string of the source of the object term." ; + 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:maxCount 1 ; - sh:order 22 ; - sh:path sssom:object_source_version ], - [ 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:order 19 ; + sh:path sssom:subject_source_version ], + [ sh:datatype xsd:string ; + sh:description "The label of subject of the mapping" ; sh:maxCount 1 ; - sh:order 30 ; - sh:path sssom:confidence ] ; + sh:order 1 ; + sh:path sssom:subject_label ] ; 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:maxCount 1 ; + sh:order 1 ; + sh:path sssom:property ], + [ 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:maxCount 1 ; + sh:minCount 1 ; + sh:order 0 ; + sh:path sssom:slot_name ] ; + sh:targetClass sssom:ExtensionDefinition . + sssom:MappingSetReference a sh:NodeShape ; sh:closed true ; sh:description "A reference to a mapping set. It allows to augment mapping set metadata from the perspective of the registry, for example, providing confidence, or a local filename or a grouping." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "The local name assigned to file that corresponds to the downloaded mapping set." ; + sh:property [ 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:order 5 ; - sh:path sssom:local_name ], - [ sh:description "The date this reference was last updated." ; + sh:minCount 1 ; + sh:order 0 ; + sh:path sssom:mapping_set_id ], + [ 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: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:description "A URL location from which to obtain a resource, such as a mapping set." ; + [ sh:datatype xsd:string ; + sh:description "The local name assigned to file that corresponds to the downloaded mapping set." ; sh:maxCount 1 ; - sh:order 1 ; - sh:path sssom:mirror_from ], - [ 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: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:description "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable." ; + [ sh:datatype xsd:string ; + sh:description "Set by the owners of the mapping registry. A way to group ." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 0 ; - sh:path sssom:mapping_set_id ] ; + 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:maxCount 1 ; + sh:order 1 ; + sh:path sssom:mirror_from ] ; sh:targetClass sssom:MappingSetReference . diff --git a/project/shex/sssom_schema.shex b/project/shex/sssom_schema.shex index b2eacce5..12fabf9b 100644 --- a/project/shex/sssom_schema.shex +++ b/project/shex/sssom_schema.shex @@ -1,6 +1,7 @@ BASE -PREFIX owl: PREFIX prov: +PREFIX skos: +PREFIX owl: PREFIX rdf: PREFIX rdfs: PREFIX xsd: @@ -49,13 +50,69 @@ linkml:Jsonpath xsd:string linkml:Sparqlpath xsd:string + CLOSED { + ( $ ( @linkml:Ncname ; + @linkml:Uriorcurie ? ; + @linkml:Uriorcurie ? + ) ; + rdf:type [ ] ? + ) +} + + 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 ? ; @linkml:String ? ; owl:annotatedProperty @ ; @linkml:String ? ; - @ ? ; + [ ] ? ; owl:annotatedTarget @ ; @linkml:String ? ; @linkml:String ? ; @@ -67,15 +124,20 @@ linkml:Sparqlpath xsd:string dc1:creator @ * ; @linkml:String * ; dc1:license @linkml:Uri ? ; - @ ? ; + [ owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept + rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ] ? ; @ ? ; @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 ? ; @@ -123,10 +185,12 @@ linkml:Sparqlpath xsd:string dc1:creator @ * ; @linkml:String * ; dc1:license @linkml:Uri ; - @ ? ; + [ owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept + rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ] ? ; @ ? ; @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 ? ; @@ -141,7 +205,8 @@ linkml:Sparqlpath xsd:string rdfs:seeAlso @linkml:String * ; @linkml:Uri ? ; @linkml:String ? ; - rdfs:comment @linkml:String ? + rdfs:comment @linkml:String ? ; + @ * ) ; rdf:type [ ] ? ) @@ -159,4 +224,10 @@ linkml:Sparqlpath xsd:string ) } + CLOSED { + ( $ @linkml:Boolean ? ; + rdf:type [ ] ? + ) +} + diff --git a/project/sqlschema/sssom_schema.sql b/project/sqlschema/sssom_schema.sql index f05799c9..b69eaa2d 100644 --- a/project/sqlschema/sssom_schema.sql +++ b/project/sqlschema/sssom_schema.sql @@ -1,9 +1,245 @@ +-- # Class: "mapping set" Description: "Represents a set of mappings" +-- * Slot: id Description: +-- * Slot: mapping_set_id Description: A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable. +-- * Slot: mapping_set_version Description: A version string for the mapping. +-- * Slot: mapping_set_title Description: The display name of a mapping set. +-- * Slot: mapping_set_description Description: A description of the mapping set. +-- * Slot: license Description: A url to the license of the mapping. In absence of a license we assume no license. +-- * Slot: subject_type Description: The type of entity that is being mapped. +-- * Slot: subject_source Description: URI of vocabulary or identifier source for the subject. +-- * Slot: subject_source_version Description: Version IRI or version string of the source of the subject term. +-- * 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_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: publication_date Description: The date the mapping was published. This is different from the date the mapping was asserted. +-- * Slot: issue_tracker Description: A URL location of the issue tracker for this entity. +-- * 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" Description: "Represents an individual mapping between a pair of entities" +-- * Slot: id Description: +-- * Slot: subject_id Description: The ID of the subject of the mapping. +-- * Slot: subject_label Description: The label of subject of the mapping +-- * 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: 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: subject_type Description: The type of entity that is being mapped. +-- * Slot: subject_source Description: URI of vocabulary or identifier source for the subject. +-- * Slot: subject_source_version Description: Version IRI or version string of the source of the subject term. +-- * 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: 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: 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. +-- * Slot: mapping_registry_title Description: The title of a mapping registry. +-- * Slot: mapping_registry_description Description: The description of a mapping registry. +-- * Slot: documentation Description: A URL to the documentation of this mapping commons. +-- * Slot: homepage Description: A URL to a homepage of this mapping commons. +-- * Slot: issue_tracker Description: A URL location of the issue tracker for this entity. +-- # Class: "mapping set reference" Description: "A reference to a mapping set. It allows to augment mapping set metadata from the perspective of the registry, for example, providing confidence, or a local filename or a grouping." +-- * Slot: id Description: +-- * Slot: mapping_set_id Description: A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable. +-- * Slot: mirror_from Description: A URL location from which to obtain a resource, such as a mapping set. +-- * Slot: registry_confidence 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. +-- * 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: "extension definition" Description: "A definition of an extension (non-standard) slot." +-- * Slot: id Description: +-- * Slot: slot_name Description: The name of the extension slot. +-- * Slot: property 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). +-- * Slot: type_hint Description: Expected type of the values of the extension slot. +-- # 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: "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. +-- # Class: "mapping set_creator_id" Description: "" +-- * Slot: mapping set_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: "mapping set_creator_label" Description: "" +-- * Slot: mapping set_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: "mapping set_subject_match_field" Description: "" +-- * Slot: mapping set_id Description: Autocreated FK slot +-- * Slot: subject_match_field Description: A list of properties (term annotations on the subject) that was used for the match. +-- # Class: "mapping set_object_match_field" Description: "" +-- * Slot: mapping set_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: "mapping set_subject_preprocessing" Description: "" +-- * Slot: mapping set_id Description: Autocreated FK slot +-- * Slot: subject_preprocessing 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. +-- # Class: "mapping set_object_preprocessing" Description: "" +-- * Slot: mapping set_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: "mapping set_see_also" Description: "" +-- * Slot: mapping set_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 set_extension_definitions" Description: "" +-- * Slot: mapping set_id Description: Autocreated FK slot +-- * Slot: extension_definitions_id Description: A list that defines the extension slots used in the mapping set. +-- # Class: "mapping_author_id" Description: "" +-- * Slot: 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: "mapping_author_label" Description: "" +-- * Slot: 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: "mapping_reviewer_id" Description: "" +-- * Slot: 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: "mapping_reviewer_label" Description: "" +-- * Slot: 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: "mapping_creator_id" Description: "" +-- * Slot: 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: "mapping_creator_label" Description: "" +-- * Slot: 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: "mapping_curation_rule" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: curation_rule 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. +-- # Class: "mapping_curation_rule_text" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: curation_rule_text 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. +-- # Class: "mapping_subject_match_field" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: subject_match_field Description: A list of properties (term annotations on the subject) that was used for the match. +-- # Class: "mapping_object_match_field" Description: "" +-- * Slot: 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: "mapping_match_string" Description: "" +-- * Slot: 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: "mapping_subject_preprocessing" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: subject_preprocessing 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. +-- # Class: "mapping_object_preprocessing" Description: "" +-- * Slot: 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: "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. +-- # Class: "mapping registry_mapping_set_references" Description: "" +-- * Slot: mapping registry_id Description: Autocreated FK slot +-- * Slot: mapping_set_references_id Description: A list of mapping set references. - -CREATE TABLE mapping ( - subject_id TEXT NOT NULL, - subject_label TEXT, - subject_category TEXT, +CREATE TABLE "mapping set" ( + id INTEGER NOT NULL, + mapping_set_id TEXT NOT NULL, + mapping_set_version TEXT, + mapping_set_title TEXT, + mapping_set_description TEXT, + license TEXT NOT NULL, + subject_type VARCHAR(23), + subject_source TEXT, + subject_source_version TEXT, + object_type VARCHAR(23), + object_source TEXT, + object_source_version TEXT, + mapping_provider TEXT, + mapping_tool TEXT, + mapping_tool_version TEXT, + mapping_date DATE, + publication_date DATE, + issue_tracker TEXT, + other TEXT, + 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), @@ -11,16 +247,9 @@ CREATE TABLE mapping ( object_label TEXT, object_category TEXT, mapping_justification TEXT NOT NULL, - author_id TEXT, - author_label TEXT, - reviewer_id TEXT, - reviewer_label TEXT, - creator_id TEXT, - creator_label TEXT, license TEXT, - subject_type VARCHAR(23), - subject_source TEXT, - subject_source_version TEXT, + literal_source TEXT, + literal_source_version TEXT, object_type VARCHAR(23), object_source TEXT, object_source_version TEXT, @@ -30,46 +259,58 @@ CREATE TABLE mapping ( mapping_tool TEXT, mapping_tool_version TEXT, mapping_date DATE, - publication_date DATE, confidence FLOAT, - curation_rule TEXT, - curation_rule_text TEXT, - subject_match_field TEXT, - object_match_field TEXT, - match_string TEXT, - subject_preprocessing TEXT, - object_preprocessing TEXT, - semantic_similarity_score FLOAT, - semantic_similarity_measure TEXT, - see_also TEXT, - issue_tracker_item TEXT, + similarity_score FLOAT, + similarity_measure TEXT, other TEXT, comment TEXT, - PRIMARY KEY (subject_id, subject_label, subject_category, 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, subject_type, subject_source, subject_source_version, object_type, object_source, object_source_version, mapping_provider, mapping_source, mapping_cardinality, mapping_tool, mapping_tool_version, mapping_date, publication_date, confidence, curation_rule, curation_rule_text, subject_match_field, object_match_field, match_string, subject_preprocessing, object_preprocessing, semantic_similarity_score, semantic_similarity_measure, see_also, issue_tracker_item, other, comment) + PRIMARY KEY (id) ); - -CREATE TABLE mapping_registry ( +CREATE TABLE "mapping registry" ( + id INTEGER NOT NULL, mapping_registry_id TEXT NOT NULL, mapping_registry_title TEXT, mapping_registry_description TEXT, - imports TEXT, - mapping_set_references TEXT, documentation TEXT, homepage TEXT, issue_tracker TEXT, - PRIMARY KEY (mapping_registry_id, mapping_registry_title, mapping_registry_description, imports, mapping_set_references, documentation, homepage, issue_tracker) + PRIMARY KEY (id) ); - -CREATE TABLE mapping_set ( - mappings TEXT, +CREATE TABLE "mapping set reference" ( + id INTEGER NOT NULL, mapping_set_id TEXT NOT NULL, - mapping_set_version TEXT, - mapping_set_source TEXT, - mapping_set_title TEXT, - mapping_set_description TEXT, - creator_id TEXT, - creator_label TEXT, - license TEXT NOT NULL, + mirror_from TEXT, + registry_confidence FLOAT, + mapping_set_group TEXT, + last_updated DATE, + local_name TEXT, + PRIMARY KEY (id) +); +CREATE TABLE "extension definition" ( + id INTEGER NOT NULL, + slot_name TEXT NOT NULL, + property TEXT, + type_hint TEXT, + PRIMARY KEY (id) +); +CREATE TABLE "Propagatable" ( + id INTEGER NOT NULL, + propagated BOOLEAN, + PRIMARY KEY (id) +); +CREATE TABLE mapping ( + id INTEGER NOT NULL, + subject_id TEXT NOT NULL, + subject_label TEXT, + subject_category 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, subject_type VARCHAR(23), subject_source TEXT, subject_source_version TEXT, @@ -77,27 +318,237 @@ CREATE TABLE mapping_set ( 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, publication_date DATE, + confidence FLOAT, + semantic_similarity_score FLOAT, + semantic_similarity_measure TEXT, + issue_tracker_item TEXT, + other TEXT, + comment TEXT, + "mapping set_id" INTEGER, + PRIMARY KEY (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, + PRIMARY KEY ("mapping set_id", mapping_set_source), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_creator_id" ( + "mapping set_id" INTEGER, + creator_id TEXT, + PRIMARY KEY ("mapping set_id", creator_id), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_creator_label" ( + "mapping set_id" INTEGER, + creator_label TEXT, + PRIMARY KEY ("mapping set_id", creator_label), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_subject_match_field" ( + "mapping set_id" INTEGER, subject_match_field TEXT, + PRIMARY KEY ("mapping set_id", subject_match_field), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_object_match_field" ( + "mapping set_id" INTEGER, object_match_field TEXT, + PRIMARY KEY ("mapping set_id", object_match_field), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_subject_preprocessing" ( + "mapping set_id" INTEGER, subject_preprocessing TEXT, + PRIMARY KEY ("mapping set_id", subject_preprocessing), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_object_preprocessing" ( + "mapping set_id" INTEGER, object_preprocessing TEXT, + PRIMARY KEY ("mapping set_id", object_preprocessing), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_see_also" ( + "mapping set_id" INTEGER, see_also TEXT, - issue_tracker TEXT, - other TEXT, - comment TEXT, - PRIMARY KEY (mappings, mapping_set_id, mapping_set_version, mapping_set_source, mapping_set_title, mapping_set_description, creator_id, creator_label, license, subject_type, subject_source, subject_source_version, object_type, object_source, object_source_version, mapping_provider, mapping_tool, mapping_tool_version, mapping_date, publication_date, subject_match_field, object_match_field, subject_preprocessing, object_preprocessing, see_also, issue_tracker, other, comment) + PRIMARY KEY ("mapping set_id", see_also), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) ); - -CREATE TABLE mapping_set_reference ( - mapping_set_id TEXT NOT NULL, - mirror_from TEXT, - registry_confidence FLOAT, - mapping_set_group TEXT, - last_updated DATE, - local_name TEXT, - PRIMARY KEY (mapping_set_id, mirror_from, registry_confidence, mapping_set_group, last_updated, local_name) +CREATE TABLE "mapping set_extension_definitions" ( + "mapping set_id" INTEGER, + extension_definitions_id INTEGER, + PRIMARY KEY ("mapping set_id", extension_definitions_id), + 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, + PRIMARY KEY ("mapping registry_id", imports), + FOREIGN KEY("mapping registry_id") REFERENCES "mapping registry" (id) +); +CREATE TABLE "mapping registry_mapping_set_references" ( + "mapping registry_id" INTEGER, + mapping_set_references_id INTEGER, + PRIMARY KEY ("mapping registry_id", mapping_set_references_id), + FOREIGN KEY("mapping registry_id") REFERENCES "mapping registry" (id), + FOREIGN KEY(mapping_set_references_id) REFERENCES "mapping set reference" (id) +); +CREATE TABLE mapping_author_id ( + mapping_id INTEGER, + author_id TEXT, + PRIMARY KEY (mapping_id, author_id), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_author_label ( + mapping_id INTEGER, + author_label TEXT, + PRIMARY KEY (mapping_id, author_label), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_reviewer_id ( + mapping_id INTEGER, + reviewer_id TEXT, + PRIMARY KEY (mapping_id, reviewer_id), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_reviewer_label ( + mapping_id INTEGER, + reviewer_label TEXT, + PRIMARY KEY (mapping_id, reviewer_label), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_creator_id ( + mapping_id INTEGER, + creator_id TEXT, + PRIMARY KEY (mapping_id, creator_id), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_creator_label ( + mapping_id INTEGER, + creator_label TEXT, + PRIMARY KEY (mapping_id, creator_label), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_curation_rule ( + mapping_id INTEGER, + curation_rule TEXT, + PRIMARY KEY (mapping_id, curation_rule), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_curation_rule_text ( + mapping_id INTEGER, + curation_rule_text TEXT, + PRIMARY KEY (mapping_id, curation_rule_text), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_subject_match_field ( + mapping_id INTEGER, + subject_match_field TEXT, + PRIMARY KEY (mapping_id, subject_match_field), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_object_match_field ( + mapping_id INTEGER, + object_match_field TEXT, + PRIMARY KEY (mapping_id, object_match_field), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_match_string ( + mapping_id INTEGER, + match_string TEXT, + PRIMARY KEY (mapping_id, match_string), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_subject_preprocessing ( + mapping_id INTEGER, + subject_preprocessing TEXT, + PRIMARY KEY (mapping_id, subject_preprocessing), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_object_preprocessing ( + mapping_id INTEGER, + object_preprocessing TEXT, + PRIMARY KEY (mapping_id, object_preprocessing), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_see_also ( + mapping_id INTEGER, + see_also TEXT, + PRIMARY KEY (mapping_id, see_also), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); \ No newline at end of file diff --git a/src/docs/spec-formats-tsv.md b/src/docs/spec-formats-tsv.md index 4ea9853a..c500676f 100644 --- a/src/docs/spec-formats-tsv.md +++ b/src/docs/spec-formats-tsv.md @@ -134,6 +134,28 @@ For any given propagatable slot, condensation is only allowed if (1) all mapping Implementations that support condensation MUST also support propagation. +## Non-standard slots + +If an implementation does not support [non-standard slots](spec-model.md#non-standard-slots), then: + +* a SSSOM/TSV reader MUST discard any unknown top-level YAML key in the metadata block, and any unknown TSV column in the TSV section; +* a SSSOM/TSV writer MUST NOT write any unknown top-level YAML key in the metadata block, or any unknown TSV column in the TSV section. + +### Support for defined extensions + +This section applies to implementations that supports defined extensions. + +A SSSOM/TSV reader MUST check the validity of the extension definitions listed in the `extension_definitions` slot in the YAML metadata block: + +* definitions with no `slot_name`, or with a `slot_name` that is not a XML non-colonized name, MUST be ignored; +* definitions with any unexpected content (e.g. other keys than just `slot_name`, `property`, and `type_hint`) MUST be ignored; +* the `property` and `type_hint` values for a given definition, if present, MUST be CURIEs and MUST be resolvable using the mapping set’s `curie_map`, otherwise the definition MUST be ignored. + +A SSSOM/TSV reader MUST, upon encountering a non-standard YAML key in the metadata block or an unknown TSV column, check that the name of the key or of the column matches the `slot_name` of one of the extension definitions listed in the mapping set’s `extension_definitions` slot. If there is no match, the non-standard slot MUST be discarded. + +Upon encountering a non-standard slot whose corresponding definition has a `type_hint` of `https://w3id.org/linkml/Uriorcurie`, the reader SHOULD check that the value is a CURIE and is resolvable using the mapping set’s `curie_map`. + + ## Compatibility with previous versions of the specification Implementations MUST support the current version of the specification. However, SSSOM/TSV parsers MAY additionally accept to parse files that were compliant to a previous version. This section provides advice for implementations willing to support older versions. @@ -213,6 +235,13 @@ When writing the metadata block, a canonical SSSOM/TSV writer: * 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. +In addition, if [extension slots](spec-model.md#non-standard-slots) are supported, the writer: + +* MUST write any extension slot in the mapping set _after_ the standard slots; +* MUST sort the extension slots lexicographically on the `property` of their corresponding extension definitions; +* MUST sort extension definitions on their `property` value; +* MUST not include an extension definition if the corresponding extension is not used anywhere in the set. + ### Rules for the mappings block @@ -223,6 +252,11 @@ When writing the mappings block, a canonical SSSOM/TSV writer: * MUST write the columns in the order the slots appear in the [“Slots” table](Mapping.md#slots), in the documentation for the `Mapping` class; * MUST sort the mappings in lexicographical order on all their slots, in the order the slots appear in the [“Slots” table](Mapping.md#slots). +In addition, if [extension slots](spec-model.md#non-standard-slots) are supported, the writer: + +* MUST write any non-standard column _after_ the standard columns; +* MUST sort the non-standard column lexicographically on the `property` of their corresponding extension definitions. + ## Examples diff --git a/src/docs/spec-intro.md b/src/docs/spec-intro.md index 1dacae7a..89042e83 100644 --- a/src/docs/spec-intro.md +++ b/src/docs/spec-intro.md @@ -27,3 +27,5 @@ Throughout the specification, the following IRI prefix names are used: | semapv | https://w3id.org/semapv/vocab/ | | skos | http://www.w3.org/2004/02/skos/core# | | sssom | https://w3id.org/sssom/ | +| xsd | http://www.w3.org/2001/XMLSchema# | +| linkml | https://w3id.org/linkml/ | diff --git a/src/docs/spec-model.md b/src/docs/spec-model.md index bd9a8b66..e06637a4 100644 --- a/src/docs/spec-model.md +++ b/src/docs/spec-model.md @@ -82,6 +82,7 @@ In addition, predicates from the following sources MAY also be encouraged: * any relation from the [Relation Ontology (RO)](https://obofoundry.org/ontology/ro.html); * any relation under [skos:mappingRelation](http://www.w3.org/2004/02/skos/core#mappingRelation) in the [Semantic Mapping Vocabulary](https://mapping-commons.github.io/semantic-mapping-vocabulary/). + ## Representing unmapped entities The special value `sssom:NoTermFound` MAY be used as the `object_id` of a mapping to explicitly state that the subject of said mapping cannot be mapped to any entity in the domain represented by the `object_source` slot. @@ -95,3 +96,69 @@ The `sssom:NoTermFound` value MUST NOT be used in any other slot than `subject_i The meaning of the NOT predicate modifier in a mapping that refers to `sssom:NoTermFound` is unspecified. When computing cardinality values (to fill the `mapping_cardinality` slot), mappings that refer to `sssom:NoTermFound` MUST be ignored. + + +## Non-standard slots + + + +Implementations are only REQUIRED to support the standard metadata slots defined in the SSSOM LinkML schema. + +However, implementations MAY support the use of supplementary, non-standard slots (hereafter called _extension slots_ or simply _extensions_). There are two types of extension slots: _defined_ extension slots and _undefined_ extension slots. + +### Defined extensions + +Defined extensions are non-standard slots that are explicitly declared (or, _defined_) before being used. Implementations SHOULD support the use of defined extensions. + +Extensions are defined in the `extension_definition` slot of the `MappingSet` object. Each definition is comprised of three elements: + +* the name of the slot, as it will appear when used in a mapping set (`slot_name`); +* a property intended to specify the meaning of the slot (`property`); +* the type of values expected by the slot (`type_hint`). + +A definition MUST have at least a `slot_name`. The name MUST be a XML “non-colonized name” (“NCName”, see [Namespaces in XML, §2](https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName)). The name MUST NOT match the name of an existing standard slot. + +To avoid any conflicy with a future version of the SSSOM specification (which could introduce new standard slot names), implementations are strongly encouraged to craft extension slot names that start with the `ext_` prefix. No new standard slot with a name starting with `ext_` will ever be introduced in any future version of the standard. (This is an advice for SSSOM producers only; SSSOM consumers MUST NOT reject an extension slot solely on the basis that its name does not start with `ext`.) + +A definition SHOULD have a `property`. If it does not, implementations MUST automatically construct a default property by concatenating the prefix `http://sssom.invalid/` with the name of the extension. + +The slot name and the property MUST be unique to each definition. No two definitions can share the same name and/or the same property. + +A definition MAY have a `type_hint`. If it does not, a default type of `http://www.w3.org/2001/XMLSchema#string` is assumed. + +Once defined, an extension slot may be used as a supplementary slot in either the `Mapping` class or the `MappingSet` class (or both), as if it was a normal, standard slot. How those slots are represented internally and provided to client code is left at the discretion of the implementations. + +### Undefined extensions + +Undefined extensions are non-standard slots that are not explicitly defined as described in the previous section. Implementations MAY support undefined extensions. + +Upon encountering a non-standard slot that is not a defined extension, an implementation that supports undefined extensions MUST behave as if the slot had been defined with: + +* a `property` constructed by catenating the prefix `http://sssom.invalid/` to the name of the slot; +* a `type_hint` of `http://www.w3.org/2001/XMLSchema#string`. + +### Restrictions on the values of extension slots + +#### General restrictions + +The following restrictions apply to all extension slots, regardless of whether they are defined or undefined. + +Each mapping set and each mapping can have at most _one_ value for each extension slot. The expected behaviour upon encountering a repeated extension slot is unspecified. + +An extension value MUST be either a string or an instance of a simple data type such as a numerical value (integer or floating point), a boolean value, or a date or datetime value. In particular, composite data structures (e.g. lists or dictionaries) MUST NOT be used as extension values. + +It is always possible to use arbitrarily complex values by encoding them as literal strings. However, how complex values would be encoded is out of scope of this specification; implementations MUST treat such values as opaque strings. + +#### Further restrictions for typed defined extensions + +If a defined extension slot has a `type_hint` other than `http://www.w3.org/2001/XMLSchema#string`, implementations MAY enforce further constraints on extension values based on the type hint, according to the following table: + +| Type hint | Constraints | +| --------- | ----------- | +| http://www.w3.org/2001/XMLSchema#integer | Implementations MAY check that the value is an integer | +| http://www.w3.org/2001/XMLSchema#double | Implementations MAY check that the value is a floating number | +| http://www.w3.org/2001/XMLSchema#boolean | Implementations MAY check that the value is either `true` or `false` | +| http://www.w3.org/2001/XMLSchema#date | Implementations MAY check that the value is a date in the ISO 8601 format (`yyyy-mm-dd`) | +| http://www.w3.org/2001/XMLSchema#datetime | Implementations MAY check that the value is a date and time value in the ISO 8601 format (`yyyy-mm-ddThh:mm:ssTZ`) | + +Implementations MAY decide to recognise more types and to enforce type-specific constraints. For example, an implementation could recognise the type `http://www.w3.org/2001/XMLSchema#negativeInteger` and check that the value starts with a minus sign. diff --git a/src/sssom_schema/context/sssom_schema.context.jsonld b/src/sssom_schema/context/sssom_schema.context.jsonld index fc8fd2bf..e1851867 100644 --- a/src/sssom_schema/context/sssom_schema.context.jsonld +++ b/src/sssom_schema/context/sssom_schema.context.jsonld @@ -1,5 +1,9 @@ { - "_comments": "Auto generated from sssom_schema.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2023-07-31T17:42:54\n Schema: sssom\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/sssom/schema/\n description: Datamodel for Simple Standard for Sharing Ontological Mappings (SSSOM)\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ", + "comments": { + "description": "Auto generated by LinkML jsonld context generator", + "generation_date": "2024-08-05T10:18:22", + "source": "sssom_schema.yaml" + }, "@context": { "dcterms": "http://purl.org/dc/terms/", "linkml": "https://w3id.org/linkml/", @@ -12,75 +16,144 @@ "semapv": "https://w3id.org/semapv/vocab/", "skos": "http://www.w3.org/2004/02/skos/core#", "sssom": "https://w3id.org/sssom/", + "xsd": "http://www.w3.org/2001/XMLSchema#", "@vocab": "https://w3id.org/sssom/", "author_id": { "@type": "rdfs:Resource", "@id": "pav:authoredBy" }, + "author_label": { + "@id": "author_label" + }, "comment": { "@id": "rdfs:comment" }, "confidence": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "confidence" }, "creator_id": { "@type": "rdfs:Resource", "@id": "dcterms:creator" }, + "creator_label": { + "@id": "creator_label" + }, "curation_rule": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "curation_rule" + }, + "curation_rule_text": { + "@id": "curation_rule_text" }, "documentation": { - "@type": "@id" + "@type": "@id", + "@id": "documentation" + }, + "extension_definitions": { + "@type": "@id", + "@id": "extension_definitions" + }, + "property": { + "@type": "@id", + "@id": "property" + }, + "slot_name": { + "@id": "slot_name" + }, + "type_hint": { + "@type": "@id", + "@id": "type_hint" }, "homepage": { - "@type": "@id" + "@type": "@id", + "@id": "homepage" }, "imports": { - "@type": "@id" + "@type": "@id", + "@id": "imports" }, "issue_tracker": { - "@type": "@id" + "@type": "@id", + "@id": "issue_tracker" }, "issue_tracker_item": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "issue_tracker_item" }, "last_updated": { - "@type": "xsd:date" + "@type": "xsd:date", + "@id": "last_updated" }, "license": { "@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" + }, "mapping_cardinality": { "@context": { "@vocab": "@null", "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "mapping_cardinality" }, "mapping_date": { "@type": "xsd:date", "@id": "pav:authoredOn" }, "mapping_justification": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_justification" }, "mapping_provider": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_provider" + }, + "mapping_registry_description": { + "@id": "mapping_registry_description" }, "mapping_registry_id": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_registry_id" + }, + "mapping_registry_title": { + "@id": "mapping_registry_title" }, "mapping_set_description": { "@id": "dcterms:description" }, + "mapping_set_group": { + "@id": "mapping_set_group" + }, "mapping_set_id": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_set_id" }, "mapping_set_references": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_set_references" }, "mapping_set_source": { "@type": "@id", @@ -93,26 +166,50 @@ "@id": "owl:versionInfo" }, "mapping_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_source" + }, + "mapping_tool": { + "@id": "mapping_tool" + }, + "mapping_tool_version": { + "@id": "mapping_tool_version" }, "mappings": { - "@type": "@id" + "@type": "@id", + "@id": "mappings" + }, + "match_string": { + "@id": "match_string" }, "mirror_from": { - "@type": "@id" + "@type": "@id", + "@id": "mirror_from" + }, + "object_category": { + "@id": "object_category" }, "object_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedTarget" }, + "object_label": { + "@id": "object_label" + }, "object_match_field": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_match_field" }, "object_preprocessing": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_preprocessing" }, "object_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_source" + }, + "object_source_version": { + "@id": "object_source_version" }, "object_type": { "@context": { @@ -120,19 +217,27 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "object_type" + }, + "other": { + "@id": "other" }, "predicate_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedProperty" }, + "predicate_label": { + "@id": "predicate_label" + }, "predicate_modifier": { "@context": { "@vocab": "@null", "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "predicate_modifier" }, "predicate_type": { "@context": { @@ -140,36 +245,69 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "predicate_type" + }, + "propagated": { + "@type": "xsd:boolean", + "@id": "propagated" }, "publication_date": { "@type": "xsd:date", "@id": "dcterms:created" }, "registry_confidence": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "registry_confidence" }, "reviewer_id": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "reviewer_id" + }, + "reviewer_label": { + "@id": "reviewer_label" }, "see_also": { "@id": "rdfs:seeAlso" }, + "semantic_similarity_measure": { + "@id": "semantic_similarity_measure" + }, "semantic_similarity_score": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "semantic_similarity_score" + }, + "similarity_measure": { + "@id": "similarity_measure" + }, + "similarity_score": { + "@type": "xsd:double", + "@id": "similarity_score" + }, + "subject_category": { + "@id": "subject_category" }, "subject_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedSource" }, + "subject_label": { + "@id": "subject_label" + }, "subject_match_field": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_match_field" }, "subject_preprocessing": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_preprocessing" }, "subject_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_source" + }, + "subject_source_version": { + "@id": "subject_source_version" }, "subject_type": { "@context": { @@ -177,10 +315,29 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "subject_type" + }, + "ExtensionDefinition": { + "@id": "ExtensionDefinition" + }, + "LiteralMapping": { + "@id": "owl:Axiom" }, "Mapping": { "@id": "owl:Axiom" + }, + "MappingRegistry": { + "@id": "MappingRegistry" + }, + "MappingSet": { + "@id": "MappingSet" + }, + "MappingSetReference": { + "@id": "MappingSetReference" + }, + "Propagatable": { + "@id": "Propagatable" } } } diff --git a/src/sssom_schema/context/sssom_schema.jsonld b/src/sssom_schema/context/sssom_schema.jsonld index 47844e72..a0a43e18 100644 --- a/src/sssom_schema/context/sssom_schema.jsonld +++ b/src/sssom_schema/context/sssom_schema.jsonld @@ -47,6 +47,10 @@ "prefix_prefix": "skos", "prefix_reference": "http://www.w3.org/2004/02/skos/core#" }, + { + "prefix_prefix": "xsd", + "prefix_reference": "http://www.w3.org/2001/XMLSchema#" + }, { "prefix_prefix": "semapv", "prefix_reference": "https://w3id.org/semapv/vocab/" @@ -62,8 +66,11 @@ { "name": "EntityReference", "definition_uri": "https://w3id.org/sssom/EntityReference", - "description": "A reference to a mapped entity. This is represented internally as a string, and as a resource in RDF", + "description": "A reference to an entity involved in the mapping.\n", "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://mapping-commons.github.io/sssom/spec/#tsv" + ], "typeof": "uriorcurie", "base": "str", "uri": "http://www.w3.org/2000/01/rdf-schema#Resource", @@ -74,6 +81,9 @@ "name": "string", "definition_uri": "https://w3id.org/linkml/String", "description": "A character string", + "notes": [ + "In RDF serializations, a slot with range of string is treated as a literal or type xsd:string. If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"string\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -87,6 +97,9 @@ "name": "integer", "definition_uri": "https://w3id.org/linkml/Integer", "description": "An integer", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"integer\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -100,6 +113,9 @@ "name": "boolean", "definition_uri": "https://w3id.org/linkml/Boolean", "description": "A binary (true or false) value", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"boolean\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -114,6 +130,9 @@ "name": "float", "definition_uri": "https://w3id.org/linkml/Float", "description": "A real number that conforms to the xsd:float specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"float\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -127,6 +146,9 @@ "name": "double", "definition_uri": "https://w3id.org/linkml/Double", "description": "A real number that conforms to the xsd:double specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"double\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "close_mappings": [ @@ -140,6 +162,9 @@ "name": "decimal", "definition_uri": "https://w3id.org/linkml/Decimal", "description": "A real number with arbitrary precision that conforms to the xsd:decimal specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"decimal\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "broad_mappings": [ @@ -154,7 +179,8 @@ "definition_uri": "https://w3id.org/linkml/Time", "description": "A time object represents a (local) time of day, independent of any particular day", "notes": [ - "URI is dateTime because OWL reasoners do not work with straight date or time" + "URI is dateTime because OWL reasoners do not work with straight date or time", + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"time\"." ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", @@ -171,7 +197,8 @@ "definition_uri": "https://w3id.org/linkml/Date", "description": "a date (year, month and day) in an idealized calendar", "notes": [ - "URI is dateTime because OWL reasoners don't work with straight date or time" + "URI is dateTime because OWL reasoners don't work with straight date or time", + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"date\"." ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", @@ -187,6 +214,9 @@ "name": "datetime", "definition_uri": "https://w3id.org/linkml/Datetime", "description": "The combination of a date and time", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"datetime\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -201,6 +231,9 @@ "name": "date_or_datetime", "definition_uri": "https://w3id.org/linkml/DateOrDatetime", "description": "Either a date or a datetime", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"date_or_datetime\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -212,6 +245,9 @@ "name": "uriorcurie", "definition_uri": "https://w3id.org/linkml/Uriorcurie", "description": "a URI or a CURIE", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"uriorcurie\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "URIorCURIE", @@ -224,6 +260,9 @@ "definition_uri": "https://w3id.org/linkml/Curie", "conforms_to": "https://www.w3.org/TR/curie/", "description": "a compact URI", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"curie\"." + ], "comments": [ "in RDF serializations this MUST be expanded to a URI", "in non-RDF serializations MAY be serialized as the compact representation" @@ -240,6 +279,9 @@ "definition_uri": "https://w3id.org/linkml/Uri", "conforms_to": "https://www.ietf.org/rfc/rfc3987.txt", "description": "a complete URI", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"uri\"." + ], "comments": [ "in RDF serializations a slot with range of uri is treated as a literal or type xsd:anyURI unless it is an identifier or a reference to an identifier, in which case it is translated directly to a node" ], @@ -257,6 +299,9 @@ "name": "ncname", "definition_uri": "https://w3id.org/linkml/Ncname", "description": "Prefix part of CURIE", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"ncname\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "NCName", @@ -268,6 +313,9 @@ "name": "objectidentifier", "definition_uri": "https://w3id.org/linkml/Objectidentifier", "description": "A URI or CURIE that represents an object in the model.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"objectidentifier\"." + ], "comments": [ "Used for inheritance and type checking" ], @@ -282,6 +330,9 @@ "name": "nodeidentifier", "definition_uri": "https://w3id.org/linkml/Nodeidentifier", "description": "A URI, CURIE or BNODE that represents a node in a model.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"nodeidentifier\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "NodeIdentifier", @@ -294,6 +345,9 @@ "definition_uri": "https://w3id.org/linkml/Jsonpointer", "conforms_to": "https://datatracker.ietf.org/doc/html/rfc6901", "description": "A string encoding a JSON Pointer. The value of the string MUST conform to JSON Point syntax and SHOULD dereference to a valid object within the current instance document when encoded in tree form.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"jsonpointer\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -306,6 +360,9 @@ "definition_uri": "https://w3id.org/linkml/Jsonpath", "conforms_to": "https://www.ietf.org/archive/id/draft-goessner-dispatch-jsonpath-00.html", "description": "A string encoding a JSON Path. The value of the string MUST conform to JSON Point syntax and SHOULD dereference to zero or more valid objects within the current instance document when encoded in tree form.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"jsonpath\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -318,6 +375,9 @@ "definition_uri": "https://w3id.org/linkml/Sparqlpath", "conforms_to": "https://www.w3.org/TR/sparql11-query/#propertypaths", "description": "A string encoding a SPARQL Property Path. The value of the string MUST conform to SPARQL syntax and SHOULD dereference to zero or more valid objects within the current instance document when encoded as RDF.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"sparqlpath\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -612,6 +672,55 @@ "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", @@ -669,6 +778,16 @@ { "name": "subject_type", "definition_uri": "https://w3id.org/sssom/subject_type", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The type of entity that is being mapped.", "examples": [ { @@ -702,9 +821,10 @@ "http://www.w3.org/2002/07/owl#annotatedProperty" ], "slot_uri": "http://www.w3.org/2002/07/owl#annotatedProperty", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -726,9 +846,10 @@ "https://github.com/mapping-commons/sssom/issues/107" ], "slot_uri": "https://w3id.org/sssom/predicate_modifier", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "predicate_modifier_enum", "@type": "SlotDefinition" @@ -801,9 +922,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/predicate_label", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -844,9 +966,10 @@ "http://www.w3.org/2002/07/owl#annotatedTarget" ], "slot_uri": "http://www.w3.org/2002/07/owl#annotatedTarget", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -864,9 +987,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_label", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "recommended": true, @@ -899,9 +1023,10 @@ "https://github.com/mapping-commons/sssom/issues/256" ], "slot_uri": "https://w3id.org/sssom/object_category", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -922,9 +1047,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_justification", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -972,6 +1098,16 @@ { "name": "object_type", "definition_uri": "https://w3id.org/sssom/object_type", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The type of entity that is being mapped.", "examples": [ { @@ -981,10 +1117,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_type", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "entity_type_enum", "@type": "SlotDefinition" @@ -1106,10 +1243,11 @@ ], "slot_uri": "http://purl.org/dc/terms/creator", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1121,10 +1259,11 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/creator_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1139,9 +1278,10 @@ ], "slot_uri": "http://purl.org/pav/authoredBy", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1153,9 +1293,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/author_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1167,9 +1308,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_id", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1181,9 +1323,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1197,10 +1340,11 @@ "http://purl.org/dc/terms/license" ], "slot_uri": "http://purl.org/dc/terms/license", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1208,6 +1352,16 @@ { "name": "subject_source", "definition_uri": "https://w3id.org/sssom/subject_source", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "URI of vocabulary or identifier source for the subject.", "examples": [ { @@ -1234,6 +1388,16 @@ { "name": "subject_source_version", "definition_uri": "https://w3id.org/sssom/subject_source_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version IRI or version string of the source of the subject term.", "examples": [ { @@ -1252,9 +1416,64 @@ "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", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "URI of vocabulary or identifier source for the object.", "examples": [ { @@ -1270,10 +1489,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1281,6 +1501,16 @@ { "name": "object_source_version", "definition_uri": "https://w3id.org/sssom/object_source_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version IRI or version string of the source of the object term.", "examples": [ { @@ -1291,10 +1521,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source_version", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1302,13 +1533,24 @@ { "name": "mapping_provider", "definition_uri": "https://w3id.org/sssom/mapping_provider", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "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": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1349,9 +1591,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_source", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1362,9 +1605,10 @@ "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": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "mapping_cardinality_enum", "@type": "SlotDefinition" @@ -1372,6 +1616,16 @@ { "name": "mapping_tool", "definition_uri": "https://w3id.org/sssom/mapping_tool", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "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.", "examples": [ { @@ -1381,10 +1635,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1392,6 +1647,16 @@ { "name": "mapping_tool_version", "definition_uri": "https://w3id.org/sssom/mapping_tool_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version string that denotes the version of the mapping tool used.", "examples": [ { @@ -1401,10 +1666,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool_version", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1412,16 +1678,27 @@ { "name": "mapping_date", "definition_uri": "https://w3id.org/sssom/mapping_date", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file.", "from_schema": "https://w3id.org/sssom/schema/", "mappings": [ "http://purl.org/pav/authoredOn" ], "slot_uri": "http://purl.org/pav/authoredOn", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "date", "@type": "SlotDefinition" @@ -1449,16 +1726,29 @@ "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": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, "@type": "SlotDefinition" }, { "name": "subject_match_field", "definition_uri": "https://w3id.org/sssom/subject_match_field", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "A list of properties (term annotations on the subject) that was used for the match.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/subject_match_field", @@ -1474,14 +1764,25 @@ { "name": "object_match_field", "definition_uri": "https://w3id.org/sssom/object_match_field", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "A list of properties (term annotations on the object) that was used for the match.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_match_field", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1489,13 +1790,14 @@ { "name": "match_string", "definition_uri": "https://w3id.org/sssom/match_string", - "description": "Strings that are shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots.", + "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.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/match_string", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1503,6 +1805,16 @@ { "name": "subject_preprocessing", "definition_uri": "https://w3id.org/sssom/subject_preprocessing", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "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.", "examples": [ { @@ -1528,6 +1840,16 @@ { "name": "object_preprocessing", "definition_uri": "https://w3id.org/sssom/object_preprocessing", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "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.", "examples": [ { @@ -1542,10 +1864,35 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_preprocessing", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "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" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1599,6 +1946,8 @@ "Mapping" ], "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, "@type": "SlotDefinition" }, { @@ -1621,6 +1970,41 @@ "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.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/similarity_score", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, + "@type": "SlotDefinition" + }, + { + "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.", + "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/similarity_measure", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "string", + "@type": "SlotDefinition" + }, { "name": "issue_tracker_item", "definition_uri": "https://w3id.org/sssom/issue_tracker_item", @@ -1682,10 +2066,11 @@ ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#seeAlso", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1696,10 +2081,11 @@ "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": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1713,14 +2099,87 @@ "http://www.w3.org/2000/01/rdf-schema#comment" ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#comment", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" }, + { + "name": "extension_definitions", + "definition_uri": "https://w3id.org/sssom/extension_definitions", + "description": "A list that defines the extension slots used in the mapping set.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/328", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/extension-slots.sssom.tsv" + ], + "slot_uri": "https://w3id.org/sssom/extension_definitions", + "multivalued": true, + "owner": "MappingSet", + "domain_of": [ + "MappingSet" + ], + "range": "ExtensionDefinition", + "inlined": true, + "@type": "SlotDefinition" + }, + { + "name": "extensionDefinition__slot_name", + "description": "The name of the extension slot.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/slot_name", + "alias": "slot_name", + "owner": "ExtensionDefinition", + "domain_of": [ + "ExtensionDefinition" + ], + "range": "ncname", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "extensionDefinition__property", + "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).", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/property", + "alias": "property", + "owner": "ExtensionDefinition", + "domain_of": [ + "ExtensionDefinition" + ], + "range": "uriorcurie", + "@type": "SlotDefinition" + }, + { + "name": "extensionDefinition__type_hint", + "description": "Expected type of the values of the extension slot.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/type_hint", + "alias": "type_hint", + "owner": "ExtensionDefinition", + "domain_of": [ + "ExtensionDefinition" + ], + "range": "uriorcurie", + "@type": "SlotDefinition" + }, + { + "name": "propagatable__propagated", + "description": "Indicates whether a slot can be propagated from a mapping down to individual mappings.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/propagated", + "alias": "propagated", + "owner": "Propagatable", + "domain_of": [ + "Propagatable" + ], + "range": "boolean", + "@type": "SlotDefinition" + }, { "name": "mapping_set_license", "definition_uri": "https://w3id.org/sssom/license", @@ -1778,7 +2237,8 @@ "see_also", "issue_tracker", "other", - "comment" + "comment", + "extension_definitions" ], "slot_usage": {}, "class_uri": "https://w3id.org/sssom/MappingSet", @@ -1842,6 +2302,60 @@ "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", + "other", + "comment" + ], + "slot_usage": {}, + "class_uri": "http://www.w3.org/2002/07/owl#Axiom", + "@type": "ClassDefinition" + }, { "name": "MappingRegistry", "definition_uri": "https://w3id.org/sssom/MappingRegistry", @@ -1877,13 +2391,74 @@ "slot_usage": {}, "class_uri": "https://w3id.org/sssom/MappingSetReference", "@type": "ClassDefinition" + }, + { + "name": "ExtensionDefinition", + "definition_uri": "https://w3id.org/sssom/ExtensionDefinition", + "description": "A definition of an extension (non-standard) slot.", + "from_schema": "https://w3id.org/sssom/schema/", + "slots": [ + "extensionDefinition__slot_name", + "extensionDefinition__property", + "extensionDefinition__type_hint" + ], + "slot_usage": {}, + "attributes": [ + { + "name": "slot_name", + "description": "The name of the extension slot.", + "range": "ncname", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "property", + "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).", + "range": "uriorcurie", + "@type": "SlotDefinition" + }, + { + "name": "type_hint", + "description": "Expected type of the values of the extension slot.", + "range": "uriorcurie", + "@type": "SlotDefinition" + } + ], + "class_uri": "https://w3id.org/sssom/ExtensionDefinition", + "@type": "ClassDefinition" + }, + { + "name": "Propagatable", + "definition_uri": "https://w3id.org/sssom/Propagatable", + "description": "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/305" + ], + "mappings": [ + "sssom:Propagatable" + ], + "slots": [ + "propagatable__propagated" + ], + "slot_usage": {}, + "attributes": [ + { + "name": "propagated", + "description": "Indicates whether a slot can be propagated from a mapping down to individual mappings.", + "range": "boolean", + "@type": "SlotDefinition" + } + ], + "class_uri": "https://w3id.org/sssom/Propagatable", + "@type": "ClassDefinition" } ], "metamodel_version": "1.7.0", "source_file": "sssom_schema.yaml", - "source_file_date": "2023-07-31T17:42:04", - "source_file_size": 26565, - "generation_date": "2023-07-31T17:42:55", + "source_file_date": "2024-08-04T07:56:31", + "source_file_size": 32305, + "generation_date": "2024-08-05T10:18:22", "@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 eb2969f5..9367487c 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.9.0 -# Generation date: 2023-07-31T17:42:59 +# Auto generated from sssom_schema.yaml by pythongen.py version: 0.0.1 +# Generation date: 2024-08-05T10:18:23 # Schema: sssom # # id: https://w3id.org/sssom/schema/ @@ -7,11 +7,11 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys import re from jsonasobj2 import JsonObj, as_dict from typing import Optional, List, Union, Dict, ClassVar, Any from dataclasses import dataclass +from datetime import date, datetime from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions from linkml_runtime.utils.slot import Slot @@ -22,8 +22,8 @@ from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import Namespace, URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import Date, Double, String, Uri, Uriorcurie -from linkml_runtime.utils.metamodelcore import URI, URIorCURIE, XSDDate +from linkml_runtime.linkml_model.types import Boolean, Date, Double, Ncname, String, Uri, Uriorcurie +from linkml_runtime.utils.metamodelcore import Bool, NCName, URI, URIorCURIE, XSDDate metamodel_version = "1.7.0" version = None @@ -43,13 +43,15 @@ SEMAPV = CurieNamespace('semapv', 'https://w3id.org/semapv/vocab/') SKOS = CurieNamespace('skos', 'http://www.w3.org/2004/02/skos/core#') SSSOM = CurieNamespace('sssom', 'https://w3id.org/sssom/') +XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#') DEFAULT_ = SSSOM # Types class EntityReference(Uriorcurie): - """ A reference to a mapped entity. This is represented internally as a string, and as a resource in RDF """ - type_class_uri = RDFS.Resource + """ A reference to an entity involved in the mapping. + """ + type_class_uri = RDFS["Resource"] type_class_curie = "rdfs:Resource" type_name = "EntityReference" type_model_uri = SSSOM.EntityReference @@ -66,7 +68,7 @@ class MappingSet(YAMLRoot): """ _inherited_slots: ClassVar[List[str]] = [] - class_class_uri: ClassVar[URIRef] = SSSOM.MappingSet + class_class_uri: ClassVar[URIRef] = SSSOM["MappingSet"] class_class_curie: ClassVar[str] = "sssom:MappingSet" class_name: ClassVar[str] = "mapping set" class_model_uri: ClassVar[URIRef] = SSSOM.MappingSet @@ -99,6 +101,7 @@ class MappingSet(YAMLRoot): issue_tracker: Optional[Union[str, URI]] = None other: Optional[str] = None comment: Optional[str] = None + extension_definitions: Optional[Union[Union[dict, "ExtensionDefinition"], List[Union[dict, "ExtensionDefinition"]]]] = empty_list() def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self._is_empty(self.mapping_set_id): @@ -198,6 +201,8 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.comment is not None and not isinstance(self.comment, str): self.comment = str(self.comment) + self._normalize_inlined_as_dict(slot_name="extension_definitions", slot_type=ExtensionDefinition, key_name="slot_name", keyed=False) + super().__post_init__(**kwargs) @@ -208,7 +213,7 @@ class Mapping(YAMLRoot): """ _inherited_slots: ClassVar[List[str]] = [] - class_class_uri: ClassVar[URIRef] = OWL.Axiom + class_class_uri: ClassVar[URIRef] = OWL["Axiom"] class_class_curie: ClassVar[str] = "owl:Axiom" class_name: ClassVar[str] = "mapping" class_model_uri: ClassVar[URIRef] = SSSOM.Mapping @@ -416,6 +421,191 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): 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) + + if self.similarity_measure is not None and not isinstance(self.similarity_measure, str): + self.similarity_measure = str(self.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.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 MappingRegistry(YAMLRoot): """ @@ -423,7 +613,7 @@ class MappingRegistry(YAMLRoot): """ _inherited_slots: ClassVar[List[str]] = [] - class_class_uri: ClassVar[URIRef] = SSSOM.MappingRegistry + class_class_uri: ClassVar[URIRef] = SSSOM["MappingRegistry"] class_class_curie: ClassVar[str] = "sssom:MappingRegistry" class_name: ClassVar[str] = "mapping registry" class_model_uri: ClassVar[URIRef] = SSSOM.MappingRegistry @@ -475,7 +665,7 @@ class MappingSetReference(YAMLRoot): """ _inherited_slots: ClassVar[List[str]] = [] - class_class_uri: ClassVar[URIRef] = SSSOM.MappingSetReference + class_class_uri: ClassVar[URIRef] = SSSOM["MappingSetReference"] class_class_curie: ClassVar[str] = "sssom:MappingSetReference" class_name: ClassVar[str] = "mapping set reference" class_model_uri: ClassVar[URIRef] = SSSOM.MappingSetReference @@ -511,6 +701,59 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): super().__post_init__(**kwargs) +@dataclass +class ExtensionDefinition(YAMLRoot): + """ + A definition of an extension (non-standard) slot. + """ + _inherited_slots: ClassVar[List[str]] = [] + + class_class_uri: ClassVar[URIRef] = SSSOM["ExtensionDefinition"] + class_class_curie: ClassVar[str] = "sssom:ExtensionDefinition" + class_name: ClassVar[str] = "extension definition" + class_model_uri: ClassVar[URIRef] = SSSOM.ExtensionDefinition + + slot_name: Union[str, NCName] = None + property: Optional[Union[str, URIorCURIE]] = None + type_hint: Optional[Union[str, URIorCURIE]] = None + + def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + if self._is_empty(self.slot_name): + self.MissingRequiredField("slot_name") + if not isinstance(self.slot_name, NCName): + self.slot_name = NCName(self.slot_name) + + if self.property is not None and not isinstance(self.property, URIorCURIE): + self.property = URIorCURIE(self.property) + + if self.type_hint is not None and not isinstance(self.type_hint, URIorCURIE): + self.type_hint = URIorCURIE(self.type_hint) + + super().__post_init__(**kwargs) + + +@dataclass +class Propagatable(YAMLRoot): + """ + Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the + Mapping class. + """ + _inherited_slots: ClassVar[List[str]] = [] + + class_class_uri: ClassVar[URIRef] = SSSOM["Propagatable"] + class_class_curie: ClassVar[str] = "sssom:Propagatable" + class_name: ClassVar[str] = "Propagatable" + class_model_uri: ClassVar[URIRef] = SSSOM.Propagatable + + propagated: Optional[Union[bool, Bool]] = None + + def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + if self.propagated is not None and not isinstance(self.propagated, Bool): + self.propagated = Bool(self.propagated) + + super().__post_init__(**kwargs) + + # Enumerations class EntityTypeEnum(EnumDefinitionImpl): @@ -521,43 +764,55 @@ class EntityTypeEnum(EnumDefinitionImpl): @classmethod def _addvals(cls): setattr(cls, "owl class", - PermissibleValue(text="owl class", - meaning=OWL.Class) ) + PermissibleValue( + text="owl class", + meaning=OWL["Class"])) setattr(cls, "owl object property", - PermissibleValue(text="owl object property", - meaning=OWL.ObjectProperty) ) + PermissibleValue( + text="owl object property", + meaning=OWL["ObjectProperty"])) setattr(cls, "owl data property", - PermissibleValue(text="owl data property", - meaning=OWL.DataProperty) ) + PermissibleValue( + text="owl data property", + meaning=OWL["DataProperty"])) setattr(cls, "owl annotation property", - PermissibleValue(text="owl annotation property", - meaning=OWL.AnnotationProperty) ) + PermissibleValue( + text="owl annotation property", + meaning=OWL["AnnotationProperty"])) setattr(cls, "owl named individual", - PermissibleValue(text="owl named individual", - meaning=OWL.NamedIndividual) ) + PermissibleValue( + text="owl named individual", + meaning=OWL["NamedIndividual"])) setattr(cls, "skos concept", - PermissibleValue(text="skos concept", - meaning=SKOS.Concept) ) + PermissibleValue( + text="skos concept", + meaning=SKOS["Concept"])) setattr(cls, "rdfs resource", - PermissibleValue(text="rdfs resource", - meaning=RDFS.Resource) ) + PermissibleValue( + text="rdfs resource", + meaning=RDFS["Resource"])) setattr(cls, "rdfs class", - PermissibleValue(text="rdfs class", - meaning=RDFS.Class) ) + PermissibleValue( + text="rdfs class", + meaning=RDFS["Class"])) setattr(cls, "rdfs literal", - PermissibleValue(text="rdfs literal", - meaning=RDFS.Literal) ) + PermissibleValue( + text="rdfs literal", + meaning=RDFS["Literal"])) setattr(cls, "rdfs datatype", - PermissibleValue(text="rdfs datatype", - meaning=RDFS.Datatype) ) + PermissibleValue( + text="rdfs datatype", + meaning=RDFS["Datatype"])) setattr(cls, "rdf property", - PermissibleValue(text="rdf property", - meaning=RDF.Property) ) + PermissibleValue( + text="rdf property", + meaning=RDF["Property"])) class PredicateModifierEnum(EnumDefinitionImpl): - Not = PermissibleValue(text="Not", - description="Negating the mapping predicate. The meaning of the triple becomes subject_id is not a predicate_id match to object_id.") + Not = PermissibleValue( + text="Not", + description="""Negating the mapping predicate. The meaning of the triple becomes subject_id is not a predicate_id match to object_id.""") _defn = EnumDefinition( name="PredicateModifierEnum", @@ -572,23 +827,29 @@ class MappingCardinalityEnum(EnumDefinitionImpl): @classmethod def _addvals(cls): setattr(cls, "1:1", - PermissibleValue(text="1:1", - description="One-to-one mapping") ) + PermissibleValue( + text="1:1", + description="One-to-one mapping")) setattr(cls, "1:n", - PermissibleValue(text="1:n", - description="One-to-many mapping") ) + PermissibleValue( + text="1:n", + description="One-to-many mapping")) setattr(cls, "n:1", - PermissibleValue(text="n:1", - description="Many-to-one mapping") ) + PermissibleValue( + text="n:1", + description="Many-to-one mapping")) setattr(cls, "1:0", - PermissibleValue(text="1:0", - description="One-to-none mapping") ) + PermissibleValue( + text="1:0", + description="One-to-none mapping")) setattr(cls, "0:1", - PermissibleValue(text="0:1", - description="None-to-one mapping") ) + PermissibleValue( + text="0:1", + description="None-to-one mapping")) setattr(cls, "n:n", - PermissibleValue(text="n:n", - description="Many-to-many mapping") ) + PermissibleValue( + text="n:n", + description="Many-to-many mapping")) # Slots class slots: @@ -633,6 +894,12 @@ 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]) @@ -712,6 +979,12 @@ 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]]) @@ -760,6 +1033,9 @@ 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]]]]) @@ -772,6 +1048,12 @@ class slots: 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]) + +slots.similarity_measure = Slot(uri=SSSOM.similarity_measure, name="similarity_measure", curie=SSSOM.curie('similarity_measure'), + model_uri=SSSOM.similarity_measure, domain=None, range=Optional[str]) + slots.issue_tracker_item = Slot(uri=SSSOM.issue_tracker_item, name="issue_tracker_item", curie=SSSOM.curie('issue_tracker_item'), model_uri=SSSOM.issue_tracker_item, domain=None, range=Optional[Union[str, EntityReference]]) @@ -787,5 +1069,20 @@ class slots: slots.comment = Slot(uri=RDFS.comment, name="comment", curie=RDFS.curie('comment'), model_uri=SSSOM.comment, domain=None, range=Optional[str]) +slots.extension_definitions = Slot(uri=SSSOM.extension_definitions, name="extension_definitions", curie=SSSOM.curie('extension_definitions'), + model_uri=SSSOM.extension_definitions, domain=None, range=Optional[Union[Union[dict, ExtensionDefinition], List[Union[dict, ExtensionDefinition]]]]) + +slots.extensionDefinition__slot_name = Slot(uri=SSSOM.slot_name, name="extensionDefinition__slot_name", curie=SSSOM.curie('slot_name'), + model_uri=SSSOM.extensionDefinition__slot_name, domain=None, range=Union[str, NCName]) + +slots.extensionDefinition__property = Slot(uri=SSSOM.property, name="extensionDefinition__property", curie=SSSOM.curie('property'), + model_uri=SSSOM.extensionDefinition__property, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.extensionDefinition__type_hint = Slot(uri=SSSOM.type_hint, name="extensionDefinition__type_hint", curie=SSSOM.curie('type_hint'), + model_uri=SSSOM.extensionDefinition__type_hint, domain=None, range=Optional[Union[str, URIorCURIE]]) + +slots.propagatable__propagated = Slot(uri=SSSOM.propagated, name="propagatable__propagated", curie=SSSOM.curie('propagated'), + model_uri=SSSOM.propagatable__propagated, domain=None, range=Optional[Union[bool, Bool]]) + slots.mapping_set_license = Slot(uri=DCTERMS.license, name="mapping set_license", curie=DCTERMS.curie('license'), model_uri=SSSOM.mapping_set_license, domain=MappingSet, range=Union[str, URI]) \ No newline at end of file diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index 9fa4a434..de0e38eb 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -624,6 +624,13 @@ slots: by tool providing additional informative information. slot_uri: rdfs:comment range: string + extension_definitions: + description: A list that defines the extension slots used in the mapping set. + range: extension definition + multivalued: true + see_also: + - https://github.com/mapping-commons/sssom/issues/328 + - https://github.com/mapping-commons/sssom/blob/master/examples/schema/extension-slots.sssom.tsv classes: mapping set: description: Represents a set of mappings @@ -659,6 +666,7 @@ classes: - issue_tracker - other - comment + - extension_definitions mapping: description: Represents an individual mapping between a pair of entities slots: @@ -774,6 +782,21 @@ classes: - mapping_set_group - last_updated - local_name + extension definition: + description: A definition of an extension (non-standard) slot. + attributes: + slot_name: + description: The name of the extension slot. + range: ncname + required: true + property: + 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). + range: uriorcurie + type_hint: + description: Expected type of the values of the extension slot. + range: uriorcurie Propagatable: class_uri: sssom:Propagatable description: Metamodel extension class to describe slots whose value can be