eclipse-rdf4j / rdf4j

Eclipse RDF4J: scalable RDF for Java
https://rdf4j.org/
BSD 3-Clause "New" or "Revised" License
352 stars 160 forks source link

Support specifying JSON-LD contexts using WriterConfig #395

Open abrokenjester opened 7 years ago

abrokenjester commented 7 years ago

(Migrated from https://openrdf.atlassian.net/browse/SES-2054)

Need to support users specifying contexts using WriterConfig.

The main issue is that there are two distinct types of context, internal and external, and it would be best if these were different settings, to avoid having an "Object" type for a combined setting, which is just confusing to users, rather than having Map<String, Object> for internal context and URI for external contexts.

barthanssens commented 5 years ago

Somewhat related to #452

barthanssens commented 5 years ago

@ansell

Hi Peter, seems like you did some work on this issue in a fork, has this been fixed or does it require some additional work ? Thanks

ansell commented 5 years ago

The new settings were implemented https://github.com/eclipse/rdf4j/compare/master...ansell:issues/%23395-jsonld-contexts

I will see about rebasing that onto the current develop branch and adding in the remaining link around here:

https://github.com/eclipse/rdf4j/blob/7b334a193716447b3ef73d8d317e6a9ee2cd0d60/rio/jsonld/src/main/java/org/eclipse/rdf4j/rio/jsonld/JSONLDParser.java#L106

barthanssens commented 3 years ago

@ansell Hi Peter,

I was looking into this issue. Could it be that in order to fully implement this in rdf4j, a small change should also be made in jsonld-java's core JsonLdProcessor.compact() ? Looks like line 56 only uses parse(Object localContext), and not the parse(Object localContext, List<String> remoteContexts) ...

garpinc commented 3 years ago

Is any progress being made on this @ansell

I ask because as far as I can tell there is currently no way to pass the remote context.. Am I correct in thinking that?

ansell commented 3 years ago

Hi @barthanssens and @garpinc

I am not working on this and don't have any time to work on it in my current situation. If this requires a modification to jsonld-java feel free to open a PR there and one of the new maintainers should be able to review it and then I will do a release on that side.

barthanssens commented 3 years ago

OK, thanks for the info @ansell