logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

RDF::Trine::Serializer::RDFa - RDFa Serializer for RDF::Trine

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.

Author

       Kjetil Kjernsmo <kjetilk@cpan.org>.

Bugs

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

Description

       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.

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.

perl v5.36.0                                       2022-12-04                  RDF::Trine::Serializer::RDFa(3pm)

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.

Name

       RDF::Trine::Serializer::RDFa - RDFa Serializer for RDF::Trine

See Also

       RDF::RDFa::Generator, RDF::Trine, Attean

Synopsis

        use RDF::Trine::Serializer;

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

See Also