On 15/08/13 22:29, Dave Reynolds wrote:
Note that for RDF/XML-ABBREV writer at least you can set your own dummy
base URI on the read API call, set the same intended base URI on the
write call and so preserve relative URIs that way.
Not sure if that works with the Turtle writer.
Not exactly.
You can specific the base (not via RDFDataMgr currently, but if you call
the writer directly).
The writer will use that to abbreviate URIs but it will also add a @base
declaration to the front of the file.
If there is sufficient demand (and a contributed patch), then the way to
do this might be to add a option via the associated context. This would
declare the base URI and also instruct the writer not to write it into
the file.
Or call "tail -n +2" on the current output with a base setting.
Andy
Dave
On 15/08/13 22:12, Martynas Jusevičius wrote:
Are you getting data with relative URIs? Can't you set base URI
programatically?
Here's some code that does that:
https://github.com/Graphity/graphity-browser/blob/master/src/main/java/org/graphity/processor/provider/OntologyProvider.java
Martynas
On Aug 15, 2013 11:34 PM, "Norman Walsh" <[email protected]> wrote:
Martynas Jusevičius <[email protected]> writes:
No, URIs are absolute in RDF model, even though they can be relative
in serializations.
Why don't you use base URI (@base in Turtle) and/or prefixes so that
URIs stay stable no matter where you load the file from?
It's not my data. :-)
Thanks, though, for confirming what I expected.
Be seeing you,
norm
--
Norman Walsh <[email protected]> | Hanging is too good for a man who makes
http://nwalsh.com/ | puns; he should be drawn and
| quoted.--Fred Allen