Plack::App::DAIA

DAIA Server as Plack application
Download

Plack::App::DAIA Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jakob Voss
  • Publisher web site:
  • http://search.cpan.org/~voj/

Plack::App::DAIA Tags


Plack::App::DAIA Description

Plack::App::DAIA is a Perl module that implements a DAIA server as PSGI application. It provides serialization in DAIA/XML and DAIA/JSON and automatically adds some warnings and error messages. The core functionality must be implemented by deriving from this class and implementing the method retrieve. The following serialization formats are supported by default:xml DAIA/XML format (default)json DAIA/JSON formatrdfjson DAIA/RDF in RDF/JSON.In addition you get DAIA/RDF in several RDF formats (rdfxml, turtle, and ntriples if RDF::Trine is installed. If RDF::NS is installed, you also get known namespace prefixes for RDF/Turtle format. Furthermore the output formats svg and dot are supported if RDF::Trine::Exporter::GraphViz is installed to visualize RDF graphs (you may need to make sure that dot is in your $ENV{PATH}).SYNOPSISIt is recommended to derive from this class: package Your::App; use parent 'Plack::App::DAIA'; sub retrieve { my ($self, $id, %parts) = @_; # construct DAIA object (you must extend this in your application) my $daia = DAIA::Response->new; return $daia; }; 1;Then create an app.psgi that returns an instance of your class: use Your::App; Your::App->new;To quickly hack a DAIA server you can also put all into app.psgi: use Plack::App::DAIA; my $app = Plack::App::DAIA->new( code => sub { my $id = shift; # ...construct and return DAIA object } ); $app;This module contains a dummy application app.psgi and a more detailed example examples/daia-ubbielefeld.pl.Product's homepage


Plack::App::DAIA Related Software