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:
An arrayref with RDF::Trine::Statements, or subclasses thereof.
A SPARQL endpoint can optionally be set in the constructor.
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.
<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.