RDF::RDFa::Template::Unit - An individual graph pattern of an RDFa Template
This class holds an individual graph pattern of an RDFa Template. This has several elements, a Basic Graph Pattern, a query endpoint and a graph name from the RDFa document.
$doc = RDF::RDFa::Template::Unit->new(triples => \@triples, endpoint => 'http://dbpedia.org/sparql', doc_graph => 'http://example.org/graph'
The constructor. Takes three named arguments:
triples
An arrayref with RDF::Trine::Statements, or subclasses thereof.
endpoint
A SPARQL endpoint can optionally be set in the constructor.
doc_graph
A graph name for the document. TODO: Not used.
Will return an RDF::Query::Algebra::BasicGraphPattern object containing the Basic Graph Pattern of this unit.
If no argument is given and the unit contains a SPARQL endpoint, this will be returned as a string. If a string argument is given, this will be used to set the endpoint URL.
Used to set and get a RDF::Trine::Iterator object that can be used to explore the query results for this unit.
To set the iterator, send a RDF::Trine::Iterator object as the only argument.
If no argument is given, this will return an RDF::Trine::Iterator object that can be used to explore the query results for this unit, or an empty hashref if no results are available.
Kjetil Kjernsmo, <kjetilk at cpan.org>
<kjetilk at cpan.org>
Copyright 2010 Kjetil Kjernsmo.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install RDF::RDFa::Template, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RDF::RDFa::Template
CPAN shell
perl -MCPAN -e shell install RDF::RDFa::Template
For more information on module installation, please visit the detailed CPAN module installation guide.