Toby Inkster > RDF-RDB2RDF-0.008 > RDF::RDB2RDF::R2RML

Download:
RDF-RDB2RDF-0.008.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.008   Source  

NAME ^

RDF::RDB2RDF::R2RML - map relational database to RDF using R2RML

SYNOPSIS ^

 my $mapper = RDF::RDB2RDF->new('R2RML', $r2rml);
 print $mapper->process_turtle($dbh);

DESCRIPTION ^

This class offers support for W3C R2RML, based on the 29 May 2012 working draft. See the COMPLIANCE AND COMPATIBILITY section below for a list on unimplemented areas.

This is a subclass of RDF::RDB2RDF::Simple. Differences noted below...

Constructor

Methods

COMPLIANCE AND COMPATIBILITY ^

This implementation should be mostly compliant with the Direct Mapping specification, with the following provisos:

Other quirks are database-specific:

Language Extension

rr:language allows you to assign only a constant language tag. This module implements an extension in case you need to assign the language dynamically (from a table or view column). It's defined as a property rrx:languageColumn:

   @prefix rr:   <http://www.w3.org/ns/r2rml#>.
   @prefix rrx:  <http://purl.org/r2rml-ext/>.
   @prefix bibo: <http://purl.org/ontology/bibo/>.
   @prefix dc:   <http://purl.org/dc/elements/1.1/>.
   
   []
      rr:logicalTable [
         rr:tableName "books";
      ];
      rr:subjectMap [
         rr:class bibo:Book;
         rr:template "book/{book_id}";
      ];
      rr:predicateObjectMap [
         rr:predicate dc:title;
         rr:objectMap [
            rr:column "title";
            rrx:languageColumn "title_lang";
            rr:language "en";   # fallback for nulls
         ];
      ].

Please note this must be a valid IANA language tag.

BUGS ^

Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=RDF-RDB2RDF.

SEE ALSO ^

RDF::Trine, RDF::RDB2RDF, RDF::RDB2RDF::Simple.

http://www.perlrdf.org/.

http://www.w3.org/TR/2012/WD-r2rml-20120529/.

AUTHOR ^

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT ^

Copyright 2011-2013 Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

DISCLAIMER OF WARRANTIES ^

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

syntax highlighting: