You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2013/03/09 13:47:13 UTC
[jira] [Resolved] (JENA-132) N3 / TURTLE serializers ignore
relative URI
[ https://issues.apache.org/jira/browse/JENA-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Seaborne resolved JENA-132.
--------------------------------
Resolution: Fixed
Fix Version/s: Jena 2.10.1
Assignee: Andy Seaborne
Jena RIOT writes output RDF.
if the data has relative IRIs, then relative IRIs are output.
The parsers can be used to output relative IRIs by adding a processing stage (StreamRDF).
Relative URIs are also used in output when the base is set in the write operation with
a @base directive as the first line and can be removed.
> N3 / TURTLE serializers ignore relative URI
> -------------------------------------------
>
> Key: JENA-132
> URL: https://issues.apache.org/jira/browse/JENA-132
> Project: Apache Jena
> Issue Type: Wish
> Components: Jena, RDF API
> Reporter: Alexandre Bertails
> Assignee: Andy Seaborne
> Priority: Minor
> Fix For: Jena 2.10.1
>
>
> Unlike RDF/XML* serializers, N3 and TURTLE ignore the base URI in their output.
> val turtle =
> """
> @prefix foaf: <http://xmlns.com/foaf/0.1/> .
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> <#JL>
> a foaf:Person ;
> foaf:homepage </2007/wiki/people/JoeLambda> ;
> foaf:img <images/me.jpg> ;
> foaf:name "Joe Lambda" .
> """
> val base = "http://w3.org/People/Joe"
> val model = {
> val m = ModelFactory.createDefaultModel()
> m.getReader("TURTLE").read(m, new StringReader(turtle), base)
> m
> }
> model.getWriter("TTL").write(model, System.out, base) // doesn't work as expected
> model.getWriter("RDF/XML-ABBREV").write(model, System.out, base) // this one is ok
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira