line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ODO::RDFS::Properties::range; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
45
|
|
7
|
1
|
|
|
1
|
|
5
|
use vars qw /$VERSION/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5372
|
|
8
|
|
|
|
|
|
|
$VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /: (\d+)\.(\d+)/; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
7
|
use ODO; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
638
|
|
11
|
1
|
|
|
1
|
|
198
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
43
|
|
12
|
1
|
|
|
1
|
|
6
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
13
|
1
|
|
|
1
|
|
5
|
use ODO::RDFS::Class; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
56
|
|
14
|
1
|
|
|
1
|
|
6
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
464
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Class', 'ODO::RDFS::Property', ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# |
19
|
|
|
|
|
|
|
# Description: A range of the subject property. |
20
|
|
|
|
|
|
|
# |
21
|
|
|
|
|
|
|
# Schema URI: http://www.w3.org/2000/01/rdf-schema# |
22
|
|
|
|
|
|
|
# |
23
|
|
|
|
|
|
|
sub new { |
24
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
25
|
0
|
|
|
|
|
0
|
my ($resource, $graph, %properties) = @_; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
0
|
$self = $self->SUPER::new(@_); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
return undef |
30
|
0
|
0
|
|
|
|
0
|
unless(ref $self); |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
0
|
$self->propertyContainerName( 'ODO::RDFS::Properties::range::PropertiesContainer' ); |
33
|
0
|
|
|
|
|
0
|
$self->properties(bless {}, 'ODO::RDFS::Properties::range::PropertiesContainer'); |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
0
|
$self->properties()->{'parent'} = $self; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
0
|
return $self; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub queryString { |
42
|
0
|
|
|
0
|
0
|
0
|
return '(?subj, rdf:type, )'; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub objectURI { |
46
|
5
|
|
|
5
|
0
|
55
|
return 'http://www.w3.org/2000/01/rdf-schema#range'; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub value { |
50
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
51
|
|
|
|
|
|
|
|
52
|
0
|
0
|
|
|
|
|
return $self->subject() |
53
|
|
|
|
|
|
|
if(UNIVERSAL::isa($self->subject(), 'ODO::Node::Literal')); |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
return $self->__to_statement_array(); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub __to_statement_array { |
59
|
0
|
|
|
0
|
|
|
my $self = shift; |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
my $statements = []; |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
foreach my $my_super (@ISA) { |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
next |
66
|
0
|
0
|
|
|
|
|
unless(UNIVERSAL::can($my_super, '__to_statement_array')); |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
my $super_func = "${my_super}::__to_statement_array"; |
69
|
0
|
|
|
|
|
|
push @{ $statements }, @{ $self->$super_func() }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
my %properties = (''=> '',); |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
foreach my $propertyName (keys(%properties)) { |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
next |
77
|
0
|
0
|
0
|
|
|
|
unless($propertyName && $propertyName ne ''); |
78
|
|
|
|
|
|
|
|
79
|
0
|
|
|
|
|
|
my $property = $self->properties()->$propertyName(); |
80
|
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
foreach my $p (@{ $property }) { |
|
0
|
|
|
|
|
|
|
82
|
0
|
|
|
|
|
|
my $p_value = $p->value(); |
83
|
|
|
|
|
|
|
|
84
|
0
|
|
|
|
|
|
my $property_uri = ODO::Node::Resource->new($properties{$propertyName}->objectURI() ); |
85
|
0
|
0
|
|
|
|
|
if(UNIVERSAL::isa($p_value, 'ODO::Node::Literal')) { |
86
|
0
|
|
|
|
|
|
push @{ $statements }, ODO::Statement->new($self->subject(), $property_uri, $p_value); |
|
0
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
else { |
89
|
0
|
|
|
|
|
|
push @{ $statements }, ODO::Statement->new($self->subject(), $property_uri, $p->subject()); |
|
0
|
|
|
|
|
|
|
90
|
0
|
|
|
|
|
|
push @{ $statements }, @{ $p_value }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
0
|
|
|
|
|
|
return $statements; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
1; |