NAME
Catmandu::Exporter::RDF - serialize RDF data
VERSION
version 0.01
SYNOPSIS
use Catmandu::Exporter::RDF;
my $exporter = Catmandu::Exporter::RDF->new(
file => 'export.rdf',
type => 'XML',
fix => 'rdf.fix'
);
$exporter->commit;
DESCRIPTION
METHODS
new(file => $file, type => $type, %options)
Create a new Catmandu RDF exporter which serializes into a file or to STDOUT.
A serialization form can be set with option type. The type must be a subclass name of RDF::Trine::Serializer, for instance Turtle for RDF/Turtle with RDF::Trine::Serializer::Turtle. The first letter is transformed uppercase, so format => 'turtle' will work as well. In addition there are aliases ttl for Turtle, n3 for Notation3, xml and XML for RDFXML, json for RDFJSON.
The option fix is supported as derived from Catmandu::Fixable. For every add or for every item in add_many the given fixes will be applied first.
The option ns can refer to an instance of or to a constructor argument of RDF::NS. Use a fixed date, such as '20130816' to make sure your URI namespace prefixes are stable.
add
RDF data can be added as used by "as_hashref" in RDF::Trine::Model in form of hash references. A simplified form of JSON-LD will be supported as well.
count
Always returns 1 because there is always one RDF graph in a RDF document.
uri
Used to expands an URI with RDF::NS: for instance dc:title is expanded to <http://purl.org/dc/elements/1.1/title>.
SEE ALSO
Catmandu::Exporter, RDF::Trine::Serializer
AUTHOR
Jakob Voß
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Jakob Voß.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 209:
Non-ASCII character seen before =encoding in 'Voß'. Assuming UTF-8