RDF::Trine::Serializer::RDFa(3pm)

RDF::Trine::Serializer::RDFa3pm

Rdfa serializer for rdf::trine

Usage

 use RDF::Trine::Serializer;
 my $s = RDF::Trine::Serializer->new('RDFa', style => 'HTML::Hidden');
 my $string = $s->serialize_model_to_string($model);

Overview

The RDF::Trine::Serializer class provides an API for serializing RDF graphs to strings and files. This subclass provides RDFa serialization via RDF::RDFa::Generator.

It is intended that this module will replace the RDF::Trine compatibility methods in RDF::RDFa::Generator, which are now deprecated. This is done to allow both RDF::Trine and Attean to use it, but not require them as dependencies.

Methods

Beyond the methods documented below, this class inherits methods from the RDF::Trine::Serializer class.

"new"

Returns a new RDFa serializer object. It can any arguments are passed on to RDF::RDFa::Generator, see it's documentation for details. This includes a "style" argument that names a module that formats the output. In addition, a "generator_options" argument may be passed. This is passed to the generator's "create_document" methods as options, and are typically used for style-specific configuration.

"serialize_model_to_file ( $fh, $model )"

Serializes the $model to RDFa, printing the results to the supplied filehandle "<$fh">.

"serialize_model_to_string ( $model )"

Serializes the $model to RDFa, returning the result as a string.

"serialize_iterator_to_file ( $file, $iter )"

Serializes the iterator to RDFa, printing the results to the supplied filehandle "<$fh">.

"serialize_iterator_to_string ( $iter )"

Serializes the iterator to RDFa, returning the result as a string.

Acknowledgements

This module is mostly a straightforward port with substantial cutnpaste from RDF::RDFa::Generator and RDF::Trine by Toby Inkster and Gregory Todd Williams respectively.

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.

Releases

4 releases since Debian 10 (Buster); the text changed 2 times.

  1. 10
  2. 11
  3. 12–13

Bugs

Please report any bugs to <https://github.com/kjetilk/p5-rdf-trine-serializer-rdfa/issues>.

Author

Kjetil Kjernsmo <[email protected]>.

From librdf-trine-serializer-rdfa-perl 0.101-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.