line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ODO::RDFS::Resource::PropertiesContainer; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
93
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
26
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use vars qw( $AUTOLOAD ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
48
|
|
7
|
1
|
|
|
1
|
|
4
|
use vars qw /$VERSION/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
1565
|
|
8
|
|
|
|
|
|
|
$VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /: (\d+)\.(\d+)/; |
9
|
|
|
|
|
|
|
# Methods |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub comment { |
13
|
11
|
|
|
11
|
0
|
91
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
11
|
|
|
|
|
31
|
my $parent = $self->{'parent'}; |
16
|
11
|
50
|
|
|
|
68
|
unless($parent) { |
17
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
11
|
50
|
33
|
|
|
47
|
if( scalar(@_) > 0 |
21
|
|
|
|
|
|
|
&& UNIVERSAL::isa($_[0], 'ODO::RDFS::Properties::comment')) { |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
0
|
my $value = $_[0]->value(); |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
0
|
my $property = ODO::Node::Resource->new( ODO::RDFS::Properties::comment->objectURI() ); |
26
|
0
|
0
|
|
|
|
0
|
if(UNIVERSAL::isa($value, 'ODO::Node::Literal')) { |
27
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $value); |
28
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
else { |
31
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
32
|
|
|
|
|
|
|
# all to the graph |
33
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $_[0]->subject()); |
34
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
35
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{ $value } ); |
|
0
|
|
|
|
|
0
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
11
|
|
|
|
|
44
|
return $parent->get_property_values( 'ODO::RDFS::Properties::comment' ); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub label { |
43
|
11
|
|
|
11
|
0
|
114
|
my $self = shift; |
44
|
|
|
|
|
|
|
|
45
|
11
|
|
|
|
|
33
|
my $parent = $self->{'parent'}; |
46
|
11
|
50
|
|
|
|
31
|
unless($parent) { |
47
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
11
|
50
|
33
|
|
|
43
|
if( scalar(@_) > 0 |
51
|
|
|
|
|
|
|
&& UNIVERSAL::isa($_[0], 'ODO::RDFS::Properties::label')) { |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
0
|
my $value = $_[0]->value(); |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
0
|
my $property = ODO::Node::Resource->new( ODO::RDFS::Properties::label->objectURI() ); |
56
|
0
|
0
|
|
|
|
0
|
if(UNIVERSAL::isa($value, 'ODO::Node::Literal')) { |
57
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $value); |
58
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
else { |
61
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
62
|
|
|
|
|
|
|
# all to the graph |
63
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $_[0]->subject()); |
64
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
65
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{ $value } ); |
|
0
|
|
|
|
|
0
|
|
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
11
|
|
|
|
|
36
|
return $parent->get_property_values( 'ODO::RDFS::Properties::label' ); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub member { |
73
|
11
|
|
|
11
|
0
|
104
|
my $self = shift; |
74
|
|
|
|
|
|
|
|
75
|
11
|
|
|
|
|
36
|
my $parent = $self->{'parent'}; |
76
|
11
|
50
|
|
|
|
32
|
unless($parent) { |
77
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
11
|
50
|
33
|
|
|
47
|
if( scalar(@_) > 0 |
81
|
|
|
|
|
|
|
&& UNIVERSAL::isa($_[0], 'ODO::RDFS::Properties::member')) { |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
0
|
my $value = $_[0]->value(); |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
0
|
my $property = ODO::Node::Resource->new( ODO::RDFS::Properties::member->objectURI() ); |
86
|
0
|
0
|
|
|
|
0
|
if(UNIVERSAL::isa($value, 'ODO::Node::Literal')) { |
87
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $value); |
88
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
else { |
91
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
92
|
|
|
|
|
|
|
# all to the graph |
93
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $_[0]->subject()); |
94
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
95
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{ $value } ); |
|
0
|
|
|
|
|
0
|
|
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
11
|
|
|
|
|
34
|
return $parent->get_property_values( 'ODO::RDFS::Properties::member' ); |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub seeAlso { |
103
|
11
|
|
|
11
|
0
|
111
|
my $self = shift; |
104
|
|
|
|
|
|
|
|
105
|
11
|
|
|
|
|
28
|
my $parent = $self->{'parent'}; |
106
|
11
|
50
|
|
|
|
36
|
unless($parent) { |
107
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
|
110
|
11
|
50
|
33
|
|
|
48
|
if( scalar(@_) > 0 |
111
|
|
|
|
|
|
|
&& UNIVERSAL::isa($_[0], 'ODO::RDFS::Properties::seeAlso')) { |
112
|
|
|
|
|
|
|
|
113
|
0
|
|
|
|
|
0
|
my $value = $_[0]->value(); |
114
|
|
|
|
|
|
|
|
115
|
0
|
|
|
|
|
0
|
my $property = ODO::Node::Resource->new( ODO::RDFS::Properties::seeAlso->objectURI() ); |
116
|
0
|
0
|
|
|
|
0
|
if(UNIVERSAL::isa($value, 'ODO::Node::Literal')) { |
117
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $value); |
118
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
119
|
|
|
|
|
|
|
} |
120
|
|
|
|
|
|
|
else { |
121
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
122
|
|
|
|
|
|
|
# all to the graph |
123
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $_[0]->subject()); |
124
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
125
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{ $value } ); |
|
0
|
|
|
|
|
0
|
|
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
11
|
|
|
|
|
37
|
return $parent->get_property_values( 'ODO::RDFS::Properties::seeAlso' ); |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
sub isDefinedBy { |
133
|
11
|
|
|
11
|
0
|
105
|
my $self = shift; |
134
|
|
|
|
|
|
|
|
135
|
11
|
|
|
|
|
30
|
my $parent = $self->{'parent'}; |
136
|
11
|
50
|
|
|
|
32
|
unless($parent) { |
137
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
|
140
|
11
|
50
|
33
|
|
|
46
|
if( scalar(@_) > 0 |
141
|
|
|
|
|
|
|
&& UNIVERSAL::isa($_[0], 'ODO::RDFS::Properties::isDefinedBy')) { |
142
|
|
|
|
|
|
|
|
143
|
0
|
|
|
|
|
0
|
my $value = $_[0]->value(); |
144
|
|
|
|
|
|
|
|
145
|
0
|
|
|
|
|
0
|
my $property = ODO::Node::Resource->new( ODO::RDFS::Properties::isDefinedBy->objectURI() ); |
146
|
0
|
0
|
|
|
|
0
|
if(UNIVERSAL::isa($value, 'ODO::Node::Literal')) { |
147
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $value); |
148
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
else { |
151
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
152
|
|
|
|
|
|
|
# all to the graph |
153
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $_[0]->subject()); |
154
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
155
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{ $value } ); |
|
0
|
|
|
|
|
0
|
|
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
|
|
159
|
11
|
|
|
|
|
34
|
return $parent->get_property_values( 'ODO::RDFS::Properties::isDefinedBy' ); |
160
|
|
|
|
|
|
|
} |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
sub type { |
163
|
11
|
|
|
11
|
0
|
99
|
my $self = shift; |
164
|
|
|
|
|
|
|
|
165
|
11
|
|
|
|
|
30
|
my $parent = $self->{'parent'}; |
166
|
11
|
50
|
|
|
|
32
|
unless($parent) { |
167
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
|
170
|
11
|
50
|
33
|
|
|
52
|
if( scalar(@_) > 0 |
171
|
|
|
|
|
|
|
&& UNIVERSAL::isa($_[0], 'ODO::RDFS::Properties::type')) { |
172
|
|
|
|
|
|
|
|
173
|
0
|
|
|
|
|
0
|
my $value = $_[0]->value(); |
174
|
|
|
|
|
|
|
|
175
|
0
|
|
|
|
|
0
|
my $property = ODO::Node::Resource->new( ODO::RDFS::Properties::type->objectURI() ); |
176
|
0
|
0
|
|
|
|
0
|
if(UNIVERSAL::isa($value, 'ODO::Node::Literal')) { |
177
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $value); |
178
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
179
|
|
|
|
|
|
|
} |
180
|
|
|
|
|
|
|
else { |
181
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
182
|
|
|
|
|
|
|
# all to the graph |
183
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $_[0]->subject()); |
184
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
185
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{ $value } ); |
|
0
|
|
|
|
|
0
|
|
186
|
|
|
|
|
|
|
} |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
|
189
|
11
|
|
|
|
|
38
|
return $parent->get_property_values( 'ODO::RDFS::Properties::type' ); |
190
|
|
|
|
|
|
|
} |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
sub value { |
193
|
11
|
|
|
11
|
0
|
98
|
my $self = shift; |
194
|
|
|
|
|
|
|
|
195
|
11
|
|
|
|
|
35
|
my $parent = $self->{'parent'}; |
196
|
11
|
50
|
|
|
|
32
|
unless($parent) { |
197
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
198
|
|
|
|
|
|
|
} |
199
|
|
|
|
|
|
|
|
200
|
11
|
50
|
33
|
|
|
40
|
if( scalar(@_) > 0 |
201
|
|
|
|
|
|
|
&& UNIVERSAL::isa($_[0], 'ODO::RDFS::Properties::value')) { |
202
|
|
|
|
|
|
|
|
203
|
0
|
|
|
|
|
0
|
my $value = $_[0]->value(); |
204
|
|
|
|
|
|
|
|
205
|
0
|
|
|
|
|
0
|
my $property = ODO::Node::Resource->new( ODO::RDFS::Properties::value->objectURI() ); |
206
|
0
|
0
|
|
|
|
0
|
if(UNIVERSAL::isa($value, 'ODO::Node::Literal')) { |
207
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $value); |
208
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
else { |
211
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
212
|
|
|
|
|
|
|
# all to the graph |
213
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new($parent->subject(), $property, $_[0]->subject()); |
214
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
215
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{ $value } ); |
|
0
|
|
|
|
|
0
|
|
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
} |
218
|
|
|
|
|
|
|
|
219
|
11
|
|
|
|
|
39
|
return $parent->get_property_values( 'ODO::RDFS::Properties::value' ); |
220
|
|
|
|
|
|
|
} |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
1; |