| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# RDF::Query::Algebra::Create |
|
2
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
RDF::Query::Algebra::Create - Algebra class for CREATE GRAPH operations |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 VERSION |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
This document describes RDF::Query::Algebra::Create version 2.915_01. |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
package RDF::Query::Algebra::Create; |
|
15
|
|
|
|
|
|
|
|
|
16
|
36
|
|
|
36
|
|
185
|
use strict; |
|
|
36
|
|
|
|
|
83
|
|
|
|
36
|
|
|
|
|
959
|
|
|
17
|
36
|
|
|
36
|
|
174
|
use warnings; |
|
|
36
|
|
|
|
|
70
|
|
|
|
36
|
|
|
|
|
965
|
|
|
18
|
36
|
|
|
36
|
|
176
|
no warnings 'redefine'; |
|
|
36
|
|
|
|
|
59
|
|
|
|
36
|
|
|
|
|
1149
|
|
|
19
|
36
|
|
|
36
|
|
173
|
use base qw(RDF::Query::Algebra); |
|
|
36
|
|
|
|
|
60
|
|
|
|
36
|
|
|
|
|
2562
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
36
|
|
|
36
|
|
197
|
use Data::Dumper; |
|
|
36
|
|
|
|
|
81
|
|
|
|
36
|
|
|
|
|
1708
|
|
|
22
|
36
|
|
|
36
|
|
188
|
use Log::Log4perl; |
|
|
36
|
|
|
|
|
70
|
|
|
|
36
|
|
|
|
|
264
|
|
|
23
|
36
|
|
|
36
|
|
1687
|
use Scalar::Util qw(refaddr); |
|
|
36
|
|
|
|
|
71
|
|
|
|
36
|
|
|
|
|
1903
|
|
|
24
|
36
|
|
|
36
|
|
182
|
use Carp qw(carp croak confess); |
|
|
36
|
|
|
|
|
65
|
|
|
|
36
|
|
|
|
|
2033
|
|
|
25
|
36
|
|
|
36
|
|
182
|
use Scalar::Util qw(blessed reftype refaddr); |
|
|
36
|
|
|
|
|
63
|
|
|
|
36
|
|
|
|
|
1832
|
|
|
26
|
36
|
|
|
36
|
|
173
|
use Time::HiRes qw(gettimeofday tv_interval); |
|
|
36
|
|
|
|
|
77
|
|
|
|
36
|
|
|
|
|
234
|
|
|
27
|
36
|
|
|
36
|
|
3771
|
use RDF::Trine::Iterator qw(smap sgrep swatch); |
|
|
36
|
|
|
|
|
68
|
|
|
|
36
|
|
|
|
|
3274
|
|
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
###################################################################### |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
our ($VERSION); |
|
32
|
|
|
|
|
|
|
my %TRIPLE_LABELS; |
|
33
|
|
|
|
|
|
|
my @node_methods = qw(subject predicate object); |
|
34
|
|
|
|
|
|
|
BEGIN { |
|
35
|
36
|
|
|
36
|
|
10512
|
$VERSION = '2.915_01'; |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
###################################################################### |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 METHODS |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Beyond the methods documented below, this class inherits methods from the |
|
43
|
|
|
|
|
|
|
L<RDF::Query::Algebra> class. |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=over 4 |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item C<new ( $graph )> |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Returns a new CREATE GRAPH structure. |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub new { |
|
56
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
|
57
|
0
|
|
|
|
|
|
my $graph = shift; |
|
58
|
0
|
0
|
|
|
|
|
unless ($graph) { |
|
59
|
0
|
|
|
|
|
|
$graph = RDF::Trine::Node::Nil->new; |
|
60
|
|
|
|
|
|
|
} |
|
61
|
0
|
|
|
|
|
|
return bless([$graph], $class); |
|
62
|
|
|
|
|
|
|
} |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item C<< construct_args >> |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Returns a list of arguments that, passed to this class' constructor, |
|
67
|
|
|
|
|
|
|
will produce a clone of this algebra pattern. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub construct_args { |
|
72
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
73
|
0
|
|
|
|
|
|
return ($self->graph); |
|
74
|
|
|
|
|
|
|
} |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item C<< as_sparql >> |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Returns the SPARQL string for this algebra expression. |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub as_sparql { |
|
83
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
84
|
0
|
|
|
|
|
|
my $context = shift; |
|
85
|
0
|
|
|
|
|
|
my $indent = shift; |
|
86
|
|
|
|
|
|
|
|
|
87
|
0
|
|
|
|
|
|
my $graph = $self->graph; |
|
88
|
0
|
|
|
|
|
|
my $string = sprintf( "CREATE GRAPH <%s>", $graph->uri_value ); |
|
89
|
0
|
|
|
|
|
|
return $string; |
|
90
|
|
|
|
|
|
|
} |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item C<< sse >> |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Returns the SSE string for this algebra expression. |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub sse { |
|
99
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
100
|
0
|
|
|
|
|
|
my $context = shift; |
|
101
|
0
|
|
|
|
|
|
my $indent = shift; |
|
102
|
|
|
|
|
|
|
|
|
103
|
0
|
|
|
|
|
|
my $graph = $self->graph; |
|
104
|
0
|
|
|
|
|
|
my $string = sprintf( "(create <%s>)", $graph->uri_value ); |
|
105
|
0
|
|
|
|
|
|
return $string; |
|
106
|
|
|
|
|
|
|
} |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item C<< referenced_blanks >> |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Returns a list of the blank node names used in this algebra expression. |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=cut |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub referenced_blanks { |
|
115
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
116
|
0
|
|
|
|
|
|
return; |
|
117
|
|
|
|
|
|
|
} |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item C<< referenced_variables >> |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
sub referenced_variables { |
|
124
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
125
|
0
|
|
|
|
|
|
return; |
|
126
|
|
|
|
|
|
|
} |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item C<< graph >> |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=cut |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
sub graph { |
|
133
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
134
|
0
|
|
|
|
|
|
return $self->[0]; |
|
135
|
|
|
|
|
|
|
} |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
1; |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
__END__ |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=back |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head1 AUTHOR |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Gregory Todd Williams <gwilliams@cpan.org> |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |