Home

Awesome

Ontology Converter v1.0

A simple command-line utility to convert any RDF graph to OWL2-DL ontology.

This is a kind of ONT-API extension with intentionally straightforward realisation. Can work both with single ontology file source and with directory containing dependent or independent sources. The utility automatically transforms the source RDF Graph to the OWL2 DL syntax according to the internal rules and command-line options. For example, if there is no owl:Ontology section inside rdf-graph, which is required by OWL, an anonymous ontology header will be generated. This is a tool, not a library, and, therefore, it is available only in the form of code and prebuilt jar (see /releases).

Usage: java -jar ont-converter.jar [-f] [-h] -i <path> [-if <format>] -o <path> -of <format> [-p <0|1|2>] [-r] [-s] [-v] [-w]

Options:

Example (RDF/XML -> Manchester Syntax):

$ java -jar ont-converter.jar -i /tmp/pizza.owl.xml -if 1 -o /tmp/pizza.omn -of 12 -v

where

Full list of supported formats:

NameProviderRead / WriteAliases (case insensitive)
TURTLEApache Jenayes / yes0, turtle, ttl
RDF_XMLApache Jenayes / yes1, rdf_xml, rdf/xml, rdf
RDF_JSONApache Jenayes / yes2, rdf_json, rdf/json, rj
JSON_LDApache Jenayes / yes3, json_ld, json-ld, jsonld
NTRIPLESApache Jenayes / yes4, ntriples, n-triples, nt
NQUADSApache Jenayes / yes5, nquads, n-quads, nq
TRIGApache Jenayes / yes6, trig
TRIXApache Jenayes / yes7, trix
RDF_THRIFTApache Jenayes / yes8, rdf_thrift, rdf-thrift, trdf
CSVApache Jenayes / no9, csv
OWL_XMLOWL-APIyes / yes11, owl_xml, owl/xml, owl
MANCHESTER_SYNTAXOWL-APIyes / yes12, manchester_syntax, manchestersyntax, omn
FUNCTIONAL_SYNTAXOWL-APIyes / yes13, functional_syntax, functionalsyntax, fss
BINARY_RDFOWL-APIyes / yes14, binary_rdf, binaryrdf, brf
RDFAOWL-APIyes / no15, rdfa, xhtml
OBOOWL-APIyes / yes16, obo
KRSS2OWL-APIyes / yes18, krss2
DLOWL-APIyes / yes19, dl
DL_HTMLOWL-APIno / yes20, dl_html, dl/html, html
LATEXOWL-APIno / yes21, latex, tex

Requirements:

Build:

Simply run mvn package in the project root. All dependencies should be resolved automatically by maven.

Issues:

In case of any issue (for example the program hangs), please report it into the /ont-converter/issues page, but only if you really sure that the problem is in the program, not in the underlying API. Otherwise please refer to the /ont-api/issues page.

Dependencies:

ONT-API (version 1.4.0-SNAPSHOT)