NAME

TAP::Formatter::EARL::Session - Session implementation for TAP Formatter to EARL

SYNOPSIS

use TAP::Formatter::EARL::Session;
use Attean;
use Attean::RDF;
use URI::NamespaceMap;

TAP::Formatter::EARL::Session->new(
                                   model            => Attean->temporary_model,
                                   software_uri     => iri('http://example.org/script'),
                                   ns               => URI::NamespaceMap->new( [ 'rdf', 'dc', 'earl', 'doap' ] ),
                                   graph_name       => iri('http://example.org/graph'),
                                   result_prefix    => URI::Namespace->new('http://example.org/result#'),
                                   assertion_prefix => URI::Namespace->new('http://example.org/assertion#')
                                  );

DESCRIPTION

This defines a session for each individual part of the test result. You would probably not call this directly.

Attributes

It has a number of attributes, they are all required.

  • software_uri

    An Attean::IRI object that identifies the software itself. This URI will typically be minted by TAP::Formatter::EARL and therefore passed as to this class as a IRI rather than just a prefix.

The following attributes are passed from TAP::Formatter::EARL, see the documentation there:

  • model

  • ns

  • graph_name

  • assertion_prefix

  • result_prefix

Note that the attributes do not have defaults in this class, but the implementation of TAP::Formatter::EARL will pass them on.

Methods

The methods are implementations of methods required by the framework.

  • result( $result )

    A TAP::Parser::Result object will be passed as argument to this method, and based on its contents, RDF will be added to the model as a side-effect. Will return true if any statements were added, 0 otherwise. Currently, only subclasses of TAP::Parser::Result::Test will be formulated as RDF.

  • close_test

    No-op for now.

BUGS

Please report any bugs to https://github.com/kjetilk/p5-tap-formatter-earl/issues.

SEE ALSO

AUTHOR

Kjetil Kjernsmo <kjetilk@cpan.org>.

COPYRIGHT AND LICENCE

This software is copyright (c) 2019 by Inrupt Inc.

This is free software, licensed under:

The MIT (X11) License

DISCLAIMER OF WARRANTIES

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.