The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

linked_data_mojoserver.pl - A simple Mojolicious::Lite server for RDF as linked data

SYNOPSIS

  linked_data_mojoserver.pl daemon

DESCRIPTION

To use a server based on RDF::LinkedData, create a database with triples, using RDF::Trine. There is an example in write_sqlite-db.pl in the distribution that converts a Turtle file to a suitable SQLite database, other databases can be handled in a similar manner.

Next, you need to construct a RDF::Trine::Store config string, see the documentation in that module for further information, and also the above mentioned script.

Then, you need a config file. There's a companion linked_data_mojoserver.json that contains a JSON file that configures this script to use a minimal example database with just two triples. In this file, there is a store parameter, which must contain the RDF::Trine::Store config string and a base URI. This defaults to http://localhost:3000, which is what this script also defaults to.

The following documentation is adapted from the RDF::LinkedData::Apache, which preceeded this script.

If the RDF resource for which data is requested is not the subject of any RDF triples in the underlying triplestore, the /page and /data redirects will not take place, and a HTTP 404 (Not Found) will be returned.

The HTML description of resources will be enhanced by having metadata about the predicate of RDF triples loaded into the same triplestore. Currently, the relevant metadata includes rdfs:label and dc:description statements about predicates. For example, if the triplestore contains the statement

 <http://host.name/rdf/example> <http://example/date> "2010" .

then also including the triple

 <http://example/date> <http://www.w3.org/2000/01/rdf-schema#label> "Creation Date" .

Would allow the HTML description of http://host.name/rdf/example to include a description including:

 Creation Date: 2010

instead of the less specific:

 date: 2010

which is simply based on attempting to extract a useful suffix from the predicate URI.

AUTHOR

Kjetil Kjernsmo <kjetilk@cpan.org>

COPYRIGHT

Copyright (c) 2010 ABC Startsiden AS. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 137:

=back without =over