.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "RDF::Helper::Properties 3pm" .TH RDF::Helper::Properties 3pm "2017-01-02" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" RDF::Helper::Properties \- Module that provides shortcuts to retrieve certain information .SH "VERSION" .IX Header "VERSION" Version 0.22 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& my $helper = RDF::Helper::Properties\->new($model); \& print $helper\->title($node); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" .SS "Constructor" .IX Subsection "Constructor" .ie n .IP """new(model => $model, %attributes)""" 4 .el .IP "\f(CWnew(model => $model, %attributes)\fR" 4 .IX Item "new(model => $model, %attributes)" Moose-style constructor. .SS "Attributes" .IX Subsection "Attributes" .ie n .IP """model""" 4 .el .IP "\f(CWmodel\fR" 4 .IX Item "model" The RDF::Trine::Model which data will be extracted from. The only attribute which the constructor requires. .ie n .IP """page_properties""" 4 .el .IP "\f(CWpage_properties\fR" 4 .IX Item "page_properties" An arrayref of RDF::Trine::Node::Resource objects, each of which are taken to mean \*(L"something a bit like foaf:homepage\*(R". There is a sensible default. .ie n .IP """title_properties""" 4 .el .IP "\f(CWtitle_properties\fR" 4 .IX Item "title_properties" An arrayref of RDF::Trine::Node::Resource objects, each of which are taken to mean \*(L"something a bit like foaf:name\*(R". There is a sensible default. .ie n .IP """cache""" 4 .el .IP "\f(CWcache\fR" 4 .IX Item "cache" A hashref for caching data into, or a blessed object which supports \f(CW\*(C`get\*(C'\fR and \f(CW\*(C`set\*(C'\fR methods compatible with \s-1CHI\s0 and Cache::Cache. If you do not supply a cache, then a hashref will be used by default. .SS "Methods" .IX Subsection "Methods" .ie n .IP """page($node)""" 4 .el .IP "\f(CWpage($node)\fR" 4 .IX Item "page($node)" A suitable page to redirect to, based on foaf:page or foaf:homepage. .ie n .IP """title($node)""" 4 .el .IP "\f(CWtitle($node)\fR" 4 .IX Item "title($node)" A suitable title for the document will be returned, based on document contents. .Sp Called in list context, returns a ($value, \f(CW$lang\fR, \f(CW$datatype\fR) tuple. .ie n .IP """description($node)""" 4 .el .IP "\f(CWdescription($node)\fR" 4 .IX Item "description($node)" A suitable description for the document will be returned, based on document contents .ie n .IP """html_node_value($node)""" 4 .el .IP "\f(CWhtml_node_value($node)\fR" 4 .IX Item "html_node_value($node)" Formats the nodes for \s-1HTML\s0 output. .SH "AUTHOR" .IX Header "AUTHOR" Most of the code was written by Gregory Todd Williams \f(CW\*(C`\*(C'\fR for RDF::LinkedData::Apache, but refactored into this class for use by other modules by Kjetil Kjernsmo, \f(CW\*(C`\*(C'\fR, then refactored again by Toby Inkster, \&\f(CW\*(C`\*(C'\fR. .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2010 Gregory Todd Williams and \s-1ABC\s0 Startsiden \s-1AS.\s0 .PP Copyright 2012 Toby Inkster. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.