1
# RDF::Query::Algebra::TimeGraph
2
# -----------------------------------------------------------------------------
6
RDF::Query::Algebra::TimeGraph - Algebra class for temporal patterns
10
This document describes RDF::Query::Algebra::TimeGraph version 2.905.
14
package RDF::Query::Algebra::TimeGraph;
18
no warnings 'redefine';
19
use base qw(RDF::Query::Algebra);
22
use Carp qw(carp croak confess);
24
######################################################################
31
######################################################################
35
Beyond the methods documented below, this class inherits methods from the
36
L<RDF::Query::Algebra> class.
42
=item C<new ( $interval, $pattern, $time_triples )>
44
Returns a new TimeGraph structure.
50
my @data = @_; # $interval, $pattern, $triples
51
return bless( [ 'TIME', @data ], $class );
54
=item C<< construct_args >>
56
Returns a list of arguments that, passed to this class' constructor,
57
will produce a clone of this algebra pattern.
63
return ($self->interval, $self->pattern, $self->time_triples);
68
Returns the time interval node of the temporal graph expression.
76
$self->[1] = $interval;
83
Returns the graph pattern of the temporal graph expression.
92
=item C<< time_triples >>
94
Returns the triples describing the time interval of the temporal graph.
105
Returns the SSE string for this algebra expression.
112
my $prefix = shift || '';
113
my $indent = $context->{indent};
116
'(time\n${prefix}${indent}%s\n${prefix}${indent}%s\n${prefix}${indent}%s)',
117
$self->interval->sse( $context, "${prefix}${indent}" ),
118
$self->pattern->sse( $context, "${prefix}${indent}" ),
119
$self->time_triples->sse( $context, "${prefix}${indent}" ),
123
=item C<< as_sparql >>
125
Returns the SPARQL string for this algebra expression.
133
my $nindent = $indent . "\t";
134
my $string = sprintf(
136
$self->interval->as_sparql( $context, $indent ),
137
$self->pattern->as_sparql( $context, $indent ),
144
Returns the type of this algebra expression.
152
=item C<< referenced_variables >>
154
Returns a list of the variable names used in this algebra expression.
158
sub referenced_variables {
160
return RDF::Query::_uniq(
161
map { $_->name } grep { $_->isa('RDF::Query::Node::Variable') } ($self->graph),
162
$self->pattern->referenced_variables,
163
$self->time_triples->referenced_variables,
167
=item C<< potentially_bound >>
169
Returns a list of the variable names used in this algebra expression that will
170
bind values during execution.
174
sub potentially_bound {
176
return RDF::Query::_uniq(
177
map { $_->name } grep { $_->isa('RDF::Query::Node::Variable') } ($self->graph),
178
$self->pattern->potentially_bound,
179
$self->time_triples->potentially_bound,
183
=item C<< definite_variables >>
185
Returns a list of the variable names that will be bound after evaluating this algebra expression.
189
sub definite_variables {
191
return RDF::Query::_uniq(
192
map { $_->name } grep { $_->isa('RDF::Query::Node::Variable') } ($self->graph),
193
$self->pattern->definite_variables,
194
$self->time_triples->definite_variables,
206
Gregory Todd Williams <gwilliams@cpan.org>