Ostrzyciel opened a new issue, #2700:
URL: https://github.com/apache/jena/issues/2700

   ### Version
   
   dev (d9bf473)
   
   ### Feature
   
   I wrote a custom serialization format for RDF, along with the writer, 
parser, and all the registration shenanigans ([source in 
Scala](https://github.com/Jelly-RDF/jelly-jvm/blob/effb9ead5fb34a4ca0feee5c0147e093ba7d70d3/jena/src/main/scala/eu/ostrzyciel/jelly/convert/jena/riot/JellyLanguage.scala#L61)).
 It works great when loading RDF files into Fuseki UI, or when using the RIOT 
CLI utility. The problem is, I can't get it to work over content negotiation in 
Fuseki with SPARQL CONSTRUCT queries or with the graph store protocol. Fuseki 
always ignores my Accept header with the custom content type and returns Turtle 
anyway. I dug a bit into the code and found this:
   
   - 
[`ResponseDataset.doResponseDataset`](https://github.com/apache/jena/blob/d9bf473405b4242215c626126d01f9463a27ccb4/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseDataset.java#L82)
 uses `DEF.constructOffer` as the list of accepted content types.
   - 
[`DEF.constructOffer`](https://github.com/apache/jena/blob/d9bf473405b4242215c626126d01f9463a27ccb4/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/DEF.java#L35)
 is a public static final field, so it cannot be modified or extended in any 
way.
   
   The `DEF` class also contains a few other lists of content types that serve 
similar purposes – they are also static final.
   
   So, as I understand, there is currently no way of adding a new serialization 
format for Fuseki responses, besides forking the entire codebase or resorting 
to something like reflection (nooooo...).
   
   Assuming this is correct, would it make sense to create some kind of a 
simple registration mechanism for supported content types in Fuseki, similar to 
[`RDFLanguages`](https://github.com/apache/jena/blob/d9bf473405b4242215c626126d01f9463a27ccb4/jena-arq/src/main/java/org/apache/jena/riot/RDFLanguages.java#L265)
 in RIOT?
   
   ### Are you interested in contributing a solution yourself?
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to