Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed emmo:DataSet to emmo:Dataset #1065

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions bindings/python/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -64,7 +64,7 @@
"float32": "FloatData",
"float64": "DoubleData",
"string": "StringData",
"ref": "DataSet",
"ref": "Dataset",
#"dimension": "Dimension",
#"property": "Datum",
#"relation": NotImplemented,
Expand Down Expand Up @@ -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)),
])
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion examples/dataset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading