This file is indexed.

/usr/share/perl5/RDF/Closure/Engine.pm is in librdf-closure-perl 0.001-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
package RDF::Closure::Engine;

use 5.008;
use strict;
use utf8;

use Module::Pluggable
	except      => qw[RDF::Closure::Engine::Core],
	require     => 1,
	search_path => qw[RDF::Closure::Engine],
	sub_name    => 'engines',	
	;

our $VERSION = '0.001';

sub new
{
	my ($class, $engine, @args) = @_;
	$engine = 'RDFS' unless defined $engine;

	my ($match) = grep { /^${class}::${engine}$/i } $class->engines;
	
	die sprintf("Package %s::%s not found.\n", $class, $engine)
		unless $match;
	
	return $match->new(@args);
}

sub entailment_regime
{
	return undef;
}

# Child classes MUST implement the following methods
sub graph   { die "Not implemented.\n"; }
sub closure { die "Not implemented.\n"; }
sub reset   { die "Not implemented.\n"; }
sub errors  { die "Not implemented.\n"; }
	
1;

=head1 NAME

RDF::Closure::Engine - an engine for inferring triples

=head1 DESCRIPTION

=head2 Constructor

=over

=item * C<< new($regime, $model, @arguments) >>

Instantiates an inference engine. This:

  RDF::Closure::Engine->new('RDFS', $model, @args);

is just a shortcut for:

  RDF::Closure::Engine::RDFS->new($model, @args);

Though in the former, 'RDFS' is treated case-insensitively.

C<< $model >> must be an L<RDF::Trine::Model> which the engine
will read its input from and write its output to.

=back

=head2 Methods

=over

=item * C<< entailment_regime >>

Returns a URI string identifying the type of inference implemented by the engine,
or undef.

=item * C<< graph >>

Returns the L<RDF::Trine::Model> the engine is operating on.

=item * C<< closure( [ $is_subsequent ] ) >>

Adds any new triples to the graph that can be inferred.

If C<< $is_subsequent >> is true, then skips axioms.

=item * C<< errors >>

Returns a list of consistency violations found so far.

=item * C<< reset >>

Removes all inferred triples from the graph.

=back

=head2 Class Method

=over

=item * C<< engines >>

Return a list of engines installed, e.g. 'RDF::Closure::Engine::RDFS'.

=back

=head1 SEE ALSO

L<RDF::Closure>,
L<RDF::Closure::Engine::RDFS>,
L<RDF::Closure::Engine::OWL2RL>,
L<RDF::Closure::Engine::OWL2Plus>.

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

=head1 AUTHOR

Toby Inkster E<lt>tobyink@cpan.orgE<gt>.

=head1 COPYRIGHT

Copyright 2011-2012 Toby Inkster

This library is free software; you can redistribute it and/or modify it
under any of the following licences:

=over

=item * The Artistic License 1.0 L<http://www.perlfoundation.org/artistic_license_1_0>.

=item * The GNU General Public License Version 1 L<http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt>,
or (at your option) any later version.

=item * The W3C Software Notice and License L<http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231>.

=item * The Clarified Artistic License L<http://www.ncftp.com/ncftp/doc/LICENSE.txt>.

=back


=head1 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.


=cut