opengeospatial / ELFIE

Environmental Linked Features IE
https://opengeospatial.github.io/ELFIE/
5 stars 2 forks source link

Issue with ELFIE use of type coercion (forcing URIs) in @context objects #161

Closed abhritchie closed 6 years ago

abhritchie commented 6 years ago

Issue #160 got me thinking about our use of type coercion in contexts. Namely where we state, intentionally or not, that we want values to always be URIs (by reference only in old-school GML speak). Basically, our use of object stubs for references is incompatible with corcing a value to be an @id.

To over-explain. In a bunch of cases in our contexts we say the value has to be a IRI, e.g (from elf-sosa-sample.jsonld):

"relatedSample": {
            "@id": "sampling:relatedSample",
            "@type": "@id"
        }

If I understand correct, the expected value would be something like:

"relatedSample": "https://hydro.data.elfie.ogc/id/water-sample/10.1"

Our approach for links is not actually an IRI, but a stub:

"relatedSample": {
    "@id": "https://hydro.data.elfie.ogc/id/water-sample/10.1",
    "@type": "sosa:Sample",
    "name": "WS10.1"
}

Has this inconsistency caused trouble?

My preference would be to fix the context documents to only use literal bindings (no typing) to keys

"relatedSample": "sampling:relatedSample"

and only use type coercion when we want the value to be a literal IRI, most likely a URL:

"image": "https://metrouk2.files.wordpress.com/2016/09/rex-the-runt.jpg"
dblodgett-usgs commented 6 years ago

This was implemented correct @abhritchie ?

abhritchie commented 6 years ago

Yes.