Hi,

I'm actually using Jena Libraries to convert from a RDF language to another.

Here is my test code :
String rdfInput = "<http://example.org/1> <
http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://example.org/resource> . <http://example.org/2> <
http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://example.org/resource> .";
Reader reader = new StringReader(rdfInput);
Model model = ModelFactory.createDefaultModel();
model.read(reader,  "http://example_graph";, "N-TRIPLE");

RDFDataMgr.write(System.out, model, Lang.NQUADS);


But the returned RDF is in N-triple lang:
<http://example.org/2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://example.org/resource> .
<http://example.org/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://example.org/resource> .


Tried converting to Lang.JSONLD, Lang.N3, Lang.TRIG, Lang.RDFXML : it
worked perfectly

But when I'm asking for Lang.NQUADS or Lang.NQ it's generating N-Triples
and not N-Quads.


Is anyone having a clue on the source of this problem? Is it the way I'm
creating the Model or maybe the way I'm writting the RDF into the model ?


For you information I'm using Eclipse Luna on Ubuntu and
http://mvnrepository.com/artifact/org.apache.jena/apache-jena-libs/2.12.0


Thankfully,


Vincent Emonet.

Reply via email to