FIWARE / tutorials.NGSI-LD

:tractor: :cow: NGSI-LD Tutorials based around a Smart Farm
http://ngsi-ld-tutorials.rtfd.io/
MIT License
26 stars 24 forks source link

Use of undefined attributes in "Understanding @context" section #20

Closed nikosft closed 9 months ago

nikosft commented 1 year ago

The tutorial says:

Many types of device reading (i.e. context data attributes) have been predefined within the SAREF ontology - so it is reasonable to use the URIs defining these attributes as a basis of extending our model.

However fillingLevel is not defined in https://ontology.tno.nl/saref/. Similarly, at some other point it uses:

"airPollution": "https://w3id.org/saref#airPollution", "atmosphericPressure": "https://w3id.org/saref#atmosphericPressure",

But both airPollution and atmosphericPressure are not defined in https://ontology.tno.nl/saref/

As side note, as far as I could search bot airPollution and fillingLevel are not event defined in ETSI's SAREF ontology.

jason-fox commented 1 year ago

I think these are defined in one of the SAREF Ontology Extensions

nikosft commented 1 year ago

As far as I searched airPollution and atmosphericPressure are not defined in SAREF Ontology Extensions. But even if they were defined, they should have also been (re-)defined in w3id.org. Right now https://w3id.org/saref#airPollution (and the other examples mentioned in the initial message) are just undefined attributes. Aren't they? On the contrary https://w3id.org/saref#temperature is defined

By the way, I found out that airPollution, atmosphericPressure, and fillingLevel are defined in https://uri.fiware.org/ns/dataModels. So I believe using something like

"fillingLevel":"https://uri.fiware.org/ns/dataModels#fillingLevel"

would solve the issue (and similar for the other attributes not defined in w3id.org)

jason-fox commented 9 months ago

Removed non SAREF terms and used depth instead. https://github.com/FIWARE/tutorials.Understanding-At-Context/commit/4117438

jason-fox commented 9 months ago

By the way, I found out that airPollution, atmosphericPressure, and fillingLevel are defined in https://uri.fiware.org/ns/dataModels. So I believe using something like

"fillingLevel":"https://uri.fiware.org/ns/dataModels#fillingLevel"

would solve the issue (and similar for the other attributes not defined in w3id.org)

Generally, I wouldn't encourage the uri.fiware.org URIs, since FIWARE isn't currently an ontology provider. I would usually defer to schema.org or smartdatamodels.org or a more domain specific URI if it can be found. As an example fillingLevel is defined here