| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
=head1 NAME |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
AtteanX::Store::Simple - Simple, unindexed, in-memory RDF store |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 VERSION |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
This document describes AtteanX::Store::Simple version 0.032 |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use AtteanX::Store::Simple; |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
AtteanX::Store::Simple provides an in-memory quad-store. |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=cut |
|
18
|
|
|
|
|
|
|
|
|
19
|
1
|
|
|
1
|
|
2161
|
use v5.14; |
|
|
1
|
|
|
|
|
4
|
|
|
20
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
36
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use Moo; |
|
23
|
1
|
|
|
1
|
|
5
|
use Type::Tiny::Role; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
5
|
|
|
24
|
1
|
|
|
1
|
|
301
|
use Types::Standard qw(Int ArrayRef HashRef ConsumerOf InstanceOf); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
38
|
|
|
25
|
1
|
|
|
1
|
|
5
|
use Encode; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
15
|
|
|
26
|
1
|
|
|
1
|
|
970
|
use Set::Scalar; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
71
|
|
|
27
|
1
|
|
|
1
|
|
5
|
use Digest::SHA; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
48
|
|
|
28
|
1
|
|
|
1
|
|
7
|
use List::Util qw(first); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
46
|
|
|
29
|
1
|
|
|
1
|
|
5
|
use Scalar::Util qw(refaddr reftype blessed); |
|
|
1
|
|
|
|
|
6
|
|
|
|
1
|
|
|
|
|
47
|
|
|
30
|
1
|
|
|
1
|
|
14
|
use namespace::clean; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
54
|
|
|
31
|
1
|
|
|
1
|
|
7
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
13
|
|
|
32
|
|
|
|
|
|
|
with 'Attean::API::QuadStore', 'Attean::API::RDFStarStore'; |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 METHODS |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Beyond the methods documented below, this class inherits methods from the |
|
37
|
|
|
|
|
|
|
L<Attean::API::QuadStore> class. |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=over 4 |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=item C<< new ( quads => \@quads ) >> |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Returns a new memory-backed storage object. |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=cut |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
has quads => (is => 'rw', isa => ArrayRef[ConsumerOf['Attean::API::Quad']], default => sub { [] }); |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item C<< get_quads ( $subject, $predicate, $object, $graph ) >> |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Returns a stream object of all statements matching the specified subject, |
|
52
|
|
|
|
|
|
|
predicate and objects. Any of the arguments may be undef to match any value. |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $self = shift; |
|
57
|
|
|
|
|
|
|
my @nodes = @_; |
|
58
|
|
|
|
|
|
|
my $quads = $self->quads; |
|
59
|
|
|
|
|
|
|
my $iter = Attean::ListIterator->new( values => $quads, item_type => 'Attean::API::Quad' ); |
|
60
|
|
|
|
|
|
|
return $iter->matching_pattern(@nodes); |
|
61
|
|
|
|
|
|
|
} |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=back |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 BUGS |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Please report any bugs or feature requests to through the GitHub web interface |
|
73
|
|
|
|
|
|
|
at L<https://github.com/kasei/perlrdf2/issues>. |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 AUTHOR |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Gregory Todd Williams C<< <gwilliams@cpan.org> >> |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Copyright (c) 2014--2022 Gregory Todd Williams. This |
|
82
|
|
|
|
|
|
|
program is free software; you can redistribute it and/or modify it under |
|
83
|
|
|
|
|
|
|
the same terms as Perl itself. |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |