From 990b0df97ea586ac22aeed070a582f87ca117c39 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Sat, 11 Jan 2025 07:41:52 +0100 Subject: [PATCH] Renamed emmo:DataSet to emmo:Dataset (#1065) --- bindings/python/dataset.py | 14 +++++++------- examples/dataset/README.md | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bindings/python/dataset.py b/bindings/python/dataset.py index 74bcb7850..9861c66fc 100644 --- a/bindings/python/dataset.py +++ b/bindings/python/dataset.py @@ -27,7 +27,7 @@ # XXX TODO - Make a local cache of EMMO such that we only download it once TS_EMMO = Triplestore("rdflib") -TS_EMMO.parse("https://w3id.org/emmo/1.0.0-rc3") +TS_EMMO.parse("https://w3id.org/emmo/1.0.0") EMMO_VERSIONIRI = TS_EMMO.value("https://w3id.org/emmo", OWL.versionIRI) @@ -64,7 +64,7 @@ "float32": "FloatData", "float64": "DoubleData", "string": "StringData", - "ref": "DataSet", + "ref": "Dataset", #"dimension": "Dimension", #"property": "Datum", #"relation": NotImplemented, @@ -258,13 +258,13 @@ def addmap(uri, iri): # Start populating triples triples = [] - # Add datamodel (emmo:DataSet) + # Add datamodel (emmo:Dataset) if iri is None: iri = meta.uri iri = str(iri).rstrip("#/") triples.extend([ (iri, RDF.type, OWL.Class), - (iri, RDFS.subClassOf, EMMO.DataSet), + (iri, RDFS.subClassOf, EMMO.Dataset), (iri, SKOS.prefLabel, en(title(meta.name))), (iri, OTEIO.hasURI, Literal(meta.uri, datatype=XSD.anyURI)), ]) @@ -428,7 +428,7 @@ def get_dataset( mappings.append((uri, onprop, oncls)) elif onprop and someval: mappings.append((uri, onprop, someval)) - elif obj not in (EMMO.DataSet, ): + elif obj not in (EMMO.Dataset, ): mappings.append((uri, MAP.mapsTo, obj)) elif prop == EMMO.elucidation: description = str(obj) @@ -493,7 +493,7 @@ def add_data( """Save DLite instance as an EMMO dataset to a triplestore. Data instances are represented as individuals of the corresponding - EMMO DataSet. The corresponding metadata is also stored if it not + EMMO Dataset. The corresponding metadata is also stored if it not already exists in the triplestore. Arguments: @@ -565,7 +565,7 @@ def get_data( if not metairi: # `iri` does not correspond to a data instance, check for metadata - if ts.has(iri, RDFS.subClassOf, EMMO.DataSet): + if ts.has(iri, RDFS.subClassOf, EMMO.Dataset): return get_dataset(ts, iri), mappings raise KBError( f"Cannot find neither a data instance nor metadata with IRI: {iri}" diff --git a/examples/dataset/README.md b/examples/dataset/README.md index c0cb01a33..6d87158ed 100644 --- a/examples/dataset/README.md +++ b/examples/dataset/README.md @@ -27,7 +27,7 @@ properties: description: Array of measured temperatures. ``` -A DLite datamodel is represented with an emmo:DataSet, and its properties are represented with emmo:Datum as illustrated in the figure above. +A DLite datamodel is represented with an emmo:Dataset, and its properties are represented with emmo:Datum as illustrated in the figure above. It shows how a simple [`FluidData`] datamodel is represented. The datamodel is semantically enhanced using the following mappings