line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package RDF::SKOS::STW; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
204745
|
use base 'RDF::SKOS::Redland'; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1427
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
RDF::SKOS::STW - SKOS - STW Classification Data |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use RDF::SKOS::STW; |
12
|
|
|
|
|
|
|
my $stw = new RDF::SKOS::STW; |
13
|
|
|
|
|
|
|
# API like RDF::SKOS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
@@@@ |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 INTERFACE |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head2 Constructor |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
The construct does not expect any parameters. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
our $model; |
28
|
|
|
|
|
|
|
sub _initialize { |
29
|
|
|
|
|
|
|
use RDF::Redland; |
30
|
|
|
|
|
|
|
my $storage = new RDF::Redland::Storage ("hashes", "test", "hash-type='memory'"); |
31
|
|
|
|
|
|
|
$model = new RDF::Redland::Model ($storage, ""); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $parser = new RDF::Redland::Parser (undef, "application/rdf+xml") |
34
|
|
|
|
|
|
|
or die "Failed to find parser\n"; |
35
|
|
|
|
|
|
|
my $uri = new RDF::Redland::URI ("file:data/stw.rdf"); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
$/ = undef; |
38
|
|
|
|
|
|
|
my $rdf = ; |
39
|
|
|
|
|
|
|
$parser->parse_string_into_model ($rdf, $uri, $model); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub new { |
43
|
|
|
|
|
|
|
my $class = shift; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
_initialize unless $model; |
46
|
|
|
|
|
|
|
my $skos = new RDF::SKOS::Redland ($model); |
47
|
|
|
|
|
|
|
return bless $skos, $class; # rebless it |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=pod |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 Methods |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
See L. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 AUTHOR |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Robert Barta, C<< >> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 BUGS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
63
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
64
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Copyright 2009 Robert Barta, all rights reserved. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under the same terms as Perl |
71
|
|
|
|
|
|
|
itself. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
"against all odds"; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
__DATA__ |