incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paolo Castagna (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (CLEREZZA-158) jena based turtle serializer, serializing lists with uris
Date Sun, 06 Nov 2011 07:18:51 GMT

    [ https://issues.apache.org/jira/browse/CLEREZZA-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144951#comment-13144951
] 

Paolo Castagna edited comment on CLEREZZA-158 at 11/6/11 7:18 AM:
------------------------------------------------------------------

Is this the correct/expected Turtle serialization?

----
<http://tpf.localhost/typePriorityList>
      rdf:first <http://clerezza.org/2009/07/script#ScriptGeneratedResource> ;
      rdf:rest [] .
----

I get this using Jena:

----
Model model = ModelFactory.createDefaultModel();
String data = 
    "<?xml version=\"1.0\"?>" +
    "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">"
+ 
    "  <rdf:Description rdf:about=\"http://tpf.localhost/typePriorityList\">" +
    "    <rdf:rest rdf:nodeID=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil\"/>"
+ 
    "    <rdf:first rdf:resource=\"http://clerezza.org/2009/07/script#ScriptGeneratedResource\"/>"
+ 
    "  </rdf:Description>" +
    "</rdf:RDF>";
ByteArrayInputStream in = new ByteArrayInputStream(data.getBytes());
model.read(in, null, "RDF/XML");
model.write(System.out, "TURTLE");
----
                
      was (Author: castagna):
    Is this the correct/expected Turtle serialization?

----
<http://tpf.localhost/typePriorityList>
      rdf:first <http://clerezza.org/2009/07/script#ScriptGeneratedResource> ;
      rdf:rest [] .
----

I get this using Jena:

----
Model model = ModelFactory.createDefaultModel();
String data = 
    "<?xml version=\"1.0\"?>" +
    "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">"
+ 
    "  <rdf:Description rdf:about=\"http://tpf.localhost/typePriorityList\">" +
    "    <rdf:rest rdf:nodeID=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil\"/>"
+ 
    "    <rdf:first rdf:resource=\"http://clerezza.org/2009/07/script#ScriptGeneratedResource\"/>"
+ 
    "  </rdf:Description>" +
    "</rdf:RDF>";
    ByteArrayInputStream in = new ByteArrayInputStream(data.getBytes());
    model.read(in, null, "RDF/XML");
    model.write(System.out, "TURTLE");
----
                  
> jena based turtle serializer, serializing lists with uris
> ---------------------------------------------------------
>
>                 Key: CLEREZZA-158
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-158
>             Project: Clerezza
>          Issue Type: Bug
>            Reporter: Reto Bachmann-Gmür
>
> Is the following list serialized correctly in turtle, can it be read back?
> <rdf:Description rdf:about="http://tpf.localhost/typePriorityList">
>     <rdf:rest rdf:nodeID=""http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
>     <rdf:first rdf:resource="http://clerezza.org/2009/07/script#ScriptGeneratedResource"/>
>   </rdf:Description>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message