On 16/04/2025 17:11, Dave Reynolds wrote:
I should know the answer to this but is there a way to preserve prefixes when using graph PUT/GET operations on a TDB-backed fuseki instance?

The set up is a vanilla TDB-backed fuseki with default union set.

unionDefaultGraph does not affect Graph Store Protocol PUT/GET.
It only affects SPARQL pattern matching.

----

fuseki --loc "DB" --update /ds &
# (also tried unionDefaultGraph)

curl -T D.ttl --header \
 'Content-type: text/turtle' \
  'http://localhost:3030/ds?default'

curl --header 'Accept: text/turtle' 'http://localhost:3030/ds?default'

gives me prefixes.

You should also be able to PUT/POST a prefixes only file and have them persist.

If I take a turtle file with prefixes and PUT it to a graph in the dataset then GET it back prefixes are lost, or at least not used in the turtle serialization of the response.

What operations are you using to PUT/GET?

I realise, of course, that I can manage prefixes just fine if access via Java API (or could likely use SPARQL CONSTRUCTS) but in this case I'm restricted to the Sparql Graph API.

Dave


    Andy

Also - the prefixes service:

https://jena.apache.org/documentation/fuseki2/prefixes-service.html

Reply via email to