blog

rss

Easily document your vocabularies/ontologies with Parrot

30/06/2011, 15h15

After several months of development within ONTORULE project, today Tejo has finally announced that Parrot is online. This tool is the natural evolution of others, such as SpecGen or Neologism ; not better, just different. It adds the possibility to generate documentation from several artifacts, not only vocabularies/ontologies, but rules too.

Since the tool is also provided as online service, it introduces an interesting option: easily document your vocabularies/ontologies backed on this service. Based on the recipes it’d easy to write the necessary rules on your .htaccess to use Parrot in this way:


RewriteEngine On
RewriteBase /exampledir
AddDefaultCharset utf-8
AddType application/rdf+xml .rdf
AddType application/rdf+xml .owl

# Rewrite rule to serve HTML content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml)
RewriteCond %{HTTP_ACCEPT} text/html [OR]
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
RewriteRule ^example$ http://ontorule-project.eu/parrot/parrot?documentUri=http://example.org/exampledir/example.owl [R=303,L]

# Rewrite rule to serve RDF/XML content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml
RewriteRule ^example$ example.owl [R=303]

# Rewrite rule to serve the RDF/XML content from the vocabulary URI by default
RewriteRule ^example$ example.owl [R=303]

This configuration supposes that your vocabulary/ontology has http://example.org/exampledir/example# as namespace, and the location of the source file is http://example.org/exampledir/example.owl. But you can customize it as your convenience.

For instance, the documentation for SIOC would be this . And based on the mappings provided by prefix.cc, Parrot also generates documentation from the most popular prefix of a vocabulary, such as http://ontorule-project.eu/parrot/parrot?documentUri=foaf for FOAF.

Please, check the full features list . And as usual, any comment is very welcome !