NAME

RDF::RDFa::Parser::Trine - Use a RDF::Trine::Model for the returned RDF graph

VERSION

Version 0.2

SYNOPSIS

This module inherits all the methods of its superclass, but overrides the graph method, and will instead return an RDF::Trine::Model.

$storage = RDF::Trine::Store::DBI->temporary_store;
$parser = RDF::RDFa::Parser::Trine->new($storage, $xhtml, 'http://example.com/foo');
$parser->consume;
my $graph = $parser->graph;

METHODS

$p = RDF::RDFa::Parser::Trine->new($store, $xhtml, $baseuri)

The constructor. Has three parameters. The first is a (single) RDF::Trine::Store. The others are passed directly to the superclass.

$p->graph( [ $graph_name ] )

Without a graph name, this method will return an RDF::Trine::Model object with all statements of the full graph. As per the RDFa specification, it will always return an unnamed graph containing all the triples of the RDFa document. If the model contains multiple graphs, all triples will be returned unless a graph name is specified.

It will also take an optional graph URI as argument, and return an RDF::Trine::Model tied to a temporary storage with all triples in that graph.

$p->graphs

Will return a hashref of all named graphs, where the graph name is a key and the value is a RDF::Trine::Model tied to a temporary storage.

AUTHOR

Kjetil Kjernsmo, <kjetilk at cpan.org>

BUGS

Please report any bugs or feature requests to bug-rdf-rdfa-parser-trine at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=RDF-RDFa-Parser-Trine. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc RDF::RDFa::Parser::Trine

You can also look for information at:

ACKNOWLEDGEMENTS

I would like to thank Toby Inkster for creating Swignition and the parser module that this module depends on. I would also like to thank Greg Williams for RDF::Trine.

Finally, I would like to thank the persistently circling dahuts for their help and encouragement.

COPYRIGHT & LICENSE

Copyright 2009 Kjetil Kjernsmo.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.