line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
Catmandu::FedoraCommons::Model::getRelationships - Perl model for the Fedora 'getRelationships' REST call |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 SYNOPSIS |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Catmandu::FedoraCommons; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $fedora = Catmandu::FedoraCommons->new('http://localhost:8080/fedora','fedoraAdmin','fedoraAdmin'); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $obj = $fedora->getRelationships(pid => 'demo:29')->parse_content; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Returns a RDF::Trine::Model model |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 SEE ALSO |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
L<Catmandu::FedoraCommons> |
18
|
|
|
|
|
|
|
L<RDF::Trine::Model> |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=cut |
21
|
|
|
|
|
|
|
package Catmandu::FedoraCommons::Model::getRelationships; |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
54410
|
use RDF::Trine; |
|
1
|
|
|
|
|
1116628
|
|
|
1
|
|
|
|
|
119
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub parse { |
26
|
0
|
|
|
0
|
0
|
|
my ($class,$xml) = @_; |
27
|
0
|
|
|
|
|
|
my $model = RDF::Trine::Model->temporary_model; |
28
|
0
|
|
|
|
|
|
my $parser = RDF::Trine::Parser->new('rdfxml'); |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
$parser->parse_into_model(undef,$xml,$model); |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
return $model; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |