TAP::Formatter::EARL::Session - Session implementation for TAP Formatter to EARL
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#') );
This defines a session for each individual part of the test result. You would probably not call this directly.
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.
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.
Please report any bugs to https://github.com/kjetilk/p5-tap-formatter-earl/issues.
Kjetil Kjernsmo <kjetilk@cpan.org>.
This software is copyright (c) 2019 by Inrupt Inc.
This is free software, licensed under:
The MIT (X11) License
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.
To install TAP::Formatter::EARL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm TAP::Formatter::EARL
CPAN shell
perl -MCPAN -e shell install TAP::Formatter::EARL
For more information on module installation, please visit the detailed CPAN module installation guide.