Documents & Content-Types Supported by Virtuoso

Kingsley Uyi Idehen
OpenLink Virtuoso Weblog
2 min readMar 29, 2016

Quick note (could be fleshed out later) about the different Document and Content-Type combinations supported by OpenLink Virtuoso.

What is a Document?

Observations (Data) in persistent form.

What is a Content-Type?

The form in which observation is persisted, hence the term: format.

Document State?

This could be static (e.g., archive) or fluid (e.g., streaming data flows) or a bit of both (e.g., batch state).

When querying Virtuoso using the SPARQL Query Language, results (or query solutions) can be returned in any the following Entity Relationships (or RDF Statement Graphs) oriented document formats, with regards to DESCRIBE or CONSTRUCT query types:

“text/turtle” — Turtle

“application/x-nice-turtle” — Turtle (beautified)

“application/rdf+json” — RDF/JSON

“application/rdf+xml” — RDF/XML

“text/plain” — N-Triples

“application/xhtml+xml” — XHTML+RDFa

“application/atom+xml” — ATOM+XML

”application/odata+json” — ODATA/JSON

“application/ld+json” — JSON-LD

“text/x-html+ul” — HTML (list)

“text/x-html+tr” — HTML (table)

”text/html” — HTML+Microdata (basic)

“application/x-nice-microdata” — HTML+Microdata (table)

“text/x-html-script-ld+json” — HTML+JSON-LD (basic)

“text/x-html-script-turtle” — HTML+Turtle (basic)

“text/x-html-nice-turtle” — Turtle (beautified — browsing oriented)

”application/microdata+json” — Microdata/JSON

“text/csv” — CSV

“text/tab-separated-values” — TSV

“application/x-trig” — TriG

“text/cxml” — CXML (Pivotviewer Collection)

“text/cxml+qrcode” — CXML (Pivotviewer Collection with QRcodes)

Here’s a screenshot that depicts document content-types referred to above via the default HTML based SPARQL Query Service interface associated with any Virtuoso instance.

Figure 1 — OpenLink Virtuoso SPARQL CONSTRUCT or DESCRIBE Query Results Document Content-Type Options

For SELECT Queries where the query result (solution) is returned as Records in a Table it provides the following document formats:

“text/html” — HTML

”text/x-html+tr” — HTML (Faceted Browsing Links)

”application/vnd.ms-excel” — Spreadsheet

“application/sparql-results+xml” — XML

“application/sparql-results+json” — JSON

“application/javascript” — Javascript

“text/turtle” — Turtle

“application/rdf+xml” — RDF/XML

“text/plain” — N-Triples

“text/csv” — CSV

“text/tab-separated-values” — TSV

“text/cxml” — CXML (Pivot Collection)

“text/cxml+qrcode” — CXML (Pivot Collection with QRcodes)

Here’s a screenshot that depicts document content-types referred to above.

Figure 2— OpenLink Virtuoso SPARQL SELECT Query Results Document Content-Type (Format) Options

Conclusion

One of Virtuoso’s most useful features is its ability to act as a conceptual data-junction-box for integrating and virutalizing disparate data sources (conceptually) while also functioning as a powerful facilitator of open data flow.

--

--

Kingsley Uyi Idehen
OpenLink Virtuoso Weblog

CEO, OpenLink Software —High-Performance Data Centric Technology Providers.