use strict;
use warnings;
package RDF::Flow::Dummy;
  $RDF::Flow::Dummy::VERSION = '0.178';
#ABSTRACT: Dummy source that always returns one trivial triple

use RDF::Trine qw(statement iri);

use parent 'RDF::Flow::Source';
use RDF::Flow::Source qw(:util);

our $rdf_type      = iri('');
our $rdfs_Resource = iri('');

sub retrieve_rdf {
    my ($self, $env) = @_;
    my $uri = rdflow_uri( $env );

    my $rdf = RDF::Trine::Model->new;

    $rdf->add_statement( statement( iri($uri), $rdf_type, $rdfs_Resource ) )
        if $uri;

    return $rdf;



=head1 NAME

RDF::Flow::Dummy - Dummy source that always returns one trivial triple

=head1 VERSION

version 0.178


This L<RDF::Flow::Source> always returns a single triple such as

    <> rdf:type rdfs:Resource .

where C<> is replaced by the request URI. No triple is added
if the request is broken by not providing a request URI. You can use this
module for testing and as boilerplate for you own sources.

=head1 AUTHOR

Jakob Voß <>


This software is copyright (c) 2011 by Jakob Voß.

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