line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package RDF::TriN3; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
127251
|
use 5.010; |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
128
|
|
4
|
3
|
|
|
3
|
|
2081
|
use RDF::Trine; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use RDF::Trine::Node::Formula; |
6
|
|
|
|
|
|
|
use RDF::Trine::Parser::Notation3; |
7
|
|
|
|
|
|
|
use RDF::Trine::Parser::ShorthandRDF; |
8
|
|
|
|
|
|
|
use RDF::Trine::Serializer::Notation3; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.206'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
1; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
__END__ |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
RDF::TriN3 - notation 3 extensions for RDF::Trine |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 DESCRIPTION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
This module extends L<RDF::Trine> in three ways: |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=over 4 |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=item * Adds a Notation 3 parser. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=item * Adds a Notation 3 serializer. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=item * Provides a subclass of literals to represent Notation 3 formulae. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=back |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
In addition, a parser is provided for Notation 3 extended with ShorthandRDF |
35
|
|
|
|
|
|
|
notation - L<http://esw.w3.org/ShorthandRDF>. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Implementing N3 logic and the cwm built-ins is considered outside the scope |
40
|
|
|
|
|
|
|
of this distribution, though I am interested in doing that as part of a |
41
|
|
|
|
|
|
|
separate project. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
RDF::TriN3 currently relies entirely on RDF::Trine to provide implementations |
44
|
|
|
|
|
|
|
of the concept of graphs, and storage. Thus any graphs that can't be |
45
|
|
|
|
|
|
|
represented using RDF::Trine can't be represented in RDF::TriN3. RDF::Trine's |
46
|
|
|
|
|
|
|
graph model is a superset of RDF, but a subset of Notation 3's model. While |
47
|
|
|
|
|
|
|
this allows literal subjects, and literal and blank node predicates, these |
48
|
|
|
|
|
|
|
may not be supported by all storage engines; additionally top-level variables |
49
|
|
|
|
|
|
|
(?foo), and top-level @forSome and @forAll (i.e. not nested inside a formula) |
50
|
|
|
|
|
|
|
might cause problems. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
RDF::Trine::Store::DBI has some issues with literal subjects, and literal and |
53
|
|
|
|
|
|
|
blank node predicates, allowing them to be stored, but not retrieved. From |
54
|
|
|
|
|
|
|
version 0.128, RDF::Trine::Store::DBI offers a C<clear_restrictions> method |
55
|
|
|
|
|
|
|
that should resolve these issues. RDF::Trine::Store::Memory is fine. Other |
56
|
|
|
|
|
|
|
stores are not tested. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Please report any bugs to L<http://rt.cpan.org/>. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 SEE ALSO |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
L<RDF::Trine::Node::Formula>, |
63
|
|
|
|
|
|
|
L<RDF::Trine::Parser::Notation3>, |
64
|
|
|
|
|
|
|
L<RDF::Trine::Serializer::Notation3>. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
L<RDF::Trine::Parser::ShorthandRDF>, |
67
|
|
|
|
|
|
|
L<RDF::Trine::Parser::Pretdsl>. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
L<RDF::Trine>. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L<http://www.perlrdf.org/>. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
L<http://www.w3.org/DesignIssues/Notation3>. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 AUTHOR |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Toby Inkster E<lt>tobyink@cpan.orgE<gt>. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Copyright 2010-2012 Toby Inkster |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it |
84
|
|
|
|
|
|
|
under the same terms as Perl itself. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 DISCLAIMER OF WARRANTIES |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED |
89
|
|
|
|
|
|
|
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
90
|
|
|
|
|
|
|
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |