diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 614e485..71356bf 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -27,10 +27,28 @@ jobs: run: | python -m pip install check-jsonschema - - name: Run Unit schema validation + - name: Run JSON schema validation run: | + check-jsonschema -o json --schemafile schema/basisset.json examples/sections/basisset.jsonld + check-jsonschema -o json --schemafile schema/calculation.json examples/sections/calculation.jsonld + check-jsonschema -o json --schemafile schema/chemical.json examples/sections/chemical.jsonld + check-jsonschema -o json --schemafile schema/computer.json examples/sections/computer.jsonld + check-jsonschema -o json --schemafile schema/dataseries.json examples/sections/dataseries.jsonld + check-jsonschema -o json --schemafile schema/dataset.json examples/sections/dataset.jsonld + check-jsonschema -o json --schemafile schema/framework_outline.json examples/sections/framework_outline.jsonld + check-jsonschema -o json --schemafile schema/framework_plus.json examples/sections/framework_plus.jsonld + check-jsonschema -o json --schemafile schema/framework.json examples/sections/framework.jsonld + check-jsonschema -o json --schemafile schema/measurement.json examples/sections/measurement.jsonld + check-jsonschema -o json --schemafile schema/methodology.json examples/sections/methodology_cc.jsonld + check-jsonschema -o json --schemafile schema/methodology.json examples/sections/methodology_exp.jsonld + check-jsonschema -o json --schemafile schema/mixture.json examples/sections/mixture.jsonld + check-jsonschema -o json --schemafile schema/molsystem.json examples/sections/molsystem.jsonld + check-jsonschema -o json --schemafile schema/parameter.json examples/sections/parameter.jsonld + check-jsonschema -o json --schemafile schema/procedure.json examples/sections/procedure.jsonld + check-jsonschema -o json --schemafile schema/resource.json examples/sections/resource.jsonld + check-jsonschema -o json --schemafile schema/software.json examples/sections/software.jsonld + check-jsonschema -o json --schemafile schema/substance.json examples/sections/substance.jsonld + check-jsonschema -o json --schemafile schema/system.json examples/sections/system_cc.jsonld + check-jsonschema -o json --schemafile schema/system.json examples/sections/system_exp.jsonld check-jsonschema -o json --schemafile schema/unit.json examples/sections/unit.jsonld - - - name: Run Value schema validation - run: | check-jsonschema -o json --schemafile schema/value.json examples/sections/value.jsonld diff --git a/examples/sections/basisset.jsonld b/examples/sections/basisset.jsonld index a089037..79b0fcc 100755 --- a/examples/sections/basisset.jsonld +++ b/examples/sections/basisset.jsonld @@ -5,7 +5,7 @@ "dct": "http://purl.org/dc/terms/", "gc": "http://purl.org/gc/", "obo": "http://purl.obolibrary.org/obo/", - "wd": "http://www.wikidata.org/entity/", + "wd": "http://www.wikidata.org/entity/" }, {"@base": "https://stuchalk.github.io/scidata/examples/sections/basisset/"} ], @@ -72,4 +72,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/examples/sections/measurement.jsonld b/examples/sections/measurement.jsonld index b2b05b9..5485567 100755 --- a/examples/sections/measurement.jsonld +++ b/examples/sections/measurement.jsonld @@ -2,8 +2,8 @@ "@context": [ "https://stuchalk.github.io/scidata/contexts/crg_measurement.jsonld", { - "sdo": "https://stuchalk.github.io/scidata/ontology/scidata.owl#" - "cao": "https://champ.stuchalk.domains.unf.edu/images/ontology/cao.owl#", + "sdo": "https://stuchalk.github.io/scidata/ontology/scidata.owl#", + "cao": "https://champ.stuchalk.domains.unf.edu/images/ontology/cao.owl#" }, {"@base": "https://stuchalk.github.io/scidata/examples/sections/measurement"} ], @@ -91,4 +91,4 @@ } } ] -} \ No newline at end of file +} diff --git a/examples/sections/procedure.jsonld b/examples/sections/procedure.jsonld index 9f40952..c7ebde0 100755 --- a/examples/sections/procedure.jsonld +++ b/examples/sections/procedure.jsonld @@ -4,7 +4,7 @@ { "afr": "http://purl.allotrope.org/ontologies/result#", "afre": "http://purl.allotrope.org/ontologies/realizable", - "repome": "https://w3id.org/reproduceme#", + "repome": "https://w3id.org/reproduceme#" }, {"@base": "https://stuchalk.github.io/scidata/examples/procedure/"} ], @@ -70,4 +70,4 @@ ], "notes": "If the electrode is not in 'Good condition' repeat the calibration procedure. If it is still not showing 'Good condition' report to your supervisor and obtain a replacement." } -} \ No newline at end of file +} diff --git a/schema/basisset.json b/schema/basisset.json new file mode 100644 index 0000000..a2e2cdb --- /dev/null +++ b/schema/basisset.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Basis Set Schema", + "description": "JSON schema for a basis set", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "title": { "type": "string" }, + "description": { "type": "string" }, + "format": { "type": "string" }, + "setType": { "type": "string" }, + "harmonicType": { "type": "string" }, + "contractionType": { "type": "string" }, + "sets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "symbol": { "type": "string" }, + "contractions": { + "shell": { "type": "string" }, + "matrix": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "datatype": { "type": "string" }, + "rows": { "type": "number" }, + "columns": { "type": "number" }, + "delimiter": { "type": "string" }, + "values": { "type": "string" } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/schema/calculation.json b/schema/calculation.json new file mode 100644 index 0000000..4d1e093 --- /dev/null +++ b/schema/calculation.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Calculation Schema", + "description": "JSON schema for a calculation", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "approach": { "type": "string" }, + "calcclass": { "type": "string" }, + "calcType": { "type": "string" }, + "submethod": { "type": "string" }, + "calculations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "class": { "type": "string" }, + "calcType": { "type": "string" }, + "referenceState": { "type": "string" }, + "determinant": { "type": "string" }, + "spin#": { "type": "string" } + } + } + } + } +} \ No newline at end of file diff --git a/schema/chemical.json b/schema/chemical.json new file mode 100644 index 0000000..3155a17 --- /dev/null +++ b/schema/chemical.json @@ -0,0 +1,17 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Methodology CC Schema", + "description": "JSON schema for a methodology", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "name": { "type": "string" }, + "sourcetype": { "type": "string" }, + "vendor": { "type": "string" }, + "grade": { "type": "string" }, + "properties": { + "type": "array", + "items": {"$ref": "parameter.json"} + } + } +} \ No newline at end of file diff --git a/schema/computer.json b/schema/computer.json new file mode 100644 index 0000000..b6e2794 --- /dev/null +++ b/schema/computer.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Calculation Schema", + "description": "JSON schema for a calculation", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "architecture": { "type": "string" }, + "cpu": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "opmodes": { "type": "string" }, + "count": { "type": "number" }, + "speed": { "type": "string" }, + "vendorid": { "type": "string" }, + "family": { "type": "string" }, + "model": { "type": "string" }, + "modelname": { "type": "string" } + } + }, + "byteorder": { "type": "string" }, + "threadspercore": { "type": "number" }, + "corespersocket": { "type": "number" }, + "sockets": { "type": "number" }, + "cache": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "l1datacache": { "type": "string" }, + "l1instcache": { "type": "string" }, + "l2cache": { "type": "string" }, + "l3cache": { "type": "string" } + } + }, + "ram": { "type": "string" } + } +} \ No newline at end of file diff --git a/schema/dataseries.json b/schema/dataseries.json new file mode 100644 index 0000000..6d4129f --- /dev/null +++ b/schema/dataseries.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Data Series Schema", + "description": "JSON schema for a data series", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "label": { "type": "string" }, + "axis": { "type": "string" }, + "uid": { "type": "string" }, + "parameter": { + "type": "object", + "required": [ "@id" ], + "properties": { + "@id": { "type": "string" }, + "datatype": { "type": "string" }, + "numberarray": { + "type": "array", + "items": { + "type": "number" + } + }, + "quantity": { "type": "string" }, + "valuearray": { + "@id": { "type": "string" }, + "textarray": { + "type": "array", + "items": { "type": "string" } + } + } + } + } + } +} \ No newline at end of file diff --git a/schema/dataset.json b/schema/dataset.json new file mode 100644 index 0000000..c6d51c5 --- /dev/null +++ b/schema/dataset.json @@ -0,0 +1,64 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Data Set Schema", + "description": "JSON schema for a data set", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "datapoint": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "scope": { "type": "string" }, + "quantity": { "type": "string" }, + "property": { "type": "string" }, + "value": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "number": { "type": "string" }, + "unitstr": { "type": "string" } + } + } + } + } + }, + "datagroup": { + "type": "array", + "items": {"$ref": "#/definitions/datagroup"} + } + }, + "definitions": { + "datagroup" : { + "type": "object", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "scope": { "type": "string" }, + "group": { "type": "string" }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "number": { "type": "number" } + } + } + }, + "dataseries": { + "type": "array", + "items": {"$ref": "dataseries.json"} + }, + "datagroup": { + "type": "array", + "items": {"$ref": "#/definitions/datagroup"} + } + } + } + } + } +} \ No newline at end of file diff --git a/schema/framework.json b/schema/framework.json new file mode 100644 index 0000000..dc19a33 --- /dev/null +++ b/schema/framework.json @@ -0,0 +1,166 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Framework Schema", + "description": "JSON schema for a framework", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "generatedAt": { "type": "string" }, + "version": { "type": "string" }, + "@graph": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "type": { "type": "string" }, + "uid": { "type": "string" }, + "title": { "type": "string" }, + "authors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "name": { "type": "string" }, + "organization": { "type": "string" }, + "email": { "type": "string" }, + "orcid": { "type": "string" } + } + } + }, + "description": { "type": "string" }, + "publisher": { "type": "string" }, + "keywords": { "type": "string" }, + "version": { "type": "string" }, + "date": { "type": "string" }, + "permalink": { "type": "string" }, + "related": { + "type": "array", + "items": { "type": "string" } + }, + "toc": { + "type": "array", + "items": { "type": "string" } + }, + "ids": { + "type": "array", + "items": { "type": "string" } + }, + "scidata": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "type": { + "type": "array", + "items": { "type": "string" } + }, + "property": { + "type": "array", + "items": { "type": "string" } + }, + "kind": { + "type": "array", + "items": { "type": "string" } + }, + "methodology": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "evaluation": { "type": "string" }, + "aspects": { + "type": "array", + "items": { "type": "string" } + } + } + }, + "system": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "discipline": { "type": "string" }, + "subdiscipline": { "type": "string" }, + "facets": { + "type": "array", + "items": { "type": "string" } + } + } + }, + "dataset": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "uid": { "type": "string" }, + "name": { "type": "string" }, + "source": { "type": "string" }, + "scope": { "type": "string" }, + "attribute": { + "type": "array", + "items": { "type": "string" } + }, + "datapoint": { + "type": "array", + "items": { "type": "string" } + }, + "dataseries": { + "type": "array", + "items": {"$ref": "dataset.json"} + }, + "datagroup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "uid": { "type": "string" }, + "name": { "type": "string" }, + "source": { "type": "string" }, + "scope": { "type": "string" }, + "attribute": { + "type": "array", + "items": { "type": "string" } + }, + "datagroup": { + "type": "array", + "items": { "type": "object" } + }, + "datagroup": { + "type": "array", + "items": { "type": "object" } + }, + "datagroup": { + "type": "array", + "items": { "type": "object" } + } + } + } + } + } + } + } + }, + "sources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "citation": { "type": "string" }, + "url": { "type": "string" } + } + } + }, + "rights": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "license": { "type": "string" }, + "holder": { "type": "string" } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/schema/framework_outline.json b/schema/framework_outline.json new file mode 100644 index 0000000..8550817 --- /dev/null +++ b/schema/framework_outline.json @@ -0,0 +1,129 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Data Set Schema", + "description": "JSON schema for a data set", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "generatedAt": { "type": "string" }, + "version": { "type": "string" }, + "@graph": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "uid": { "type": "string" }, + "title": { "type": "string" }, + "authors": { + "type": "array", + "items": { "type": "string" } + }, + "description": { "type": "string" }, + "publisher": { "type": "string" }, + "keywords": { "type": "string" }, + "version": { "type": "string" }, + "permalink": { "type": "string" }, + "related": { + "type": "array", + "items": { "type": "string" } + }, + "toc": { + "type": "array", + "items": { "type": "string" } + }, + "ids": { + "type": "array", + "items": { "type": "string" } + }, + "scidata": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "type": { + "type": "array", + "items": { "type": "string" } + }, + "property": { + "type": "array", + "items": { "type": "string" } + }, + "kind": { + "type": "array", + "items": { "type": "string" } + }, + "methodology": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "evaluation": { "type": "string" }, + "aspects": { + "type": "array", + "items": { "type": "string" } + } + } + }, + "system": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "discipline": { "type": "string" }, + "subdiscipline": { "type": "string" }, + "facets": { + "type": "array", + "items": { "type": "string" } + } + } + }, + "dataset": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "uid": { "type": "string" }, + "name": { "type": "string" }, + "source": { "type": "string" }, + "scope": { "type": "string" }, + "attribute": { + "type": "array", + "items": { "type": "string" } + }, + "datapoint": { + "type": "array", + "items": { "type": "string" } + }, + "dataseries": { + "type": "array", + "items": { "type": "string" } + }, + "datagroup": { + "type": "array", + "items": { "type": "string" } + } + } + } + } + }, + "sources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "citation": { "type": "string" }, + "url": { "type": "string" } + } + } + }, + "rights": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "license": { "type": "string" }, + "holder": { "type": "string" } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/schema/framework_plus.json b/schema/framework_plus.json new file mode 100644 index 0000000..2a3119c --- /dev/null +++ b/schema/framework_plus.json @@ -0,0 +1,140 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Framework Plus Schema", + "description": "JSON schema for a framework", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "generatedAt": { "type": "string" }, + "version": { "type": "string" }, + "@graph": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "uid": { "type": "string" }, + "title": { "type": "string" }, + "authors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "name": { "type": "string" }, + "organization": { "type": "string" }, + "email": { "type": "string" }, + "orcid": { "type": "string" } + } + } + }, + "description": { "type": "string" }, + "publisher": { "type": "string" }, + "keywords": { "type": "string" }, + "version": { "type": "string" }, + "date": { "type": "string" }, + "permalink": { "type": "string" }, + "related": { + "type": "array", + "items": { "type": "string" } + }, + "toc": { + "type": "array", + "items": { "type": "string" } + }, + "ids": { + "type": "array", + "items": { "type": "string" } + }, + "scidata": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "type": { + "type": "array", + "items": { "type": "string" } + }, + "property": { + "type": "array", + "items": { "type": "string" } + }, + "kind": { + "type": "array", + "items": { "type": "string" } + }, + "methodology": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "evaluation": { "type": "string" }, + "aspects": { + "type": "array", + "items": { "type": "string" } + } + } + }, + "system": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "discipline": { "type": "string" }, + "subdiscipline": { "type": "string" }, + "facets": { + "type": "array", + "items": { "type": "string" } + } + } + }, + "dataset": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "uid": { "type": "string" }, + "name": { "type": "string" }, + "source": { "type": "string" }, + "scope": { "type": "string" }, + "attribute": { + "type": "array", + "items": { "type": "string" } + }, + "datapoint": { + "type": "array", + "items": { "type": "string" } + }, + "dataseries": { + "type": "array", + "items": {"$ref": "basisset.json"} + }, + "datagroup": { + "type": "array", + "items": { "type": "string" } + } + } + } + } + }, + "sources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "citation": { "type": "string" }, + "url": { "type": "string" } + } + } + }, + "rights": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "license": { "type": "string" }, + "holder": { "type": "string" } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/schema/measurement.json b/schema/measurement.json new file mode 100644 index 0000000..1c89177 --- /dev/null +++ b/schema/measurement.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Measurement Schema", + "description": "JSON schema for a measurement", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "techniqueType#": { "type": "string" }, + "technique#": { "type": "string" }, + "instrumentType": { "type": "string" }, + "instrument": { "type": "string" }, + "settings": { + "type": "array", + "items": {"$ref": "parameter.json"} + } + } +} \ No newline at end of file diff --git a/schema/methodology.json b/schema/methodology.json new file mode 100644 index 0000000..778d866 --- /dev/null +++ b/schema/methodology.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Methodology CC Schema", + "description": "JSON schema for a methodology", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "evaluation": { "type": "string" }, + "aspects": { + "type": "array", + "items": { + "anyOf": [ + {"$ref": "basisset.json"}, + {"$ref": "calculation.json"}, + {"$ref": "measurement.json"}, + {"$ref": "procedure.json"}, + {"$ref": "resource.json"}, + {"$ref": "software.json"} + ] + } + } + } +} \ No newline at end of file diff --git a/schema/mixture.json b/schema/mixture.json new file mode 100644 index 0000000..ca6061b --- /dev/null +++ b/schema/mixture.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Mixture CC Schema", + "description": "JSON schema for a mixture", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "type": { "type": "string" }, + "phase": { "type": "string" }, + "constituents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "source#": { "type": "string" }, + "grade": { "type": "string" }, + "purity": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "value": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "number": { "type": "number" }, + "unit": { "type": "string" } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/schema/molsystem.json b/schema/molsystem.json new file mode 100644 index 0000000..8355866 --- /dev/null +++ b/schema/molsystem.json @@ -0,0 +1,145 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Mol System Schema", + "description": "JSON schema for a mol system", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "temperature": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "number": { "type": "number" }, + "unit": { "type": "string" } + }, + "charge": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "number": { "type": "number" }, + "unit": { "type": "string" } + }, + "multiplicity": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "number": { "type": "number" } + }, + "space": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "spaceType": { "type": "string" }, + "points#": { + "type": "array", + "items": { "type": "string" } + } + }, + "points": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "x": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "number": { "type": "number" }, + "unit": { "type": "string" } + }, + "y": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "number": { "type": "number" }, + "unit": { "type": "string" } + }, + "z": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "number": { "type": "number" }, + "unit": { "type": "string" } + }, + "tenant": { "type": "string" } + } + } + }, + "molecule": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "label": { "type": "string" }, + "inchiKey": { "type": "string" }, + "atomCount": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "value": { "type": "number" } + } + }, + "atoms": { + "type": "array", + "items": { "type": "string" } + }, + "bomds": { + "type": "array", + "items": { "type": "string" } + }, + "atom": { + "type": "array", + "itmes": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "name": { "type": "string" }, + "label": { "type": "string" }, + "element": { "type": "string" }, + "atomMass": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "number": { "type": "number" }, + "unitstr": { "type": "string" } + } + }, + "formalAtomCharge": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "number": { "type": "number" }, + "unitstr": { "type": "string" } + } + }, + "calculatedAtomCharge": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "number": { "type": "number" }, + "unitstr": { "type": "string" } + } + }, + "basisSet": { "type": "string" } + } + } + }, + "bond": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "label": { "type": "string" }, + "bondType": { "type": "string" }, + "order": { "type": "number" }, + "atoms": { + "type": "array", + "items": { "type": "string" } + } + } + } + } + } + } + } + + } +} \ No newline at end of file diff --git a/schema/parameter.json b/schema/parameter.json index 26f25af..1b0fd69 100755 --- a/schema/parameter.json +++ b/schema/parameter.json @@ -2,55 +2,26 @@ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Parameter Schema", "description": "JSON schema for a scientific parameter", - "required": ["parameter"], + "type": "object", "properties": { - "parameter": { - "type": "object", - "required": ["property"], - "oneOf": [ - { - "required": ["value"] - }, - { - "required": ["text"] - } - ], - "properties": { - "property": { - "description": "The property that the parameter is about", - "type": "object", - "oneOf": [ - { - "required": ["name"] - }, - { - "required": ["code"] - } - ], - "properties": { - "name": { - "description": "The name of the measured property", - "type": "string" - }, - "code": { - "description": "A unique code identifying a property in a system of properties", - "type": "string" - }, - "codeType": { - "description": "The system of properties the property code comes from", - "type": "string" - } - } - }, - "value": { - "description": "A numeric value with or without unit", - "$ref": "https://stuchalk.github.io/scidata/schema/value.json#measuredValue" - }, - "text": { - "description": "A string value", - "type": "string" - } - } - } + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "scope": { "type": "string" }, + "quantitykind": { "type": "string" }, + "quantity": { "type": "string" }, + "value": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "number": { + "oneOf": [ + { "type": "number" }, + { "type": "string" } + ] + }, + "unit": { "type": "string" } + } + } } } \ No newline at end of file diff --git a/schema/procedure.json b/schema/procedure.json new file mode 100644 index 0000000..260d7fc --- /dev/null +++ b/schema/procedure.json @@ -0,0 +1,35 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Procedure Schema", + "description": "JSON schema for a procedure", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "title": { "type": "string" }, + "description": { "type": "string" }, + "scope": { "type": "string" }, + "activity": { "type": "string" }, + "sequence": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "title": { "type": "string" }, + "steps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "step": { "type": "number" }, + "text": { "type": "string" } + } + } + } + } + }, + "notes": { "type": "string" } + } +} \ No newline at end of file diff --git a/schema/resource.json b/schema/resource.json new file mode 100644 index 0000000..e9f565b --- /dev/null +++ b/schema/resource.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Resource Schema", + "description": "JSON schema for a resource", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "type": { "type": "string" }, + "name": { "type": "string" }, + "vendor": { "type": "string" }, + "catgnumber": { "type": "string" } + } +} \ No newline at end of file diff --git a/schema/software.json b/schema/software.json new file mode 100644 index 0000000..89bcb7e --- /dev/null +++ b/schema/software.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Software Schema", + "description": "JSON schema for a piece of software", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "name": { "type": "string" }, + "version": { "type": "string" }, + "os": { "type": "string" }, + "developer": { "type": "string" }, + "input": { "type": "string" }, + "output": { "type": "string" } + } +} \ No newline at end of file diff --git a/schema/substance.json b/schema/substance.json new file mode 100644 index 0000000..8499133 --- /dev/null +++ b/schema/substance.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Substance Schema", + "description": "JSON schema for a substance", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "name": { "type": "string" }, + "iupacname": { "type": "string" }, + "inchi": { "type": "string" }, + "inchikey": { "type": "string" }, + "smiles": { "type": "string" }, + "formula": { "type": "string" }, + "molweight": { "type": "string" }, + "chebi": { "type": "string" } + } +} \ No newline at end of file diff --git a/schema/system.json b/schema/system.json new file mode 100644 index 0000000..04ee2a7 --- /dev/null +++ b/schema/system.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "System Schema", + "description": "JSON schema for a system", + "type": "object", + "properties": { + "@id": { "type": "string" }, + "@type": { "type": "string" }, + "discipline": { "type": "string" }, + "discipline": { "type": "string" }, + "facets": { + "type": "array", + "items": { + "anyOf": [ + {"$ref": "chemical.json"}, + {"$ref": "computer.json"}, + {"$ref": "molsystem.json"}, + {"$ref": "substance.json"} + ] + } + } + } +} \ No newline at end of file