-
Notifications
You must be signed in to change notification settings - Fork 177
GH-5573: support to refine the @context of a JSON-LD document #5574
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
base: develop
Are you sure you want to change the base?
Conversation
|
@hmottestad the build failure I had to fix manually locally as well One of the .pom files referecnes a 5.2.1 snapshot
|
|
Is this a feature of any other json-ld implementations? Would framing provide you with a feasible solution instead? |
|
I'm not against using this specific extension but I also wonder if framing would be the better approach in this case. |
This change introduces a new setting for the JSONLDWriter, that allows to configure a JSONLDContextProvider. With such JSONLDContextProvider it is possible to refine the JSON-LD @context in an application.
bc62083 to
3a0451b
Compare
|
Thanks @hmottestad and @kenwenzel for the feedback and the valid question why not solve it with framing. The use of @context refinements was an explicit design decision (over framing) in our application. Unfortunately, I was personally on vacation during the design phase and cannot replicate the full reason for that decision. In the end, it is about self-contained RDF documents, where no additional frame information is required to get it back to RDF. What we want to achieve is not really changing the structure, but going a step further with abbreviation for some simple properties, i.e. "rdfs:label" shows up as "label". This means: for specific IRIs we want to have shorter representation in our resulting document. Does this sound reasonable? Meanwhile, I will clarify further with my colleagues to get more details. |
|
The compact algorithm is allowed to be used with your own context, so it's a valid use case. The way we've done it with framing is that we allow users to provide their own document directly, would it be a good solution if we allow you to completely override the context document? Overriding the document fully would allow us to support that feature without users writing code, for instance if we want to support it in the workbench or if we want to allow users to set it when using the console. |
You mean something like (Similar to how it is done in Sure, this is also fine for use. We just want control over the context. Great feedback (looking at consistency 👍 @hmottestad can you confirm that the above is what you mean? Then I can update the PR by beginning of next week. Thanks |
Yes, exactly like we do with framing. We already have FRAME and EXPAND_CONTEXT, the name for the context used during compaction is just We should probably check that the user doesn't use |

This change introduces a new setting for the JSONLDWriter, that allows to configure a JSONLDContextProvider.
GitHub issue resolved: #5573
With such JSONLDContextProvider it is possible to refine the JSON-LD @context in an application.
Example:
PR Author Checklist (see the contributor guidelines for more details):
mvn process-resourcesto format from the command line)