-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support for multiple @context (aka support for Linked Data) #157
Comments
(Moved from webthing-java repo) @Martinocom I've fixed your second point via WebThingsIO/webthing-java@14ea1c7 |
@Martinocom Is the issue that you need to expose multiple contexts in the Thing Description, or that you need to consume multiple contexts from the Thing Description? I'm assuming it's the former given you originally filed this issue on the Java web thing library. Consuming multiple contexts using the WebThings Gateway's web thing adapter probably doesn't emit an error, but isn't explicitly supported yet. This is one of the many differences between the Mozilla and W3C specifications that I intend to fix in a future version, potentially later this year, but I'm afraid it's going to take a long time to make these changes across all the WebThings libraries and gateway. @mrstegeman In the meantime is there an easy way for Marcin to override the |
No, it's hard-coded to use our schema URL. |
If can be useful for someone, I made some researches about current libraries and what they can achieve. I still think that WebThings has the bigger potential (also 'cos I wanted to use some Kotlin to develop my apps), but for my purposes, as said, I cannot have one hardcoded URL for schema. Alternatives that I found are:
I switched currently on ThingWeb and I'm figuring out how use a raw REST API for it. |
The status
The W3C standard for the Thing Description, as of the status on 06/01/2021, describe that it is possible to use multiple context value, passing an array of values.
Specification can be found in 5.3.1.1 - Thing .
An example of this can be found here and here.
The problems
Specification of the WebThing API is different from the official recommendation of W3C, but is very simple to read and understand: please keep it simple!
This project (like others linked in the official source) has a hard-coded
@context
to "https://iot.mozilla.org/schemas" that is also no more maintained and prompt to switch into the "https://webthings.io/schemas/". The site says:@context
in the Thing Description opens a standardized way to describe ALL the data I have inside a Thing, but this is not possible due this limitation. I cannot indicate more@context
and I'm forced to do all referenced to the hard-coded "https://iot.mozilla.org/schemas" that allows me to use only that one hard-coded (not supported) ontology.To point out better, the Example 28 is NOT compatible with WebThings API, since implements more than one
@context
.Without this ability, I'm not able to proceed in my project: I need to contextualize my data in ontologies like SAREF, IoT-Lite, IoT-S and even the less significant ones like ontology-of-units-of-measure or DBpedia to give more opportunities to get ALL the possible data of the system. Why? With that many knowledge it's possible to understand the system, where the things are, and try to create actions that was not originally planned, but can be achieved mixing behaviors of different things.
I don't know if it's planned or not, but I really need this feature.
If not, I'm planning to "wrap" the requested Thing Description into a bigger one with all the ontologies I need to use, and then indicate for the WebThing library the "minimized" version of it.
The text was updated successfully, but these errors were encountered: