I think this is expected and by-design behaviour

A Dataset does not carry any prefixes directly rather prefixes are only
carried on the individual Models that may be placed inside the Dataset.
AFAICT when writing datasets out ARQ only considers prefixes from the
default graph by default so if you don't have any data in your default
graph you would likely have no prefixes.

Part of the problem is that ARQ doesn't know what the underlying storage
of a Dataset instance is and so gathers the prefixes prior to carrying out
the actual writing.  The actual writing is then typically done purely in
terms of quads rather than graphs/models so the writers doesn't have
access to the prefixes of specific models.

Changing the existing behaviour to try and gather the prefixes from all
graphs could be done but may produce a significant performance hit in some
cases.

Rob

On 04/11/2014 10:32, "Erich Bremer" <[email protected]> wrote:

>Hi,
>​
>I am writing RDF datasets out from Jena to disk and I noticed that the
>prefix definitions are missing, meaning, all predicates are written out
>in 
>the long URI form rather than something compact like "foaf:knows" with
>the 
>foaf prefix defined up at the top.  The name spaces were defined the a
>Jena 
>Model and then that model was added as a named graph to a empty dataset
>then 
>written out to disk.  Is this expected behavior from Jena or a bug or am
>I 
>missing something here?  - Erich
>​
>​




Reply via email to