diff --git a/schema/Concept.slot_jsonschema.json b/schema/Concept.slot_jsonschema.json new file mode 100644 index 0000000..30b7db5 --- /dev/null +++ b/schema/Concept.slot_jsonschema.json @@ -0,0 +1,25 @@ +{ + "@context": [ + "https://oo-ld.github.io/glossary-api/schema/Entity.slot_jsonschema.json" + ], + "allOf": [ + { + "$ref": "https://oo-ld.github.io/glossary-api/schema/Entity.slot_jsonschema.json" + } + ], + "$comment": "A Concept is an Entity, so we import the context (per @context) and schema (per allOf.$ref) of Entity", + "title": "Concept", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$comment": "Already defined in sentier:Entity -> we override just the default", + "default": "sentier:Concept" + }, + "iri": { + "default": "sentier:Concept" + } + } +} diff --git a/schema/ConceptSchema.slot_jsonschema.json b/schema/ConceptSchema.slot_jsonschema.json new file mode 100644 index 0000000..a17a87f --- /dev/null +++ b/schema/ConceptSchema.slot_jsonschema.json @@ -0,0 +1,37 @@ +{ + "@context": [ + "https://oo-ld.github.io/glossary-api/schema/Entity.slot_jsonschema.json", + { + "members": "dcterms:hasPart" + } + ], + "allOf": [ + { + "$ref": "https://oo-ld.github.io/glossary-api/schema/Entity.slot_jsonschema.json" + } + ], + "$comment": "A ConceptSchema is an Entity, so we import the context (per @context) and schema (per allOf.$ref) of Entity", + "title": "ConceptSchema", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$comment": "Already defined in sentier:Entity -> we override just the default", + "default": "sentier:ConceptSchema" + }, + "iri": { + "default": "sentier:MyConceptSchema" + }, + "members": { + "type": "array", + "title": "Members", + "propertyOrder": 2000, + "items": { + "type": "string", + "title": "Concept" + } + } + } +} diff --git a/schema/Entity.slot_jsonschema.json b/schema/Entity.slot_jsonschema.json new file mode 100644 index 0000000..0484e62 --- /dev/null +++ b/schema/Entity.slot_jsonschema.json @@ -0,0 +1,122 @@ +{ + "@context": { + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "owl": "http://www.w3.org/2002/07/owl#", + "skos": "https://www.w3.org/TR/skos-reference/", + "dcterms": "http://purl.org/dc/terms/", + "schema": "https://schema.org/", + "sentier": "https://oo-ld.github.io/glossary-api/", + "type": "@type", + "iri": "@id", + "labels": { + "@id": "skos:prefLabel", + "@context": { + "text": "@value", + "lang": "@language" + } + }, + "version": "owl:versionInfo", + "previous_version": "owl:priorVersion", + "documentation": "rdfs:seeAlso", + "source": "rdfs:isDefinedBy", + "licence": "dcterms:license", + "authors": { + "@id": "dcterms:creator", + "@context": { + "name": "schema:name" + } + } + }, + "title": "Entity", + "type": "object", + "required": [ + "labels" + ], + "properties": { + "type": { + "type": "string", + "default": "sentier:Entity" + }, + "iri": { + "type": "string", + "title": "IRI" + }, + "labels": { + "type": "array", + "format": "table", + "title": "Label(s)", + "description": "Label(s) of the entity", + "items": { + "type": "object", + "title": "Label", + "properties": { + "text": { + "type": "string", + "minlength": 1 + }, + "lang": { + "type": "string", + "enum": [ + "en", + "de", + "fr" + ], + "options": { + "input_width": "100px" + } + } + } + }, + "default": [ + { + "text": "Unnamed", + "lang": "en" + } + ], + "minItems": 1 + }, + "version": { + "type": "string", + "title": "version", + "default": "1.0.0" + }, + "previous_version": { + "type": "string", + "title": "Previous Version IRI" + }, + "documentation": { + "type": "string", + "title": "Documentation" + }, + "source": { + "type": "string", + "title": "Source / external definition" + }, + "licence": { + "type": "string", + "enum": [ + "https://creativecommons.org/public-domain/cc0/", + "https://creativecommons.org/licenses/by/4.0/" + ], + "options": { + "enum_titles": [ + "CC0", + "CC-BY" + ] + } + }, + "authors": { + "type": "array", + "format": "table", + "title": "Authors", + "items": { + "properties": { + "name": { + "type": "string" + } + } + } + } + } +} diff --git a/schema/Process.slot_jsonschema.json b/schema/Process.slot_jsonschema.json new file mode 100644 index 0000000..fd3f880 --- /dev/null +++ b/schema/Process.slot_jsonschema.json @@ -0,0 +1,66 @@ +{ + "@context": [ + "https://oo-ld.github.io/glossary-api/schema/Entity.slot_jsonschema.json", + { + "bonsai": "http://rdf.bonsai.uno/activitytype/exiobase3_3_17/", + "inputs": { + "@reverse": "bonsai:inputOf", + "@type": "@id" + }, + "outputs": { + "@reverse": "bonsai:outputOf", + "@type": "@id" + } + } + ], + "allOf": [ + { + "$ref": "https://oo-ld.github.io/glossary-api/schema/Entity.slot_jsonschema.json" + } + ], + "$comment": "A Process is an Entity, so we import the context (per @context) and schema (per allOf.$ref) of Entity", + "title": "Process", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$comment": "Already defined in sentier:Entity -> we override just the default", + "default": "sentier:Process" + }, + "iri": { + "default": "sentier:MyProcess" + }, + "inputs": { + "type": "array", + "format": "table", + "description": "One or multiple products", + "propertyOrder": 2000, + "items": { + "type": "string", + "title": "Products", + "$comment": "Enum just for testing", + "enum": [ + "sentier:Steel", + "sentier:Concrete" + ] + } + }, + "outputs": { + "type": "array", + "format": "table", + "description": "One or multiple products", + "propertyOrder": 2001, + "items": { + "type": "string", + "title": "Products", + "$comment": "Enum just for testing", + "enum": [ + "sentier:WindGenerator", + "sentier:Waste" + ] + } + } + } +} diff --git a/schema/Product.slot_jsonschema.json b/schema/Product.slot_jsonschema.json new file mode 100644 index 0000000..6eff224 --- /dev/null +++ b/schema/Product.slot_jsonschema.json @@ -0,0 +1,36 @@ +{ + "@context": [ + "https://oo-ld.github.io/glossary-api/schema/Entity.slot_jsonschema.json", + { + "bonsai": "http://rdf.bonsai.uno/activitytype/exiobase3_3_17/", + "inputs": { + "@reverse": "bonsai:inputOf", + "@type": "@id" + }, + "outputs": { + "@reverse": "bonsai:outputOf", + "@type": "@id" + } + } + ], + "allOf": [ + { + "$ref": "https://oo-ld.github.io/glossary-api/schema/Entity.slot_jsonschema.json" + } + ], + "$comment": "A Product is an Entity, so we import the context (per @context) and schema (per allOf.$ref) of Entity", + "title": "Product", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$comment": "Already defined in sentier:Entity -> we override just the default", + "default": "sentier:Product" + }, + "iri": { + "default": "sentier:MyProduct" + } + } +}