Turtle Quads (TQL) is a line-oriented RDF format similar to NQuads but using the more permissive (and efficient!) Turtle encoding for characters. It has been introduced by DBpedia for its dump files and it is supported in input by the Virtuoso triple store. TQL is the preferred format for manipulating RDF data in RDFpro.

The rdfpro-tql module extends Sesame RIO with support for the TQL format. In order to use it you have to include the following dependency in your pom.xml:

<dependency>
  <groupId>eu.fbk.rdfpro</groupId>
  <artifactId>rdfpro-tql</artifactId>
  <version>0.6</version>
</dependency>

If you don’t use Maven, you have to download and include the following JARs in the classpath:

Note that the three Sesame JARs are not necessary in case the openrdf-sesame-2.8.6-onejar.jar file is already included. The SLF4J API is used by Sesame for logging. You need to include also an implementation (e.g., Logback) for logging to work.

As TQL is not part of the predefined set of Sesame RDFFormats, it is necessary to register it. This can be done either via RDFFormat#register(), passing the TQL.FORMAT constant, or by simply calling method TQL.register() on the TQL class, which ensures that multiple calls will result in a single registration.

A note on performances. The TQL parser and writer operate by reading / writing a character at a time, relying on the underlying stream for proper buffering. For optimal performances, make sure to use them with a BufferedReader or BufferedWriter, or, better, with their corresponding unsynchronized variants produced by methods IO.buffer() of the IO utility class.

Back to top

Last Published: 2016/07/22.

Reflow Maven skin by Andrius Velykis.

Data and Knowledge Management tools