Comments (9)
The problem only lies in your use of JSON-LD, where in the context you use a label that is mistaken for a relative URI.
OK, so it's the key that is the issue, not the value.
from data-models.
Is the problem URIs of the type 'https://uri.fiware.org? (It really takes you nowhere)
from data-models.
No, that would be good thing to fix, but it’s not the cause of this bug that breaks the use of the Smart Data Models in any Linked Data client. The root cause is the default fiware context is invalid JSON-LD due to a property that is interpreted as a relative URI is being mapped to another URI.
Please check the validity of your LD documents before any commit.
You can use the npm library json-ld or rdf-parse for that (if you also want to support other RDF serializations).
Test it yourself from the browser here: https://rdf-play.rubensworks.net/#url=https%3A%2F%2Fsmart-data-models.github.io%2FdataModel.Transportation%2FBikeHireDockingStation%2Fexamples%2Fexample.jsonld&proxy=https%3A%2F%2Fproxy.linkeddatafragments.org%2F
from data-models.
I guess you mean that extended terms cannot be a relative location into another file like most, if not all, of the terms in the context?
so instead of having
https://uri.fiware.org/ns/data-models#StreetlightModel
it should be i.e.
https://uri.fiware.org/ns/data-models/StreetlightModel
am I right?
from data-models.
Not at all. It is exactly what the error says and I don’t know how to explain this otherwise than: you don’t have valid JSON-LD due to using what JSON-LD udnerstands as a relative IRI in a property.
from data-models.
https://uri.fiware.org/ns/data-models#xxx
is fine ✅https://uri.fiware.org/ns/data-models#xxx/yyy
is not. ❌https://uri.fiware.org/ns/data-models/xxx
is fine ✅https://uri.fiware.org/ns/data-models/xxx/yyy
is a bit weird but is also legal. ✅
Best to stick to one element at the end so you can create the @context
as shown:
{
"@context": {
"type": "@type",
"id": "@id",
"fiware": "https://uri.fiware.org/ns/data-models#",
"Building": "fiware:Building",
"Device": "fiware:Device",
... etc
}
from data-models.
https://uri.fiware.org/ns/data-models#xxx/yyy
is not. x
No, this is also a valid URI (RFC3986). The problem only lies in your use of JSON-LD, where in the context you use a label that is mistaken for a relative URI.
from data-models.
I guess there were four keys (all of them coming from the old context). @pietercolpaert could check it again?
from data-models.
Houray! It works now indeed!
Unrelated to this issue (which I’ll close now) is that the Linked Data itself from these examples contain quite some issues and if you want to call this NGSI-LD it would be nice if this would be given a bit more love so that Linked Data agents can actual query across these subject pages :) Check for example https://rdf-play.rubensworks.net/#url=https%3A%2F%2Fsmart-data-models.github.io%2FdataModel.Transportation%2FBikeHireDockingStation%2Fexamples%2Fexample.jsonld&proxy=https%3A%2F%2Fproxy.linkeddatafragments.org%2F
from data-models.
Related Issues (20)
- Nomenclature for noise variables in NGSI-LD HOT 1
- Broken Links HOT 5
- Minor fixes in common-schema.json HOT 1
- Request for inclusion of common fields in common schema HOT 3
- Broken example links HOT 1
- Date related issues HOT 1
- Details needed on x-ngsi HOT 6
- Edit configuration files HOT 2
- Few corrections in ngsi-ld_generator_keyvalues_v0.93.py HOT 1
- Need info for certain example formats. HOT 1
- Rationale for including pieces of the NGSI-LD core context in data models HOT 2
- Question : unit of measure HOT 1
- Which @context to use as reference? HOT 1
- How to automatically generate the model.yaml and swagger.yaml HOT 3
- Install of PYSMARTDATAMODEL fails using poetry HOT 3
- Functionality unclear with regards to properties and attributes in pysmartdatamodels HOT 3
- Subschema's are not deterministic HOT 4
- SAREF terms have outdated URIs HOT 1
- Generate the OpenAPI specification from the file "common-schema.json" HOT 6
- Full context update? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-models.