diff --git a/project/excel/sssom_schema.xlsx b/project/excel/sssom_schema.xlsx index ad3f8580..1a9151f2 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 6601b366..125602b0 100644 --- a/project/graphql/sssom_schema.graphql +++ b/project/graphql/sssom_schema.graphql @@ -1,3 +1,4 @@ +# metamodel_version: 1.7.0 type ExtensionDefinition { slotName: Ncname! @@ -7,13 +8,13 @@ type ExtensionDefinition type Mapping { - subjectId: EntityReference! + subjectId: EntityReference subjectLabel: String subjectCategory: String predicateId: EntityReference! predicateLabel: String predicateModifier: PredicateModifierEnum - objectId: EntityReference! + objectId: EntityReference objectLabel: String objectCategory: String mappingJustification: EntityReference! diff --git a/project/jsonld/sssom_schema.context.jsonld b/project/jsonld/sssom_schema.context.jsonld index 390edf8f..df8b722e 100644 --- a/project/jsonld/sssom_schema.context.jsonld +++ b/project/jsonld/sssom_schema.context.jsonld @@ -1,7 +1,7 @@ { "comments": { "description": "Auto generated by LinkML jsonld context generator", - "generation_date": "2024-08-06T18:58:48", + "generation_date": "2024-08-09T22:25:39", "source": "sssom_schema.yaml" }, "@context": { diff --git a/project/jsonld/sssom_schema.jsonld b/project/jsonld/sssom_schema.jsonld index f894b457..02ed5bfb 100644 --- a/project/jsonld/sssom_schema.jsonld +++ b/project/jsonld/sssom_schema.jsonld @@ -426,7 +426,13 @@ }, { "text": "rdfs literal", - "meaning": "rdfs:Literal" + "description": "This value indicate that the entity being mapped is not a semantic entity with a distinct identifier, but is instead represented entirely by its literal label. This value MUST NOT be used in the predicate_type slot.", + "meaning": "rdfs:Literal", + "see_also": [ + "https://mapping-commons.github.io/sssom/spec-model/#literal-mappings", + "https://github.com/mapping-commons/sssom/issues/234", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/literals.sssom.tsv" + ] }, { "text": "rdfs datatype", @@ -715,7 +721,6 @@ "Mapping" ], "range": "EntityReference", - "required": true, "@type": "SlotDefinition" }, { @@ -966,7 +971,6 @@ "Mapping" ], "range": "EntityReference", - "required": true, "@type": "SlotDefinition" }, { @@ -2185,6 +2189,110 @@ ], "slot_usage": {}, "class_uri": "http://www.w3.org/2002/07/owl#Axiom", + "rules": [ + { + "preconditions": { + "slot_conditions": [ + { + "name": "subject_type", + "equals_string": "rdfs literal", + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "postconditions": { + "slot_conditions": [ + { + "name": "subject_label", + "required": true, + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "@type": "ClassRule" + }, + { + "preconditions": { + "slot_conditions": [ + { + "name": "subject_type", + "none_of": [ + { + "equals_string": "rdfs literal", + "@type": "AnonymousSlotExpression" + } + ], + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "postconditions": { + "slot_conditions": [ + { + "name": "subject_id", + "required": true, + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "@type": "ClassRule" + }, + { + "preconditions": { + "slot_conditions": [ + { + "name": "object_type", + "equals_string": "rdfs literal", + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "postconditions": { + "slot_conditions": [ + { + "name": "object_label", + "required": true, + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "@type": "ClassRule" + }, + { + "preconditions": { + "slot_conditions": [ + { + "name": "object_type", + "none_of": [ + { + "equals_string": "rdfs literal", + "@type": "AnonymousSlotExpression" + } + ], + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "postconditions": { + "slot_conditions": [ + { + "name": "object_id", + "required": true, + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "@type": "ClassRule" + } + ], "@type": "ClassDefinition" }, { @@ -2315,9 +2423,9 @@ ], "metamodel_version": "1.7.0", "source_file": "sssom_schema.yaml", - "source_file_date": "2024-08-06T18:58:28", - "source_file_size": 31410, - "generation_date": "2024-08-06T18:58:48", + "source_file_date": "2024-08-09T22:23:57", + "source_file_size": 32836, + "generation_date": "2024-08-09T22:25:39", "@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 870e5d8a..7665c32f 100644 --- a/project/jsonschema/sssom_schema.schema.json +++ b/project/jsonschema/sssom_schema.schema.json @@ -43,6 +43,100 @@ }, "Mapping": { "additionalProperties": false, + "allOf": [ + { + "if": { + "properties": { + "subject_type": { + "const": "rdfs literal" + } + }, + "required": [ + "subject_type" + ] + }, + "then": { + "properties": { + "subject_label": {} + }, + "required": [ + "subject_label" + ] + } + }, + { + "if": { + "properties": { + "subject_type": { + "not": { + "anyOf": [ + { + "const": "rdfs literal" + } + ] + } + } + }, + "required": [ + "subject_type" + ] + }, + "then": { + "properties": { + "subject_id": {} + }, + "required": [ + "subject_id" + ] + } + }, + { + "if": { + "properties": { + "object_type": { + "const": "rdfs literal" + } + }, + "required": [ + "object_type" + ] + }, + "then": { + "properties": { + "object_label": {} + }, + "required": [ + "object_label" + ] + } + }, + { + "if": { + "properties": { + "object_type": { + "not": { + "anyOf": [ + { + "const": "rdfs literal" + } + ] + } + } + }, + "required": [ + "object_type" + ] + }, + "then": { + "properties": { + "object_id": {} + }, + "required": [ + "object_id" + ] + } + } + ], "description": "Represents an individual mapping between a pair of entities", "properties": { "author_id": { @@ -301,9 +395,7 @@ } }, "required": [ - "subject_id", "predicate_id", - "object_id", "mapping_justification" ], "title": "Mapping", diff --git a/project/prefixmap/sssom_schema.yaml b/project/prefixmap/sssom_schema.yaml index 3c3a21cd..93776194 100644 --- a/project/prefixmap/sssom_schema.yaml +++ b/project/prefixmap/sssom_schema.yaml @@ -14,4 +14,4 @@ "Mapping": { "@id": "owl:Axiom" } -} +} \ No newline at end of file diff --git a/project/protobuf/sssom_schema.proto b/project/protobuf/sssom_schema.proto index 1e888573..ed5b587b 100644 --- a/project/protobuf/sssom_schema.proto +++ b/project/protobuf/sssom_schema.proto @@ -1,3 +1,6 @@ + syntax="proto3"; + package +// metamodel_version: 1.7.0 // A definition of an extension (non-standard) slot. message ExtensionDefinition { diff --git a/project/shacl/sssom_schema.shacl.ttl b/project/shacl/sssom_schema.shacl.ttl index 7e550916..a77c55a6 100644 --- a/project/shacl/sssom_schema.shacl.ttl +++ b/project/shacl/sssom_schema.shacl.ttl @@ -14,187 +14,227 @@ sssom:MappingRegistry a sh:NodeShape ; sh:description "A registry for managing mapping sets. It holds a set of mapping set references, and can import other registries." ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype xsd:anyURI ; - sh:description "A URL to the documentation of this mapping commons." ; - sh:maxCount 1 ; - sh:order 5 ; - sh:path sssom:documentation ], - [ sh:datatype xsd:anyURI ; - sh:description "A URL location of the issue tracker for this entity." ; + sh:description "A URL to a homepage of this mapping commons." ; sh:maxCount 1 ; - sh:order 7 ; - sh:path sssom:issue_tracker ], + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path sssom:homepage ], [ sh:datatype xsd:anyURI ; sh:description "A list of registries that should be imported into this one." ; + sh:nodeKind sh:Literal ; sh:order 3 ; sh:path sssom:imports ], + [ sh:datatype xsd:anyURI ; + sh:description "A URL to the documentation of this mapping commons." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path sssom:documentation ], + [ sh:datatype rdfs:Resource ; + sh:description "The unique identifier of a mapping registry." ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path sssom:mapping_registry_id ], [ sh:class sssom:MappingSetReference ; sh:description "A list of mapping set references." ; sh:nodeKind sh:BlankNodeOrIRI ; sh:order 4 ; sh:path sssom:mapping_set_references ], + [ sh:datatype xsd:string ; + sh:description "The description of a mapping registry." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + 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:nodeKind sh:Literal ; 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:datatype xsd:string ; - sh:description "The description of a mapping registry." ; + sh:description "A URL location of the issue tracker for this entity." ; sh:maxCount 1 ; - sh:order 2 ; - sh:path sssom:mapping_registry_description ] ; + sh:nodeKind sh:Literal ; + sh:order 7 ; + sh:path sssom:issue_tracker ] ; 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:description "Contains a list of mapping objects" ; + sh:property [ sh:datatype rdfs:Resource ; + 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:nodeKind sh:Literal ; + sh:order 23 ; + sh:path sssom:subject_preprocessing ], + [ sh:datatype xsd:anyURI ; + sh:description "A mapping set or set of mapping set that was used to derive the mapping set." ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path prov:wasDerivedFrom ], + [ sh:datatype xsd:anyURI ; + sh:description "A URL location of the issue tracker for this entity." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 26 ; + sh:path sssom:issue_tracker ], + [ sh:datatype rdfs:Resource ; + 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:nodeKind sh:Literal ; + sh:order 7 ; + sh:path dcterms:creator ], + [ sh:class sssom:Prefix ; + sh:description "A dictionary that contains prefixes as keys and their URI expansions as values." ; sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 1 ; - sh:path sssom:mappings ], - [ sh:description "URI of vocabulary or identifier source for the object." ; + sh:order 0 ; + sh:path sssom:curie_map ], + [ sh:datatype xsd:string ; + sh:description "The display name of a mapping set." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path dcterms:title ], + [ sh:datatype rdfs:Resource ; + sh:description "URI of vocabulary or identifier source for the object." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 14 ; sh:path sssom:object_source ], + [ sh:datatype rdfs:Resource ; + sh:description "A list of properties (term annotations on the subject) that was used for the match." ; + sh:nodeKind sh:Literal ; + sh:order 21 ; + sh:path sssom:subject_match_field ], [ 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 13 ; - sh:path sssom:object_type ], + sh:order 10 ; + sh:path sssom:subject_type ], + [ sh:class owl:Axiom ; + sh:description "Contains a list of mapping objects" ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 1 ; + sh:path sssom:mappings ], [ sh:datatype xsd:string ; sh:description "A description of the mapping set." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 6 ; sh:path dcterms:description ], - [ sh:class sssom:Prefix ; - sh:description "A dictionary that contains prefixes as keys and their URI expansions as values." ; + [ sh:class sssom:ExtensionDefinition ; + sh:description "A list that defines the extension slots used in the mapping set." ; sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 0 ; - sh:path sssom:curie_map ], - [ sh:datatype xsd:string ; - sh:description "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead." ; - sh:order 8 ; - sh:path sssom:creator_label ], - [ sh:datatype xsd:date ; - sh:description "The date the mapping was published. This is different from the date the mapping was asserted." ; - sh:maxCount 1 ; - sh:order 20 ; - sh:path dcterms:created ], + sh:order 29 ; + sh:path sssom:extension_definitions ], [ 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:nodeKind sh:Literal ; sh:order 17 ; sh:path sssom:mapping_tool ], - [ sh:datatype xsd:string ; - sh:description "The display name of a mapping set." ; + [ sh:datatype rdfs:Resource ; + sh:description "URI of vocabulary or identifier source for the subject." ; sh:maxCount 1 ; - sh:order 5 ; - sh:path dcterms:title ], - [ 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:nodeKind sh:Literal ; + sh:order 11 ; + sh:path sssom:subject_source ], + [ sh:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the object term." ; sh:maxCount 1 ; - sh:order 19 ; - sh:path pav:authoredOn ], + sh:nodeKind sh:Literal ; + sh:order 15 ; + sh:path sssom:object_source_version ], [ 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:nodeKind sh:Literal ; sh:order 25 ; sh:path rdfs:seeAlso ], - [ sh:description "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 7 ; - sh:path dcterms:creator ], [ sh:datatype xsd:string ; - sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; + sh:description "A version string for the mapping." ; sh:maxCount 1 ; - sh:order 28 ; - sh:path rdfs:comment ], + sh:nodeKind sh:Literal ; + sh:order 3 ; + sh:path owl:versionInfo ], + [ 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:nodeKind sh:Literal ; + sh:order 9 ; + sh:path dcterms:license ], + [ sh:datatype rdfs:Resource ; + sh:description "A list of properties (term annotations on the object) that was used for the match." ; + sh:nodeKind sh:Literal ; + sh:order 22 ; + sh:path sssom:object_match_field ], + [ sh:datatype xsd:anyURI ; + sh:description "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable." ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 2 ; + sh:path sssom:mapping_set_id ], + [ 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:nodeKind sh:Literal ; + sh:order 8 ; + sh:path sssom:creator_label ], + [ sh:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the subject term." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 12 ; + sh:path sssom:subject_source_version ], + [ 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:nodeKind sh:Literal ; + sh:order 19 ; + sh:path pav:authoredOn ], [ sh:description "The type of entity that is being mapped." ; sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; sh:maxCount 1 ; - sh:order 10 ; - sh:path sssom:subject_type ], + sh:order 13 ; + sh:path sssom:object_type ], + [ sh:datatype rdfs:Resource ; + 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:nodeKind sh:Literal ; + sh:order 24 ; + sh:path sssom:object_preprocessing ], [ sh:datatype xsd:anyURI ; sh:description "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 16 ; 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:nodeKind sh:Literal ; + sh:order 20 ; + 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:nodeKind sh:Literal ; sh:order 18 ; sh:path sssom:mapping_tool_version ], - [ sh:description "A list of properties (term annotations on the object) that was used for the match." ; - sh:order 22 ; - sh:path sssom:object_match_field ], - [ sh:datatype xsd:string ; - sh:description "A version string for the mapping." ; - sh:maxCount 1 ; - sh:order 3 ; - sh:path owl:versionInfo ], - [ sh:datatype xsd:anyURI ; - sh:description "A URL location of the issue tracker for this entity." ; - sh:maxCount 1 ; - sh:order 26 ; - sh:path sssom:issue_tracker ], - [ sh:description "URI of vocabulary or identifier source for the subject." ; - sh:maxCount 1 ; - sh:order 11 ; - sh:path sssom:subject_source ], [ sh:datatype xsd:string ; sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 27 ; sh:path sssom:other ], - [ sh:description "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; - sh:order 23 ; - sh:path sssom:subject_preprocessing ], - [ sh:description "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; - sh:order 24 ; - sh:path sssom:object_preprocessing ], - [ sh:datatype xsd:anyURI ; - sh:description "A url to the license of the mapping. In absence of a license we assume no license." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 9 ; - sh:path dcterms:license ], [ sh:datatype xsd:string ; - sh:description "Version IRI or version string of the source of the object term." ; - sh:maxCount 1 ; - sh:order 15 ; - sh:path sssom:object_source_version ], - [ sh:class sssom:ExtensionDefinition ; - sh:description "A list that defines the extension slots used in the mapping set." ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 29 ; - sh:path sssom:extension_definitions ], - [ sh:datatype xsd:anyURI ; - sh:description "A mapping set or set of mapping set that was used to derive the mapping set." ; - sh:order 4 ; - sh:path prov:wasDerivedFrom ], - [ sh:description "A list of properties (term annotations on the subject) that was used for the match." ; - sh:order 21 ; - sh:path sssom:subject_match_field ], - [ sh:datatype xsd:string ; - sh:description "Version IRI or version string of the source of the subject term." ; - sh:maxCount 1 ; - sh:order 12 ; - sh:path sssom:subject_source_version ], - [ sh:datatype xsd:anyURI ; - sh:description "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable." ; + sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 2 ; - sh:path sssom:mapping_set_id ] ; + sh:nodeKind sh:Literal ; + sh:order 28 ; + sh:path rdfs:comment ] ; sh:targetClass sssom:MappingSet . sssom:NoTermFound a sh:NodeShape ; @@ -210,6 +250,7 @@ sssom:Propagatable a sh:NodeShape ; 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:nodeKind sh:Literal ; sh:order 0 ; sh:path sssom:propagated ] ; sh:targetClass sssom:Propagatable . @@ -219,224 +260,281 @@ owl:Axiom a sh:NodeShape ; sh:description "Represents an individual mapping between a pair of entities" ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype xsd:string ; - sh:description "Version IRI or version string of the source of the object term." ; + sh: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:nodeKind sh:Literal ; + sh:order 40 ; + sh:path rdfs:seeAlso ], + [ sh:description "A modifier for negating the predicate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" ; + sh:in ( "Not" ) ; sh:maxCount 1 ; - sh:order 22 ; - sh:path sssom:object_source_version ], + sh:order 5 ; + sh:path sssom:predicate_modifier ], + [ sh:datatype rdfs:Resource ; + 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:nodeKind sh:Literal ; + sh:order 36 ; + sh:path sssom:subject_preprocessing ], [ sh:datatype xsd:string ; - sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; + sh:description "The 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 43 ; - sh:path rdfs:comment ], + sh:nodeKind sh:Literal ; + sh:order 8 ; + sh:path sssom:object_category ], [ sh:datatype xsd:string ; - sh:description "The label of object of the mapping" ; - sh:maxCount 1 ; - sh:order 7 ; - sh:path sssom:object_label ], - [ sh:description "The issue tracker item discussing this mapping." ; + sh:description "The measure used for computing a similarity score. This field is meant to be used in conjunction with the similarity_score field, to document, for example, the lexical or semantic match of a matching algorithm. To make processing this field as unambiguous as possible, we recommend using wikidata CURIEs, but the type of this field is deliberately unspecified." ; sh:maxCount 1 ; - sh:order 41 ; - sh:path sssom:issue_tracker_item ], - [ sh:description "The ID of the predicate or relation that relates the subject and object of this match." ; + sh:nodeKind sh:Literal ; + sh:order 39 ; + sh:path sssom:similarity_measure ], + [ sh:datatype rdfs:Resource ; + sh:description "URI of vocabulary or identifier source for the object." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 3 ; - sh:path owl:annotatedProperty ], + sh:nodeKind sh:Literal ; + sh:order 21 ; + sh:path sssom:object_source ], [ sh:datatype xsd:string ; - sh:description "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases." ; - sh:maxCount 1 ; - sh:order 2 ; - sh:path sssom:subject_category ], - [ sh:description "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:datatype xsd:anyURI ; - sh:description "A url to the license of the mapping. In absence of a license we assume no license." ; + sh:description "The label of object of the mapping" ; sh:maxCount 1 ; - sh:order 16 ; - sh:path dcterms:license ], - [ 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:nodeKind sh:Literal ; + sh:order 7 ; + sh:path sssom:object_label ], + [ sh:datatype rdfs:Resource ; + sh:description "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; + sh:nodeKind sh:Literal ; + sh:order 10 ; + sh:path pav:authoredBy ], + [ sh:datatype rdfs:Resource ; + 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:maxInclusive 1e+00 ; - sh:minInclusive 0e+00 ; - sh:order 30 ; - sh:path sssom:confidence ], + sh:nodeKind sh:Literal ; + sh:order 24 ; + sh:path sssom:mapping_source ], [ sh:datatype xsd:string ; - sh:description "Version string that denotes the version of the mapping tool used." ; + sh:description "Version IRI or version string of the source of the subject term." ; sh:maxCount 1 ; - sh:order 27 ; - sh:path sssom:mapping_tool_version ], - [ 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: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:nodeKind sh:Literal ; + sh:order 19 ; + sh:path sssom:subject_source_version ], [ 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:nodeKind sh:Literal ; sh:order 13 ; sh:path sssom:reviewer_label ], [ sh:datatype xsd:string ; - sh:description "String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots." ; - sh:order 35 ; - sh:path sssom:match_string ], - [ sh:description "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule is captured as a resource rather than a string, which enables higher levels of transparency and sharing across mapping sets. The URI representation of the curation rule is expected to be a resolvable identifier which provides details about the nature of the curation rule." ; - sh:order 31 ; - sh:path sssom:curation_rule ], - [ sh:datatype xsd:string ; - sh:description "Version IRI or version string of the source of the subject term." ; - sh:maxCount 1 ; - sh:order 19 ; - sh:path sssom:subject_source_version ], - [ sh:datatype xsd:string ; - sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; + sh:description "A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead." ; + sh:nodeKind sh:Literal ; + sh:order 11 ; + sh:path sssom:author_label ], + [ sh:datatype xsd:date ; + sh:description "The date the mapping was published. This is different from the date the mapping was asserted." ; sh:maxCount 1 ; - sh:order 42 ; - sh:path sssom:other ], - [ sh:description "The ID of the object of the mapping." ; + sh:nodeKind sh:Literal ; + sh:order 29 ; + sh:path dcterms:created ], + [ 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:order 6 ; - sh:path owl:annotatedTarget ], + sh:or ( [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] ) ; + sh:order 9 ; + sh:path sssom:mapping_justification ], [ sh:datatype xsd:string ; sh:description "The label of subject of the mapping" ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 1 ; sh:path sssom:subject_label ], - [ sh:datatype xsd:date ; - sh:description "The date the mapping was published. This is different from the date the mapping was asserted." ; + [ sh:datatype rdfs:Resource ; + 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:nodeKind sh:Literal ; + sh:order 31 ; + sh:path sssom:curation_rule ], + [ 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:nodeKind sh:Literal ; + sh:order 32 ; + sh:path sssom:curation_rule_text ], + [ 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 29 ; - sh:path dcterms:created ], - [ sh:description "A list of properties (term annotations on the object) that was used for the match." ; + sh:maxInclusive 1e+00 ; + sh:minInclusive 0e+00 ; + sh:nodeKind sh:Literal ; + sh:order 30 ; + sh:path sssom:confidence ], + [ 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:nodeKind sh:Literal ; + sh:order 26 ; + sh:path sssom:mapping_tool ], + [ sh:datatype rdfs:Resource ; + sh:description "URI of vocabulary or identifier source for the subject." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 18 ; + sh:path sssom:subject_source ], + [ sh:datatype rdfs:Resource ; + sh:description "A list of properties (term annotations on the object) that was used for the match." ; + sh:nodeKind sh:Literal ; sh:order 34 ; sh:path sssom:object_match_field ], - [ sh:description "The ID of the subject of the mapping." ; + [ 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:minCount 1 ; - sh:order 0 ; - sh:path owl:annotatedSource ], - [ sh:description "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; + sh:order 17 ; + sh:path sssom:subject_type ], + [ sh:datatype rdfs:Resource ; + 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:nodeKind sh:Literal ; sh:order 14 ; sh:path dcterms:creator ], + [ sh:datatype rdfs:Resource ; + 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:nodeKind sh:Literal ; + sh:order 12 ; + sh:path sssom:reviewer_id ], + [ sh:datatype rdfs:Resource ; + 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:nodeKind sh:Literal ; + sh:order 37 ; + sh:path sssom:object_preprocessing ], + [ sh:datatype rdfs:Resource ; + sh:description "The ID of the object of the mapping." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path owl:annotatedTarget ], [ 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:nodeKind sh:Literal ; sh:order 28 ; sh:path pav:authoredOn ], + [ sh:datatype xsd:double ; + sh:description "A score between 0 and 1 to denote the similarity between two entities, where 1 denotes equivalence, and 0 denotes disjointness. The score is meant to be used in conjunction with the similarity_measure field, to document, for example, the lexical or semantic match of a matching algorithm." ; + sh:maxCount 1 ; + sh:maxInclusive 1e+00 ; + sh:minInclusive 0e+00 ; + sh:nodeKind sh:Literal ; + sh:order 38 ; + sh:path sssom:similarity_score ], [ sh:datatype xsd:string ; sh:description "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases." ; sh:maxCount 1 ; - sh:order 8 ; - sh:path sssom:object_category ], - [ sh:description "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set." ; - sh:in ( "1:1" "1:n" "n:1" "1:0" "0:1" "n:n" ) ; - sh:maxCount 1 ; - sh:order 25 ; - sh:path sssom:mapping_cardinality ], - [ sh:description "The type of entity that is being mapped." ; - sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; - sh:maxCount 1 ; - sh:order 17 ; - sh:path sssom:subject_type ], - [ sh:description "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; - sh:order 36 ; - sh:path sssom:subject_preprocessing ], - [ sh:description "The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another." ; - sh:maxCount 1 ; - sh:order 24 ; - sh:path sssom:mapping_source ], - [ sh:description "Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 12 ; - sh:path sssom:reviewer_id ], - [ sh:description "URI of vocabulary or identifier source for the object." ; + sh:nodeKind sh:Literal ; + sh:order 2 ; + sh:path sssom:subject_category ], + [ sh:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the object term." ; sh:maxCount 1 ; - sh:order 21 ; - sh:path sssom:object_source ], + sh:nodeKind sh:Literal ; + sh:order 22 ; + sh:path sssom:object_source_version ], [ sh:datatype xsd:string ; sh:description "The label of the predicate/relation of the mapping" ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 4 ; sh:path sssom:predicate_label ], [ 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 "The measure used for computing a similarity score. This field is meant to be used in conjunction with the similarity_score field, to document, for example, the lexical or semantic match of a matching algorithm. To make processing this field as unambiguous as possible, we recommend using wikidata CURIEs, but the type of this field is deliberately unspecified." ; + sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; sh:maxCount 1 ; - sh:order 39 ; - sh:path sssom:similarity_measure ], + sh:nodeKind sh:Literal ; + sh:order 43 ; + sh:path rdfs:comment ], + [ sh:datatype rdfs:Resource ; + sh:description "A list of properties (term annotations on the subject) that was used for the match." ; + sh:nodeKind sh:Literal ; + sh:order 33 ; + sh:path sssom:subject_match_field ], [ 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: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:description "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 10 ; - sh:path pav:authoredBy ], - [ sh:description "A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable." ; + sh: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:minCount 1 ; - sh:or ( [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] ) ; - sh:order 9 ; - sh:path sssom:mapping_justification ], - [ sh:datatype xsd:double ; - sh:description "A score between 0 and 1 to denote the similarity between two entities, where 1 denotes equivalence, and 0 denotes disjointness. The score is meant to be used in conjunction with the similarity_measure field, to document, for example, the lexical or semantic match of a matching algorithm." ; + sh:nodeKind sh:Literal ; + sh:order 42 ; + sh:path sssom:other ], + [ 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:maxInclusive 1e+00 ; - sh:minInclusive 0e+00 ; - sh:order 38 ; - sh:path sssom:similarity_score ], - [ sh:description "A list of properties (term annotations on the subject) that was used for the match." ; - sh:order 33 ; - sh:path sssom:subject_match_field ], + sh:nodeKind sh:Literal ; + sh:order 16 ; + sh:path dcterms:license ], [ 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:nodeKind sh:Literal ; sh:order 23 ; sh:path sssom:mapping_provider ], + [ 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:datatype rdfs:Resource ; + sh:description "The issue tracker item discussing this mapping." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 41 ; + sh:path sssom:issue_tracker_item ], [ sh:datatype xsd:string ; - sh:description "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text." ; + sh:description "Version string that denotes the version of the mapping tool used." ; sh:maxCount 1 ; - sh:order 26 ; - sh:path sssom:mapping_tool ], - [ sh:description "URI of vocabulary or identifier source for the subject." ; + sh:nodeKind sh:Literal ; + sh:order 27 ; + sh:path sssom:mapping_tool_version ], + [ 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:nodeKind sh:Literal ; + sh:order 15 ; + sh:path sssom:creator_label ], + [ sh:datatype rdfs:Resource ; + sh:description "The ID of the subject of the mapping." ; sh:maxCount 1 ; - sh:order 18 ; - sh:path sssom:subject_source ], - [ sh:description "A modifier for negating the predicate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" ; - sh:in ( "Not" ) ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path owl:annotatedSource ], + [ 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 5 ; - sh:path sssom:predicate_modifier ] ; + sh:order 20 ; + sh:path sssom:object_type ], + [ 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:nodeKind sh:Literal ; + sh:order 35 ; + sh:path sssom:match_string ], + [ sh:datatype rdfs:Resource ; + 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:nodeKind sh:Literal ; + sh:order 3 ; + sh:path owl:annotatedProperty ] ; 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:datatype xsd:string ; - sh:description "The name of the extension slot." ; + sh:property [ sh:datatype xsd:anyURI ; + sh:description "The property associated with the extension slot. It is intended to provide a non-ambiguous meaning to the slot (contrary to the slot_name, which for brevity reasons may be ambiguous)." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 0 ; - sh:path sssom:slot_name ], - [ sh:description "Expected type of the values of the extension slot." ; + sh:nodeKind sh:Literal ; + sh:order 1 ; + sh:path sssom:property ], + [ sh:datatype xsd:anyURI ; + sh:description "Expected type of the values of the extension slot." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 2 ; sh:path sssom:type_hint ], - [ 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:datatype xsd:string ; + sh:description "The name of the extension slot." ; sh:maxCount 1 ; - sh:order 1 ; - sh:path sssom:property ] ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path sssom:slot_name ] ; sh:targetClass sssom:ExtensionDefinition . sssom:MappingSetReference a sh:NodeShape ; @@ -447,31 +545,37 @@ sssom:MappingSetReference a sh:NodeShape ; 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:nodeKind sh:Literal ; sh:order 0 ; sh:path sssom:mapping_set_id ], - [ sh:datatype xsd:anyURI ; - sh:description "A URL location from which to obtain a resource, such as a mapping set." ; - sh:maxCount 1 ; - sh:order 1 ; - sh:path sssom:mirror_from ], [ sh:datatype xsd:string ; sh:description "Set by the owners of the mapping registry. A way to group ." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 3 ; sh:path sssom:mapping_set_group ], [ sh:datatype xsd:date ; sh:description "The date this reference was last updated." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 4 ; sh:path sssom:last_updated ], [ 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:nodeKind sh:Literal ; sh:order 2 ; sh:path sssom:registry_confidence ], + [ sh:datatype xsd:anyURI ; + sh:description "A URL location from which to obtain a resource, such as a mapping set." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 1 ; + sh:path sssom:mirror_from ], [ sh:datatype xsd:string ; sh:description "The local name assigned to file that corresponds to the downloaded mapping set." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 5 ; sh:path sssom:local_name ] ; sh:targetClass sssom:MappingSetReference . @@ -481,10 +585,12 @@ sssom:Prefix a sh:NodeShape ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype xsd:anyURI ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 1 ; sh:path sssom:prefix_url ], [ sh:datatype xsd:string ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 0 ; sh:path sssom:prefix_name ] ; sh:targetClass sssom:Prefix . diff --git a/project/shex/sssom_schema.shex b/project/shex/sssom_schema.shex index 78c7304b..18988b2e 100644 --- a/project/shex/sssom_schema.shex +++ b/project/shex/sssom_schema.shex @@ -1,3 +1,4 @@ +# metamodel_version: 1.7.0 BASE PREFIX prov: PREFIX skos: @@ -60,13 +61,13 @@ linkml:Sparqlpath xsd:string } CLOSED { - ( $ ( owl:annotatedSource @ ; + ( $ ( owl:annotatedSource @ ? ; @linkml:String ? ; @linkml:String ? ; owl:annotatedProperty @ ; @linkml:String ? ; [ ] ? ; - owl:annotatedTarget @ ; + owl:annotatedTarget @ ? ; @linkml:String ? ; @linkml:String ? ; @ ; @@ -198,4 +199,3 @@ linkml:Sparqlpath xsd:string ) } - diff --git a/project/sqlschema/sssom_schema.sql b/project/sqlschema/sssom_schema.sql index 7aa0506f..792c76fa 100644 --- a/project/sqlschema/sssom_schema.sql +++ b/project/sqlschema/sssom_schema.sql @@ -219,13 +219,13 @@ CREATE TABLE "NoTermFound" ( ); CREATE TABLE mapping ( id INTEGER NOT NULL, - subject_id TEXT NOT NULL, + subject_id TEXT, subject_label TEXT, subject_category TEXT, predicate_id TEXT NOT NULL, predicate_label TEXT, predicate_modifier VARCHAR(3), - object_id TEXT NOT NULL, + object_id TEXT, object_label TEXT, object_category TEXT, mapping_justification TEXT NOT NULL, diff --git a/src/sssom_schema/context/sssom_schema.context.jsonld b/src/sssom_schema/context/sssom_schema.context.jsonld index 390edf8f..df8b722e 100644 --- a/src/sssom_schema/context/sssom_schema.context.jsonld +++ b/src/sssom_schema/context/sssom_schema.context.jsonld @@ -1,7 +1,7 @@ { "comments": { "description": "Auto generated by LinkML jsonld context generator", - "generation_date": "2024-08-06T18:58:48", + "generation_date": "2024-08-09T22:25:39", "source": "sssom_schema.yaml" }, "@context": { diff --git a/src/sssom_schema/context/sssom_schema.jsonld b/src/sssom_schema/context/sssom_schema.jsonld index f894b457..02ed5bfb 100644 --- a/src/sssom_schema/context/sssom_schema.jsonld +++ b/src/sssom_schema/context/sssom_schema.jsonld @@ -426,7 +426,13 @@ }, { "text": "rdfs literal", - "meaning": "rdfs:Literal" + "description": "This value indicate that the entity being mapped is not a semantic entity with a distinct identifier, but is instead represented entirely by its literal label. This value MUST NOT be used in the predicate_type slot.", + "meaning": "rdfs:Literal", + "see_also": [ + "https://mapping-commons.github.io/sssom/spec-model/#literal-mappings", + "https://github.com/mapping-commons/sssom/issues/234", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/literals.sssom.tsv" + ] }, { "text": "rdfs datatype", @@ -715,7 +721,6 @@ "Mapping" ], "range": "EntityReference", - "required": true, "@type": "SlotDefinition" }, { @@ -966,7 +971,6 @@ "Mapping" ], "range": "EntityReference", - "required": true, "@type": "SlotDefinition" }, { @@ -2185,6 +2189,110 @@ ], "slot_usage": {}, "class_uri": "http://www.w3.org/2002/07/owl#Axiom", + "rules": [ + { + "preconditions": { + "slot_conditions": [ + { + "name": "subject_type", + "equals_string": "rdfs literal", + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "postconditions": { + "slot_conditions": [ + { + "name": "subject_label", + "required": true, + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "@type": "ClassRule" + }, + { + "preconditions": { + "slot_conditions": [ + { + "name": "subject_type", + "none_of": [ + { + "equals_string": "rdfs literal", + "@type": "AnonymousSlotExpression" + } + ], + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "postconditions": { + "slot_conditions": [ + { + "name": "subject_id", + "required": true, + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "@type": "ClassRule" + }, + { + "preconditions": { + "slot_conditions": [ + { + "name": "object_type", + "equals_string": "rdfs literal", + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "postconditions": { + "slot_conditions": [ + { + "name": "object_label", + "required": true, + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "@type": "ClassRule" + }, + { + "preconditions": { + "slot_conditions": [ + { + "name": "object_type", + "none_of": [ + { + "equals_string": "rdfs literal", + "@type": "AnonymousSlotExpression" + } + ], + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "postconditions": { + "slot_conditions": [ + { + "name": "object_id", + "required": true, + "@type": "SlotDefinition" + } + ], + "@type": "AnonymousClassExpression" + }, + "@type": "ClassRule" + } + ], "@type": "ClassDefinition" }, { @@ -2315,9 +2423,9 @@ ], "metamodel_version": "1.7.0", "source_file": "sssom_schema.yaml", - "source_file_date": "2024-08-06T18:58:28", - "source_file_size": 31410, - "generation_date": "2024-08-06T18:58:48", + "source_file_date": "2024-08-09T22:23:57", + "source_file_size": 32836, + "generation_date": "2024-08-09T22:25:39", "@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 aee3262c..abb99ba3 100644 --- a/src/sssom_schema/datamodel/sssom_schema.py +++ b/src/sssom_schema/datamodel/sssom_schema.py @@ -1,5 +1,5 @@ # Auto generated from sssom_schema.yaml by pythongen.py version: 0.0.1 -# Generation date: 2024-08-06T18:58:49 +# Generation date: 2024-08-09T22:25:39 # Schema: sssom # # id: https://w3id.org/sssom/schema/ @@ -222,14 +222,14 @@ class Mapping(YAMLRoot): class_name: ClassVar[str] = "mapping" class_model_uri: ClassVar[URIRef] = SSSOM.Mapping - subject_id: Union[str, EntityReference] = None predicate_id: Union[str, EntityReference] = None - object_id: Union[str, EntityReference] = None mapping_justification: Union[str, EntityReference] = None + subject_id: Optional[Union[str, EntityReference]] = None subject_label: Optional[str] = None subject_category: Optional[str] = None predicate_label: Optional[str] = None predicate_modifier: Optional[Union[str, "PredicateModifierEnum"]] = None + object_id: Optional[Union[str, EntityReference]] = None object_label: Optional[str] = None object_category: Optional[str] = None author_id: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() @@ -268,26 +268,19 @@ class Mapping(YAMLRoot): comment: Optional[str] = None def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): - if self._is_empty(self.subject_id): - self.MissingRequiredField("subject_id") - if not isinstance(self.subject_id, EntityReference): - self.subject_id = EntityReference(self.subject_id) - 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.subject_id is not None and not isinstance(self.subject_id, EntityReference): + self.subject_id = EntityReference(self.subject_id) + if self.subject_label is not None and not isinstance(self.subject_label, str): self.subject_label = str(self.subject_label) @@ -300,6 +293,9 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.predicate_modifier is not None and not isinstance(self.predicate_modifier, PredicateModifierEnum): self.predicate_modifier = PredicateModifierEnum(self.predicate_modifier) + if self.object_id is not None and not isinstance(self.object_id, EntityReference): + self.object_id = EntityReference(self.object_id) + if self.object_label is not None and not isinstance(self.object_label, str): self.object_label = str(self.object_label) @@ -655,6 +651,7 @@ def _addvals(cls): setattr(cls, "rdfs literal", PermissibleValue( text="rdfs literal", + description="""This value indicate that the entity being mapped is not a semantic entity with a distinct identifier, but is instead represented entirely by its literal label. This value MUST NOT be used in the predicate_type slot.""", meaning=RDFS["Literal"])) setattr(cls, "rdfs datatype", PermissibleValue( @@ -758,7 +755,7 @@ class slots: model_uri=SSSOM.mappings, domain=None, range=Optional[Union[Union[dict, Mapping], List[Union[dict, Mapping]]]]) 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]) + model_uri=SSSOM.subject_id, domain=None, range=Optional[Union[str, EntityReference]]) 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]) @@ -782,7 +779,7 @@ class slots: model_uri=SSSOM.predicate_type, domain=None, range=Optional[Union[str, "EntityTypeEnum"]]) slots.object_id = Slot(uri=OWL.annotatedTarget, name="object_id", curie=OWL.curie('annotatedTarget'), - model_uri=SSSOM.object_id, domain=None, range=Union[str, EntityReference]) + model_uri=SSSOM.object_id, domain=None, range=Optional[Union[str, EntityReference]]) slots.object_label = Slot(uri=SSSOM.object_label, name="object_label", curie=SSSOM.curie('object_label'), model_uri=SSSOM.object_label, domain=None, range=Optional[str])