RDF Translator, powered by RDFLib 4.0.1

RDF Translator is a multi-format conversion tool for structured markup. It provides translations between data formats ranging from RDF/XML to RDFa or Microdata. The service allows for conversions triggered either by URI or by direct text input. Furthermore it comes with a straightforward REST API for developers.

Copy To Clipboard...

REST API

This on-line service provides an easily accessible API which allows for a couple of access methods:

  1. Request raw code snippet served using the proper media type for the target data format:
    http://rdf-translator.appspot.com/convert/<source>/<target>/<uri>
    Examples:
  2. Request a highlighted code snippet formatted using HTML and CSS:
    http://rdf-translator.appspot.com/convert/<source>/<target>/html/<uri>
    Examples:
  3. In addition, the converter permits to perform an HTTP POST request with data attached to it in the request body. The following box shows the URI pattern that is understood by the API:
    http://rdf-translator.appspot.com/convert/<source>/<target>/content
    The HTTP POST method requires the request body to comply with the following pattern:
    content=<data>
    Example 1: Translate raw data
    curl --data-urlencode content="@prefix : <http://example.org/#> . :a :b :c ." \
    http://rdf-translator.appspot.com/convert/n3/nt/content
    Example 2: Translate file contents (save to a file with proper file extension)
    curl --data-urlencode content@example.rdfa http://rdf-translator.appspot.com/convert/rdfa/n3/content > example.n3

Eligible values that can be supplied for source and target data formats are:

Bookmarklets

You may want to add some of the links below to your bookmarks. That way you can easily show the contained markup of any page in your preferred syntaxes. In recent browsers for example, simply drag one of the bookmark items from the matrix below into the bookmark bar:

Output
rdfamicrodatapretty-xmlxmln3ntrdf-json-prettyrdf-jsonjson-ld
Input[detect] detect -> rdfa detect -> microdata detect -> pretty-xml detect -> xml detect -> n3 detect -> nt detect -> rdf-json-pretty detect -> rdf-json detect -> json-ld
rdfa rdfa -> rdfa rdfa -> microdata rdfa -> pretty-xml rdfa -> xml rdfa -> n3 rdfa -> nt rdfa -> rdf-json-pretty rdfa -> rdf-json rdfa -> json-ld
microdata microdata -> rdfa microdata -> microdata microdata -> pretty-xml microdata -> xml microdata -> n3 microdata -> nt microdata -> rdf-json-pretty microdata -> rdf-json microdata -> json-ld
xml xml -> rdfa xml -> microdata xml -> pretty-xml xml -> xml xml -> n3 xml -> nt xml -> rdf-json-pretty xml -> rdf-json xml -> json-ld
n3 n3 -> rdfa n3 -> microdata n3 -> pretty-xml n3 -> xml n3 -> n3 n3 -> nt n3 -> rdf-json-pretty n3 -> rdf-json n3 -> json-ld
nt nt -> rdfa nt -> microdata nt -> pretty-xml nt -> xml nt -> n3 nt -> nt nt -> rdf-json-pretty nt -> rdf-json nt -> json-ld
rdf-json rdf-json -> rdfa rdf-json -> microdata rdf-json -> pretty-xml rdf-json -> xml rdf-json -> n3 rdf-json -> nt rdf-json -> rdf-json-pretty rdf-json -> rdf-json rdf-json -> json-ld
json-ld json-ld -> rdfa json-ld -> microdata json-ld -> pretty-xml json-ld -> xml json-ld -> n3 json-ld -> nt json-ld -> rdf-json-pretty json-ld -> rdf-json json-ld -> json-ld

License and Source Code

The source code of this tool is available under a LPGL license from here.

This service is built on top of RDFLib 4.0.1, an RDF library which allows to parse and serialize between data formats. Furthermore, it is using pyRdfa for RDFa 1.1 parsing, pyMicrodata for Microdata parsing, rdflib-rdfjson for RDF/JSON, and rdflib-jsonld for parsing and serializing JSON-LD. For the conversion to RDFa and Microdata we implemented custom serialization mechanisms based on RDFLib's RDF/XML serializer. Unknown namespace prefixes are determined automatically using the prefix.cc namespace lookup of Richard Cyganiak.

Publications

Alex Stolz, Bene Rodriguez-Castro, and Martin Hepp: RDF Translator: A RESTful Multi-Format Data Converter for the Semantic Web. Technical Report TR-2013-1, E-Business and Web Science Research Group, 2013.

Contact

Univ.-Prof. Dr. Martin Hepp
E-Business and Web Science Research Group, Chair of General Management and E-Business
Universität der Bundeswehr München
Werner-Heisenberg-Weg 39
D-85579 Neubiberg, Germany

Phone: +49-89-6004-4217
E-mail: tools (at) ebusiness-unibw.org
http://www.unibw.de/ebusiness/

Acknowledgements

This tool has been developed by Alex Stolz, a member of the E-Business and Web Science Research Group at Universität der Bundeswehr München. The author would like to thank Martin Hepp and Andreas Radinger for constructive feedback and ongoing substantial contributions to this project.

The work on RDF Translator has been supported by the German Federal Ministry of Education and Research (BMBF) by a grant under the KMU Innovativ program as part of the Intelligent Match project (FKZ 01IS10022B).