| 1 |
NAME |
| 2 |
RDF::Helper::Properties - Module that provides shortcuts to retrieve |
| 3 |
certain information |
| 4 |
|
| 5 |
VERSION |
| 6 |
Version 0.22 |
| 7 |
|
| 8 |
SYNOPSIS |
| 9 |
my $helper = RDF::Helper::Properties->new($model); |
| 10 |
print $helper->title($node); |
| 11 |
|
| 12 |
DESCRIPTION |
| 13 |
Constructor |
| 14 |
"new(model => $model, %attributes)" |
| 15 |
Moose-style constructor. |
| 16 |
|
| 17 |
Attributes |
| 18 |
"model" |
| 19 |
The RDF::Trine::Model which data will be extracted from. The only |
| 20 |
attribute which the constructor requires. |
| 21 |
|
| 22 |
"page_properties" |
| 23 |
An arrayref of RDF::Trine::Node::Resource objects, each of which are |
| 24 |
taken to mean "something a bit like foaf:homepage". There is a |
| 25 |
sensible default. |
| 26 |
|
| 27 |
"title_properties" |
| 28 |
An arrayref of RDF::Trine::Node::Resource objects, each of which are |
| 29 |
taken to mean "something a bit like foaf:name". There is a sensible |
| 30 |
default. |
| 31 |
|
| 32 |
"cache" |
| 33 |
A hashref for caching data into, or a blessed object which supports |
| 34 |
"get" and "set" methods compatible with CHI and Cache::Cache. If you |
| 35 |
do not supply a cache, then a hashref will be used by default. |
| 36 |
|
| 37 |
Methods |
| 38 |
"page($node)" |
| 39 |
A suitable page to redirect to, based on foaf:page or foaf:homepage. |
| 40 |
|
| 41 |
"title($node)" |
| 42 |
A suitable title for the document will be returned, based on |
| 43 |
document contents. |
| 44 |
|
| 45 |
Called in list context, returns a ($value, $lang, $datatype) tuple. |
| 46 |
|
| 47 |
"description($node)" |
| 48 |
A suitable description for the document will be returned, based on |
| 49 |
document contents |
| 50 |
|
| 51 |
"html_node_value($node)" |
| 52 |
Formats the nodes for HTML output. |
| 53 |
|
| 54 |
AUTHOR |
| 55 |
Most of the code was written by Gregory Todd Williams |
| 56 |
"<[email protected]>" for RDF::LinkedData::Apache, but refactored into |
| 57 |
this class for use by other modules by Kjetil Kjernsmo, "<kjetilk at |
| 58 |
cpan.org>", then refactored again by Toby Inkster, "<tobyink at |
| 59 |
cpan.org>". |
| 60 |
|
| 61 |
COPYRIGHT & LICENSE |
| 62 |
Copyright 2010 Gregory Todd Williams and ABC Startsiden AS. |
| 63 |
|
| 64 |
Copyright 2012 Toby Inkster. |
| 65 |
|
| 66 |
This program is free software; you can redistribute it and/or modify it |
| 67 |
under the same terms as Perl itself. |
| 68 |
|