| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package ODO::RDFS::Class::PropertiesContainer; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
34
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
29
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use vars qw( $AUTOLOAD @ISA ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
47
|
|
|
7
|
1
|
|
|
1
|
|
995
|
use ODO::RDFS::Resource::PropertiesContainer; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
45
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Resource::PropertiesContainer', ); |
|
10
|
1
|
|
|
1
|
|
7
|
use vars qw /$VERSION/; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
292
|
|
|
11
|
|
|
|
|
|
|
$VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /: (\d+)\.(\d+)/; |
|
12
|
|
|
|
|
|
|
# Methods |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub subClassOf { |
|
16
|
6
|
|
|
6
|
0
|
63
|
my $self = shift; |
|
17
|
|
|
|
|
|
|
|
|
18
|
6
|
|
|
|
|
17
|
my $parent = $self->{'parent'}; |
|
19
|
6
|
50
|
|
|
|
22
|
unless($parent) { |
|
20
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
|
|
23
|
6
|
50
|
33
|
|
|
25
|
if( scalar(@_) > 0 |
|
24
|
|
|
|
|
|
|
&& UNIVERSAL::isa($_[0], 'ODO::RDFS::Properties::subClassOf')) { |
|
25
|
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
0
|
my $value = $_[0]->value(); |
|
27
|
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
0
|
my $property = ODO::Node::Resource->new( ODO::RDFS::Properties::subClassOf->objectURI() ); |
|
29
|
0
|
0
|
|
|
|
0
|
if(UNIVERSAL::isa($value, 'ODO::Node::Literal')) { |
|
30
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $value); |
|
31
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
else { |
|
34
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
|
35
|
|
|
|
|
|
|
# all to the graph |
|
36
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $_[0]->subject()); |
|
37
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
|
38
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{ $value } ); |
|
|
0
|
|
|
|
|
0
|
|
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
6
|
|
|
|
|
21
|
return $parent->get_property_values( 'ODO::RDFS::Properties::subClassOf' ); |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |