Skip to content

Commit

Permalink
Update generated SSSOM schema files (#388)
Browse files Browse the repository at this point in the history
Last commit before #189!

This is the usual update with `make all` (generating all downstream
python files).

This is going to be the final model update before sssom 1.0.
  • Loading branch information
matentzn authored Aug 9, 2024
1 parent 73a7f66 commit 658de42
Show file tree
Hide file tree
Showing 13 changed files with 720 additions and 305 deletions.
Binary file modified project/excel/sssom_schema.xlsx
Binary file not shown.
5 changes: 3 additions & 2 deletions project/graphql/sssom_schema.graphql
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# metamodel_version: 1.7.0
type ExtensionDefinition
{
slotName: Ncname!
Expand All @@ -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!
Expand Down
2 changes: 1 addition & 1 deletion project/jsonld/sssom_schema.context.jsonld
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
120 changes: 114 additions & 6 deletions project/jsonld/sssom_schema.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -715,7 +721,6 @@
"Mapping"
],
"range": "EntityReference",
"required": true,
"@type": "SlotDefinition"
},
{
Expand Down Expand Up @@ -966,7 +971,6 @@
"Mapping"
],
"range": "EntityReference",
"required": true,
"@type": "SlotDefinition"
},
{
Expand Down Expand Up @@ -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"
},
{
Expand Down Expand Up @@ -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",
Expand Down
96 changes: 94 additions & 2 deletions project/jsonschema/sssom_schema.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -301,9 +395,7 @@
}
},
"required": [
"subject_id",
"predicate_id",
"object_id",
"mapping_justification"
],
"title": "Mapping",
Expand Down
2 changes: 1 addition & 1 deletion project/prefixmap/sssom_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"Mapping": {
"@id": "owl:Axiom"
}
}
}
3 changes: 3 additions & 0 deletions project/protobuf/sssom_schema.proto
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
syntax="proto3";
package
// metamodel_version: 1.7.0
// A definition of an extension (non-standard) slot.
message ExtensionDefinition
{
Expand Down
Loading

0 comments on commit 658de42

Please sign in to comment.