Hi all,

I've done my java program using jena lib. I want my "ResultSet" (sparql result) to be extremely RDF syntax (pure RDF) not RDF/XML format can anyone guide me ?

asked 25 Jan '11, 09:44

mai%204's gravatar image

mai 4
11
accept rate: 0%


RDF is a data model; there is no RDF syntax per se. There are various RDF serializations, or syntaxes for representing RDF in a file. RDF/XML is the only one that is a W3C standard for now, but Turtle, a subset of another one called N3, is becoming more popular and looks like it's moving towards standard status. N-Triples is another that is simple but verbose, and not as popular as Turtle (or even RDF/XML), and there are various discussions about JSON-based syntaxes to represent RDF triples.

permanent link

answered 25 Jan '11, 13:03

bobdc's gravatar image

bobdc
4.1k7
accept rate: 15%

If you're talking about serialising SPARQL results...

It's important to note that SELECT/ASK queries do not return RDF.

For SELECT/ASK queries—which return tuples of results—the standard serialisation is XML. JSON format results are also widely implemented. Various engines usually default to HTML tables for human viewing.

For CONSTRUCT/DESCRIBE queries—which return RDF graphs—you can use any format syntax you like, preferably the one suited to the Accept-header of the requestor. Along these lines, bobdc's gives you the details: you should support a good mix of syntaxes (shouldn't be too hard to implement all of the appropriate writers, even if the output doesn't look too pretty), particularly RDF/XML, Turtle and N-Triples. (An RDFa result might also be interesting for those requesting HTML.)

...the faster the W3C standardise Turtle and N-Triples, the better. (Better late than never.)

permanent link

answered 25 Jan '11, 17:48

Signified's gravatar image

Signified ♦
24.0k1623
accept rate: 37%

1

N-Triples is technically already standardised in RDF Test Cases - http://www.w3.org/TR/rdf-testcases/#ntriples. But yes they definitely need to standardise Turtle

(26 Jan '11, 12:50) Rob Vesse ♦ Rob%20Vesse's gravatar image

Yep, I forgot good old Section 3 of RDF Test Cases. [Why W3C, why? :)]

(26 Jan '11, 19:31) Signified ♦ Signified's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,301
×877
×615

question asked: 25 Jan '11, 09:44

question was seen: 1,845 times

last updated: 25 Jan '11, 17:48