SYNOPSIS

 use LWP::UserAgent;
 use XML::Atom::OWL;
 use XML::Atom::FromOWL;

 my $ua       = LWP::UserAgent->new;
 my $r        = $ua->get('http://intertwingly.net/blog/index.atom');
 my $atomowl  = XML::Atom::OWL->new($r->decoded_content, $r->base);
 my $model    = $atomowl->consume->graph;  ## an RDF::Trine::Model

 my $exporter = XML::Atom::FromOWL->new;
 print $_->as_xml
        foreach $exporter->export_feeds($model);

DESCRIPTION

This module reads \s-1RDF\s0 and writes Atom feeds. It does the reverse of XML::Atom::OWL.

Constructor

  • \*(C`new(%options)\*(C' Returns a new XML::Atom::FromOWL object. There are no valid options at the moment - the hash is reserved for future use.

Methods

  • \*(C`export_feeds($input, %options)\*(C' Returns a list of feeds found in the input, in no particular order. The input may be a \s-1URI\s0, file name, RDF::Trine::Model or anything else that can be handled by the \*(C`parse\*(C' function of RDF::TrineX::Functions. Each item in the list returned is an XML::Atom::Feed.

  • \*(C`export_feed($input, $subject, %options)\*(C' As per \*(C`export_feeds\*(C' but exports just a single feed. The subject provided must be an RDF::Trine::Node::Blank or RDF::Trine::Node::Resource of type awol:Feed.

  • \*(C`export_entries($input, %options)\*(C' Returns a list of entries found in the input, in no particular order. The input may be a \s-1URI\s0, file name, RDF::Trine::Model or anything else that can be handled by the \*(C`parse\*(C' function of RDF::TrineX::Functions. Each item in the list returned is an XML::Atom::Entry.

  • \*(C`export_entry($input, $subject, %options)\*(C' As per \*(C`export_entry\*(C' but exports just a single entry. The subject provided must be an RDF::Trine::Node::Blank or RDF::Trine::Node::Resource of type awol:Entry.

\s-1RDF\s0 Input

Input is expected to use AtomOwl http://bblfish.net/work/atom-owl/2006-06-06/# <http://bblfish.net/work/atom-owl/2006-06-06/#>.

Feed Output

This module doesn't attempt to enforce many of \s-1OWL\s0's semantic constraints (e.g. it doesn't enforce that an entry has only one title). It relies on XML::Atom::Feed and XML::Atom::Entry for that sort of thing, but if your input is sensible that shouldn't be a problem.

RELATED TO XML::Atom::FromOWL…

XML::Atom::OWL, HTML::Microformats, RDF::TrineX::Functions, XML::Atom::Feed, XML::Atom::Entry.

http://bblfish.net/work/atom-owl/2006-06-06/ <http://bblfish.net/work/atom-owl/2006-06-06/>.

<http://www.perlrdf.org/>.

AUTHOR

Toby Inkster <[email protected]>.

COPYRIGHT AND LICENCE

This software is copyright (c) 2011-2012 by Toby Inkster.

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

DISCLAIMER OF WARRANTIES

\s-1THIS\s0 \s-1PACKAGE\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0 \s-1MERCHANTIBILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.