| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# RDF::Query::Expression::Nary |
|
2
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
RDF::Query::Expression::Nary - Class for n-ary expressions |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 VERSION |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
This document describes RDF::Query::Expression::Nary version 2.915_01. |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
package RDF::Query::Expression::Nary; |
|
15
|
|
|
|
|
|
|
|
|
16
|
36
|
|
|
36
|
|
178
|
use strict; |
|
|
36
|
|
|
|
|
66
|
|
|
|
36
|
|
|
|
|
867
|
|
|
17
|
36
|
|
|
36
|
|
176
|
use warnings; |
|
|
36
|
|
|
|
|
58
|
|
|
|
36
|
|
|
|
|
966
|
|
|
18
|
36
|
|
|
36
|
|
174
|
no warnings 'redefine'; |
|
|
36
|
|
|
|
|
55
|
|
|
|
36
|
|
|
|
|
1136
|
|
|
19
|
36
|
|
|
36
|
|
173
|
use base qw(RDF::Query::Expression); |
|
|
36
|
|
|
|
|
72
|
|
|
|
36
|
|
|
|
|
2609
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
36
|
|
|
36
|
|
187
|
use Data::Dumper; |
|
|
36
|
|
|
|
|
53
|
|
|
|
36
|
|
|
|
|
1711
|
|
|
22
|
36
|
|
|
36
|
|
190
|
use Scalar::Util qw(blessed); |
|
|
36
|
|
|
|
|
60
|
|
|
|
36
|
|
|
|
|
1594
|
|
|
23
|
36
|
|
|
36
|
|
170
|
use Carp qw(carp croak confess); |
|
|
36
|
|
|
|
|
64
|
|
|
|
36
|
|
|
|
|
2699
|
|
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
###################################################################### |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
our ($VERSION); |
|
28
|
|
|
|
|
|
|
BEGIN { |
|
29
|
36
|
|
|
36
|
|
6387
|
$VERSION = '2.915_01'; |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
###################################################################### |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 METHODS |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Beyond the methods documented below, this class inherits methods from the |
|
37
|
|
|
|
|
|
|
L<RDF::Query::Expression> class. |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=over 4 |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item C<< sse >> |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Returns the SSE string for this algebra expression. |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub sse { |
|
50
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
51
|
0
|
|
|
|
|
|
my $context = shift; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
return sprintf( |
|
54
|
|
|
|
|
|
|
'(%s %s)', |
|
55
|
|
|
|
|
|
|
$self->op, |
|
56
|
0
|
|
|
|
|
|
join(' ', map { $_->sse( $context ) } $self->operands), |
|
|
0
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
); |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item C<< as_sparql >> |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Returns the SPARQL string for this algebra expression. |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub as_sparql { |
|
67
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
68
|
0
|
|
|
|
|
|
my $context = shift; |
|
69
|
0
|
|
|
|
|
|
my $indent = shift; |
|
70
|
0
|
|
|
|
|
|
my $op = $self->op; |
|
71
|
0
|
|
|
|
|
|
my @args = map { $_->as_sparql( $context, $indent ) } $self->operands; |
|
|
0
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
return join(" $op ", @args); |
|
73
|
|
|
|
|
|
|
} |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
__END__ |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=back |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHOR |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Gregory Todd Williams <gwilliams@cpan.org> |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |