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