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::Helper::Properties - Module that provides shortcuts to retrieve certain information

Author

       Most of the code was written by Gregory Todd Williams "<gwilliams@cpan.org>" for RDF::LinkedData::Apache,
       but refactored into this class for use by other modules by Kjetil Kjernsmo, "<kjetilk at cpan.org>", then
       refactored again by Toby Inkster, "<tobyink at cpan.org>".

Description

Constructor
       "new(model => $model, %attributes)"
           Moose-style constructor.

   Attributes
       "model"
           The  RDF::Trine::Model  which  data  will be extracted from. The only attribute which the constructor
           requires.

       "page_properties"
           An arrayref of RDF::Trine::Node::Resource objects, each of which are taken to mean "something  a  bit
           like foaf:homepage". There is a sensible default.

       "title_properties"
           An  arrayref  of RDF::Trine::Node::Resource objects, each of which are taken to mean "something a bit
           like foaf:name". There is a sensible default.

       "cache"
           A hashref for caching data into,  or  a  blessed  object  which  supports  "get"  and  "set"  methods
           compatible  with  CHI  and Cache::Cache. If you do not supply a cache, then a hashref will be used by
           default.

   Methods
       page($node)
           A suitable page to redirect to, based on foaf:page or foaf:homepage.

       title($node)
           A suitable title for the document will be returned, based on document contents.

           Called in list context, returns a ($value, $lang, $datatype) tuple.

       description($node)
           A suitable description for the document will be returned, based on document contents

       html_node_value($node)
           Formats the nodes for HTML output.

Name

       RDF::Helper::Properties - Module that provides shortcuts to retrieve certain information

Synopsis

        my $helper = RDF::Helper::Properties->new($model);
        print $helper->title($node);

Version

       Version 0.22

See Also