line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ODO::Jena::Graph::PSet; |
2
|
1
|
|
|
1
|
|
33062
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
66
|
|
4
|
1
|
|
|
1
|
|
5
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
62
|
|
5
|
1
|
|
|
1
|
|
416
|
use ODO; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
35
|
|
6
|
1
|
|
|
1
|
|
598
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
36
|
|
7
|
1
|
|
|
1
|
|
804
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
563
|
use ODO::RDFS::Class; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
53
|
|
10
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Class', ); |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
5
|
use vars qw /$VERSION/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
636
|
|
13
|
|
|
|
|
|
|
$VERSION = sprintf "%d.%02d", q$Revision: 1.9 $ =~ /: (\d+)\.(\d+)/; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# |
16
|
|
|
|
|
|
|
# Description: |
17
|
|
|
|
|
|
|
# |
18
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB# |
19
|
|
|
|
|
|
|
# |
20
|
|
|
|
|
|
|
sub new { |
21
|
4
|
|
|
4
|
|
8
|
my $self = shift; |
22
|
4
|
|
|
|
|
10
|
my ( $resource, $graph, %properties ) = @_; |
23
|
4
|
|
|
|
|
25
|
$self = $self->SUPER::new(@_); |
24
|
|
|
|
|
|
|
return undef |
25
|
4
|
50
|
|
|
|
13
|
unless ( ref $self ); |
26
|
4
|
|
|
|
|
11
|
$self->propertyContainerName('ODO::Jena::Graph::PSet::PropertiesContainer'); |
27
|
4
|
|
|
|
|
31
|
$self->properties( bless {}, |
28
|
|
|
|
|
|
|
'ODO::Jena::Graph::PSet::PropertiesContainer' ); |
29
|
4
|
|
|
|
|
28
|
$self->properties()->{'parent'} = $self; |
30
|
4
|
100
|
66
|
|
|
43
|
if ( exists( $properties{'PSetName'} ) |
31
|
|
|
|
|
|
|
&& defined( $properties{'PSetName'} ) ) |
32
|
|
|
|
|
|
|
{ |
33
|
|
|
|
|
|
|
|
34
|
1
|
50
|
|
|
|
5
|
unless ( |
35
|
|
|
|
|
|
|
UNIVERSAL::isa( |
36
|
|
|
|
|
|
|
$properties{'PSetName'}, |
37
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetName' |
38
|
|
|
|
|
|
|
) |
39
|
|
|
|
|
|
|
) |
40
|
|
|
|
|
|
|
{ |
41
|
0
|
|
|
|
|
0
|
return undef; |
42
|
|
|
|
|
|
|
} |
43
|
1
|
50
|
|
|
|
18
|
unless ( $self->can('properties') ) { |
44
|
0
|
|
|
|
|
0
|
return undef; |
45
|
|
|
|
|
|
|
} |
46
|
1
|
50
|
|
|
|
4
|
unless ( $self->properties()->can('PSetName') ) { |
47
|
0
|
|
|
|
|
0
|
return undef; |
48
|
|
|
|
|
|
|
} |
49
|
1
|
|
|
|
|
13
|
$self->properties()->PSetName( $properties{'PSetName'} ); |
50
|
|
|
|
|
|
|
} |
51
|
4
|
100
|
66
|
|
|
23
|
if ( exists( $properties{'PSetTable'} ) |
52
|
|
|
|
|
|
|
&& defined( $properties{'PSetTable'} ) ) |
53
|
|
|
|
|
|
|
{ |
54
|
1
|
50
|
|
|
|
5
|
unless ( |
55
|
|
|
|
|
|
|
UNIVERSAL::isa( |
56
|
|
|
|
|
|
|
$properties{'PSetTable'}, |
57
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetTable' |
58
|
|
|
|
|
|
|
) |
59
|
|
|
|
|
|
|
) |
60
|
|
|
|
|
|
|
{ |
61
|
0
|
|
|
|
|
0
|
return undef; |
62
|
|
|
|
|
|
|
} |
63
|
1
|
50
|
|
|
|
5
|
unless ( $self->can('properties') ) { |
64
|
0
|
|
|
|
|
0
|
return undef; |
65
|
|
|
|
|
|
|
} |
66
|
1
|
50
|
|
|
|
3
|
unless ( $self->properties()->can('PSetTable') ) { |
67
|
0
|
|
|
|
|
0
|
return undef; |
68
|
|
|
|
|
|
|
} |
69
|
1
|
|
|
|
|
9
|
$self->properties()->PSetTable( $properties{'PSetTable'} ); |
70
|
|
|
|
|
|
|
} |
71
|
4
|
100
|
66
|
|
|
22
|
if ( exists( $properties{'PSetType'} ) |
72
|
|
|
|
|
|
|
&& defined( $properties{'PSetType'} ) ) |
73
|
|
|
|
|
|
|
{ |
74
|
1
|
50
|
|
|
|
5
|
unless ( |
75
|
|
|
|
|
|
|
UNIVERSAL::isa( |
76
|
|
|
|
|
|
|
$properties{'PSetType'}, |
77
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetType' |
78
|
|
|
|
|
|
|
) |
79
|
|
|
|
|
|
|
) |
80
|
|
|
|
|
|
|
{ |
81
|
0
|
|
|
|
|
0
|
return undef; |
82
|
|
|
|
|
|
|
} |
83
|
1
|
50
|
|
|
|
5
|
unless ( $self->can('properties') ) { |
84
|
0
|
|
|
|
|
0
|
return undef; |
85
|
|
|
|
|
|
|
} |
86
|
1
|
50
|
|
|
|
3
|
unless ( $self->properties()->can('PSetType') ) { |
87
|
0
|
|
|
|
|
0
|
return undef; |
88
|
|
|
|
|
|
|
} |
89
|
1
|
|
|
|
|
9
|
$self->properties()->PSetType( $properties{'PSetType'} ); |
90
|
|
|
|
|
|
|
} |
91
|
4
|
|
|
|
|
12
|
return $self; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
sub queryString { |
95
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub objectURI { |
99
|
0
|
|
|
0
|
|
0
|
return 'http://jena.hpl.hp.com/2003/04/DB#PSet'; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub value { |
103
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
104
|
0
|
0
|
|
|
|
0
|
return $self->subject() |
105
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
106
|
0
|
|
|
|
|
0
|
return $self->__to_statement_array(); |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
sub __to_statement_array { |
110
|
3
|
|
|
3
|
|
5
|
my $self = shift; |
111
|
3
|
|
|
|
|
5
|
my $statements = []; |
112
|
3
|
|
|
|
|
8
|
foreach my $my_super (@ISA) { |
113
|
|
|
|
|
|
|
next |
114
|
3
|
50
|
|
|
|
19
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
115
|
3
|
|
|
|
|
6
|
my $super_func = "${my_super}::__to_statement_array"; |
116
|
3
|
|
|
|
|
6
|
push @{$statements}, @{ $self->$super_func() }; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
14
|
|
117
|
|
|
|
|
|
|
} |
118
|
3
|
|
|
|
|
21
|
my %properties = ( |
119
|
|
|
|
|
|
|
'' => '', |
120
|
|
|
|
|
|
|
'PSetName' => 'ODO::Jena::Graph::Properties::PSetName', |
121
|
|
|
|
|
|
|
'PSetTable' => 'ODO::Jena::Graph::Properties::PSetTable', |
122
|
|
|
|
|
|
|
'PSetType' => 'ODO::Jena::Graph::Properties::PSetType', |
123
|
|
|
|
|
|
|
); |
124
|
3
|
|
|
|
|
14
|
foreach my $propertyName ( keys(%properties) ) { |
125
|
|
|
|
|
|
|
next |
126
|
12
|
100
|
66
|
|
|
104
|
unless ( $propertyName && $propertyName ne '' ); |
127
|
9
|
|
|
|
|
29
|
my $property = $self->properties()->$propertyName(); |
128
|
9
|
|
|
|
|
17
|
foreach my $p ( @{$property} ) { |
|
9
|
|
|
|
|
23
|
|
129
|
9
|
|
|
|
|
30
|
my $p_value = $p->value(); |
130
|
9
|
|
|
|
|
119
|
my $property_uri = ODO::Node::Resource->new( |
131
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
132
|
9
|
50
|
|
|
|
73
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
133
|
9
|
|
|
|
|
12
|
push @{$statements}, |
|
9
|
|
|
|
|
33
|
|
134
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
135
|
|
|
|
|
|
|
$p_value ); |
136
|
|
|
|
|
|
|
} else { |
137
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
138
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
139
|
|
|
|
|
|
|
$p->subject() ); |
140
|
0
|
|
|
|
|
0
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
} |
144
|
3
|
|
|
|
|
37
|
return $statements; |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
1; |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
package ODO::Jena::Graph::PSet::PropertiesContainer; |
149
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
23
|
|
150
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
151
|
1
|
|
|
1
|
|
4
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
152
|
1
|
|
|
1
|
|
711
|
use ODO::RDFS::Class::PropertiesContainer; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
777
|
|
153
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Class::PropertiesContainer', ); |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
# Methods |
156
|
|
|
|
|
|
|
sub PSetName { |
157
|
4
|
|
|
4
|
|
32
|
my $self = shift; |
158
|
4
|
|
|
|
|
8
|
my $parent = $self->{'parent'}; |
159
|
4
|
50
|
|
|
|
13
|
unless ($parent) { |
160
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
161
|
|
|
|
|
|
|
} |
162
|
4
|
100
|
66
|
|
|
20
|
if ( scalar(@_) > 0 |
163
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $_[0], 'ODO::Jena::Graph::Properties::PSetName' ) ) |
164
|
|
|
|
|
|
|
{ |
165
|
1
|
|
|
|
|
4
|
my $value = $_[0]->value(); |
166
|
1
|
|
|
|
|
15
|
my $property = |
167
|
|
|
|
|
|
|
ODO::Node::Resource->new( |
168
|
|
|
|
|
|
|
ODO::Jena::Graph::Properties::PSetName->objectURI() ); |
169
|
1
|
50
|
|
|
|
10
|
if ( UNIVERSAL::isa( $value, 'ODO::Node::Literal' ) ) { |
170
|
1
|
|
|
|
|
16
|
my $stmt = |
171
|
|
|
|
|
|
|
ODO::Statement->new( $parent->subject(), $property, $value ); |
172
|
1
|
|
|
|
|
12
|
$parent->graph()->add($stmt); |
173
|
|
|
|
|
|
|
} else { |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
176
|
|
|
|
|
|
|
# all to the graph |
177
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new( $parent->subject(), $property, |
178
|
|
|
|
|
|
|
$_[0]->subject() ); |
179
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
180
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{$value} ); |
|
0
|
|
|
|
|
0
|
|
181
|
|
|
|
|
|
|
} |
182
|
|
|
|
|
|
|
} |
183
|
4
|
|
|
|
|
21
|
return $parent->get_property_values( |
184
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetName'); |
185
|
|
|
|
|
|
|
} |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
sub PSetTable { |
188
|
4
|
|
|
4
|
|
31
|
my $self = shift; |
189
|
4
|
|
|
|
|
8
|
my $parent = $self->{'parent'}; |
190
|
4
|
50
|
|
|
|
13
|
unless ($parent) { |
191
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
192
|
|
|
|
|
|
|
} |
193
|
4
|
100
|
66
|
|
|
19
|
if ( scalar(@_) > 0 |
194
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $_[0], 'ODO::Jena::Graph::Properties::PSetTable' ) ) |
195
|
|
|
|
|
|
|
{ |
196
|
1
|
|
|
|
|
4
|
my $value = $_[0]->value(); |
197
|
1
|
|
|
|
|
14
|
my $property = |
198
|
|
|
|
|
|
|
ODO::Node::Resource->new( |
199
|
|
|
|
|
|
|
ODO::Jena::Graph::Properties::PSetTable->objectURI() ); |
200
|
1
|
50
|
|
|
|
10
|
if ( UNIVERSAL::isa( $value, 'ODO::Node::Literal' ) ) { |
201
|
1
|
|
|
|
|
4
|
my $stmt = |
202
|
|
|
|
|
|
|
ODO::Statement->new( $parent->subject(), $property, $value ); |
203
|
1
|
|
|
|
|
10
|
$parent->graph()->add($stmt); |
204
|
|
|
|
|
|
|
} else { |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
207
|
|
|
|
|
|
|
# all to the graph |
208
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new( $parent->subject(), $property, |
209
|
|
|
|
|
|
|
$_[0]->subject() ); |
210
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
211
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{$value} ); |
|
0
|
|
|
|
|
0
|
|
212
|
|
|
|
|
|
|
} |
213
|
|
|
|
|
|
|
} |
214
|
4
|
|
|
|
|
14
|
return $parent->get_property_values( |
215
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetTable'); |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
sub PSetType { |
219
|
4
|
|
|
4
|
|
33
|
my $self = shift; |
220
|
4
|
|
|
|
|
11
|
my $parent = $self->{'parent'}; |
221
|
4
|
50
|
|
|
|
16
|
unless ($parent) { |
222
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
223
|
|
|
|
|
|
|
} |
224
|
4
|
100
|
66
|
|
|
22
|
if ( scalar(@_) > 0 |
225
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $_[0], 'ODO::Jena::Graph::Properties::PSetType' ) ) |
226
|
|
|
|
|
|
|
{ |
227
|
1
|
|
|
|
|
4
|
my $value = $_[0]->value(); |
228
|
1
|
|
|
|
|
14
|
my $property = |
229
|
|
|
|
|
|
|
ODO::Node::Resource->new( |
230
|
|
|
|
|
|
|
ODO::Jena::Graph::Properties::PSetType->objectURI() ); |
231
|
1
|
50
|
|
|
|
8
|
if ( UNIVERSAL::isa( $value, 'ODO::Node::Literal' ) ) { |
232
|
1
|
|
|
|
|
4
|
my $stmt = |
233
|
|
|
|
|
|
|
ODO::Statement->new( $parent->subject(), $property, $value ); |
234
|
1
|
|
|
|
|
7
|
$parent->graph()->add($stmt); |
235
|
|
|
|
|
|
|
} else { |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
238
|
|
|
|
|
|
|
# all to the graph |
239
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new( $parent->subject(), $property, |
240
|
|
|
|
|
|
|
$_[0]->subject() ); |
241
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
242
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{$value} ); |
|
0
|
|
|
|
|
0
|
|
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
} |
245
|
4
|
|
|
|
|
15
|
return $parent->get_property_values( |
246
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetType'); |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
1; |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
package ODO::Jena::Graph::Settings; |
252
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
38
|
|
253
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
254
|
1
|
|
|
1
|
|
4
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
51
|
|
255
|
1
|
|
|
1
|
|
5
|
use ODO; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
57
|
|
256
|
1
|
|
|
1
|
|
5
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
257
|
1
|
|
|
1
|
|
5
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
258
|
1
|
|
|
1
|
|
4
|
use ODO::RDFS::Class; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
908
|
|
259
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Class', ); |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
# |
262
|
|
|
|
|
|
|
# Description: # |
263
|
|
|
|
|
|
|
# Schema URI: http://ibm-slrp.sourceforge.net/uris/odo/2007/01/jena-graph-schema## |
264
|
|
|
|
|
|
|
sub new { |
265
|
1
|
|
|
1
|
1
|
15
|
my $self = shift; |
266
|
1
|
|
|
|
|
3
|
my ( $resource, $graph, %properties ) = @_; |
267
|
1
|
|
|
|
|
12
|
$self = $self->SUPER::new(@_); |
268
|
|
|
|
|
|
|
return undef |
269
|
1
|
50
|
|
|
|
4
|
unless ( ref $self ); |
270
|
1
|
|
|
|
|
4
|
$self->propertyContainerName( |
271
|
|
|
|
|
|
|
'ODO::Jena::Graph::Settings::PropertiesContainer'); |
272
|
1
|
|
|
|
|
9
|
$self->properties( bless {}, |
273
|
|
|
|
|
|
|
'ODO::Jena::Graph::Settings::PropertiesContainer' ); |
274
|
1
|
|
|
|
|
11
|
$self->properties()->{'parent'} = $self; |
275
|
1
|
50
|
33
|
|
|
15
|
if ( exists( $properties{'GraphLSet'} ) |
276
|
|
|
|
|
|
|
&& defined( $properties{'GraphLSet'} ) ) |
277
|
|
|
|
|
|
|
{ |
278
|
|
|
|
|
|
|
|
279
|
0
|
0
|
|
|
|
0
|
unless ( |
280
|
|
|
|
|
|
|
UNIVERSAL::isa( |
281
|
|
|
|
|
|
|
$properties{'GraphLSet'}, |
282
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphLSet' |
283
|
|
|
|
|
|
|
) |
284
|
|
|
|
|
|
|
) |
285
|
|
|
|
|
|
|
{ |
286
|
0
|
|
|
|
|
0
|
return undef; |
287
|
|
|
|
|
|
|
} |
288
|
0
|
0
|
|
|
|
0
|
unless ( $self->can('properties') ) { |
289
|
0
|
|
|
|
|
0
|
return undef; |
290
|
|
|
|
|
|
|
} |
291
|
0
|
0
|
|
|
|
0
|
unless ( $self->properties()->can('GraphLSet') ) { |
292
|
0
|
|
|
|
|
0
|
return undef; |
293
|
|
|
|
|
|
|
} |
294
|
0
|
|
|
|
|
0
|
$self->properties()->GraphLSet( $properties{'GraphLSet'} ); |
295
|
|
|
|
|
|
|
} |
296
|
1
|
50
|
33
|
|
|
5
|
if ( exists( $properties{'GraphName'} ) |
297
|
|
|
|
|
|
|
&& defined( $properties{'GraphName'} ) ) |
298
|
|
|
|
|
|
|
{ |
299
|
0
|
0
|
|
|
|
0
|
unless ( |
300
|
|
|
|
|
|
|
UNIVERSAL::isa( |
301
|
|
|
|
|
|
|
$properties{'GraphName'}, |
302
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphName' |
303
|
|
|
|
|
|
|
) |
304
|
|
|
|
|
|
|
) |
305
|
|
|
|
|
|
|
{ |
306
|
0
|
|
|
|
|
0
|
return undef; |
307
|
|
|
|
|
|
|
} |
308
|
0
|
0
|
|
|
|
0
|
unless ( $self->can('properties') ) { |
309
|
0
|
|
|
|
|
0
|
return undef; |
310
|
|
|
|
|
|
|
} |
311
|
0
|
0
|
|
|
|
0
|
unless ( $self->properties()->can('GraphName') ) { |
312
|
0
|
|
|
|
|
0
|
return undef; |
313
|
|
|
|
|
|
|
} |
314
|
0
|
|
|
|
|
0
|
$self->properties()->GraphName( $properties{'GraphName'} ); |
315
|
|
|
|
|
|
|
} |
316
|
1
|
50
|
33
|
|
|
8
|
if ( exists( $properties{'GraphType'} ) |
317
|
|
|
|
|
|
|
&& defined( $properties{'GraphType'} ) ) |
318
|
|
|
|
|
|
|
{ |
319
|
0
|
0
|
|
|
|
0
|
unless ( |
320
|
|
|
|
|
|
|
UNIVERSAL::isa( |
321
|
|
|
|
|
|
|
$properties{'GraphType'}, |
322
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphType' |
323
|
|
|
|
|
|
|
) |
324
|
|
|
|
|
|
|
) |
325
|
|
|
|
|
|
|
{ |
326
|
0
|
|
|
|
|
0
|
return undef; |
327
|
|
|
|
|
|
|
} |
328
|
0
|
0
|
|
|
|
0
|
unless ( $self->can('properties') ) { |
329
|
0
|
|
|
|
|
0
|
return undef; |
330
|
|
|
|
|
|
|
} |
331
|
0
|
0
|
|
|
|
0
|
unless ( $self->properties()->can('GraphType') ) { |
332
|
0
|
|
|
|
|
0
|
return undef; |
333
|
|
|
|
|
|
|
} |
334
|
0
|
|
|
|
|
0
|
$self->properties()->GraphType( $properties{'GraphType'} ); |
335
|
|
|
|
|
|
|
} |
336
|
1
|
50
|
33
|
|
|
10
|
if ( exists( $properties{'GraphId'} ) |
337
|
|
|
|
|
|
|
&& defined( $properties{'GraphId'} ) ) |
338
|
|
|
|
|
|
|
{ |
339
|
0
|
0
|
|
|
|
0
|
unless ( |
340
|
|
|
|
|
|
|
UNIVERSAL::isa( |
341
|
|
|
|
|
|
|
$properties{'GraphId'}, |
342
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphId' |
343
|
|
|
|
|
|
|
) |
344
|
|
|
|
|
|
|
) |
345
|
|
|
|
|
|
|
{ |
346
|
0
|
|
|
|
|
0
|
return undef; |
347
|
|
|
|
|
|
|
} |
348
|
0
|
0
|
|
|
|
0
|
unless ( $self->can('properties') ) { |
349
|
0
|
|
|
|
|
0
|
return undef; |
350
|
|
|
|
|
|
|
} |
351
|
0
|
0
|
|
|
|
0
|
unless ( $self->properties()->can('GraphId') ) { |
352
|
0
|
|
|
|
|
0
|
return undef; |
353
|
|
|
|
|
|
|
} |
354
|
0
|
|
|
|
|
0
|
$self->properties()->GraphId( $properties{'GraphId'} ); |
355
|
|
|
|
|
|
|
} |
356
|
1
|
50
|
33
|
|
|
3
|
if ( exists( $properties{'GraphPrefix'} ) |
357
|
|
|
|
|
|
|
&& defined( $properties{'GraphPrefix'} ) ) |
358
|
|
|
|
|
|
|
{ |
359
|
0
|
0
|
|
|
|
0
|
unless ( |
360
|
|
|
|
|
|
|
UNIVERSAL::isa( |
361
|
|
|
|
|
|
|
$properties{'GraphPrefix'}, |
362
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphPrefix' |
363
|
|
|
|
|
|
|
) |
364
|
|
|
|
|
|
|
) |
365
|
|
|
|
|
|
|
{ |
366
|
0
|
|
|
|
|
0
|
return undef; |
367
|
|
|
|
|
|
|
} |
368
|
0
|
0
|
|
|
|
0
|
unless ( $self->can('properties') ) { |
369
|
0
|
|
|
|
|
0
|
return undef; |
370
|
|
|
|
|
|
|
} |
371
|
0
|
0
|
|
|
|
0
|
unless ( $self->properties()->can('GraphPrefix') ) { |
372
|
0
|
|
|
|
|
0
|
return undef; |
373
|
|
|
|
|
|
|
} |
374
|
0
|
|
|
|
|
0
|
$self->properties()->GraphPrefix( $properties{'GraphPrefix'} ); |
375
|
|
|
|
|
|
|
} |
376
|
1
|
|
|
|
|
4
|
return $self; |
377
|
|
|
|
|
|
|
} |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
sub queryString { |
380
|
|
|
|
|
|
|
return |
381
|
0
|
|
|
0
|
0
|
0
|
'(?subj, rdf:type, )'; |
382
|
|
|
|
|
|
|
} |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
sub objectURI { |
385
|
|
|
|
|
|
|
return |
386
|
0
|
|
|
0
|
0
|
0
|
'http://ibm-slrp.sourceforge.net/uris/odo/2007/01/jena-graph-schema#Settings'; |
387
|
|
|
|
|
|
|
} |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
sub value { |
390
|
1
|
|
|
1
|
1
|
10
|
my $self = shift; |
391
|
1
|
50
|
|
|
|
5
|
return $self->subject() |
392
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
393
|
1
|
|
|
|
|
13
|
return $self->__to_statement_array(); |
394
|
|
|
|
|
|
|
} |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
sub __to_statement_array { |
397
|
1
|
|
|
1
|
|
4
|
my $self = shift; |
398
|
1
|
|
|
|
|
2
|
my $statements = []; |
399
|
1
|
|
|
|
|
4
|
foreach my $my_super (@ISA) { |
400
|
|
|
|
|
|
|
next |
401
|
1
|
50
|
|
|
|
10
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
402
|
1
|
|
|
|
|
3
|
my $super_func = "${my_super}::__to_statement_array"; |
403
|
1
|
|
|
|
|
2
|
push @{$statements}, @{ $self->$super_func() }; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
404
|
|
|
|
|
|
|
} |
405
|
1
|
|
|
|
|
9
|
my %properties = ( |
406
|
|
|
|
|
|
|
'' => '', |
407
|
|
|
|
|
|
|
'GraphLSet' => 'ODO::Jena::Graph::Properties::GraphLSet', |
408
|
|
|
|
|
|
|
'GraphName' => 'ODO::Jena::Graph::Properties::GraphName', |
409
|
|
|
|
|
|
|
'GraphType' => 'ODO::Jena::Graph::Properties::GraphType', |
410
|
|
|
|
|
|
|
'GraphId' => 'ODO::Jena::Graph::Properties::GraphId', |
411
|
|
|
|
|
|
|
'GraphPrefix' => 'ODO::Jena::Graph::Properties::GraphPrefix', |
412
|
|
|
|
|
|
|
); |
413
|
1
|
|
|
|
|
6
|
foreach my $propertyName ( keys(%properties) ) { |
414
|
|
|
|
|
|
|
next |
415
|
6
|
100
|
66
|
|
|
43
|
unless ( $propertyName && $propertyName ne '' ); |
416
|
5
|
|
|
|
|
17
|
my $property = $self->properties()->$propertyName(); |
417
|
5
|
|
|
|
|
8
|
foreach my $p ( @{$property} ) { |
|
5
|
|
|
|
|
11
|
|
418
|
4
|
|
|
|
|
15
|
my $p_value = $p->value(); |
419
|
4
|
|
|
|
|
44
|
my $property_uri = ODO::Node::Resource->new( |
420
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
421
|
4
|
100
|
|
|
|
37
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
422
|
3
|
|
|
|
|
6
|
push @{$statements}, |
|
3
|
|
|
|
|
13
|
|
423
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
424
|
|
|
|
|
|
|
$p_value ); |
425
|
|
|
|
|
|
|
} else { |
426
|
1
|
|
|
|
|
2
|
push @{$statements}, |
|
1
|
|
|
|
|
5
|
|
427
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
428
|
|
|
|
|
|
|
$p->subject() ); |
429
|
1
|
|
|
|
|
5
|
push @{$statements}, @{$p_value}; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
430
|
|
|
|
|
|
|
} |
431
|
|
|
|
|
|
|
} |
432
|
|
|
|
|
|
|
} |
433
|
1
|
|
|
|
|
17
|
return $statements; |
434
|
|
|
|
|
|
|
} |
435
|
|
|
|
|
|
|
1; |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
package ODO::Jena::Graph::Settings::PropertiesContainer; |
438
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
439
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
440
|
1
|
|
|
1
|
|
10
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
40
|
|
441
|
1
|
|
|
1
|
|
5
|
use ODO::RDFS::Class::PropertiesContainer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1050
|
|
442
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Class::PropertiesContainer', ); |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
# Methods |
445
|
|
|
|
|
|
|
sub GraphLSet { |
446
|
2
|
|
|
2
|
|
16
|
my $self = shift; |
447
|
2
|
|
|
|
|
5
|
my $parent = $self->{'parent'}; |
448
|
2
|
50
|
|
|
|
7
|
unless ($parent) { |
449
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
450
|
|
|
|
|
|
|
} |
451
|
2
|
100
|
66
|
|
|
13
|
if ( scalar(@_) > 0 |
452
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $_[0], 'ODO::Jena::Graph::Properties::GraphLSet' ) ) |
453
|
|
|
|
|
|
|
{ |
454
|
1
|
|
|
|
|
72
|
my $value = $_[0]->value(); |
455
|
1
|
|
|
|
|
11
|
my $property = |
456
|
|
|
|
|
|
|
ODO::Node::Resource->new( |
457
|
|
|
|
|
|
|
ODO::Jena::Graph::Properties::GraphLSet->objectURI() ); |
458
|
1
|
50
|
|
|
|
11
|
if ( UNIVERSAL::isa( $value, 'ODO::Node::Literal' ) ) { |
459
|
0
|
|
|
|
|
0
|
my $stmt = |
460
|
|
|
|
|
|
|
ODO::Statement->new( $parent->subject(), $property, $value ); |
461
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
462
|
|
|
|
|
|
|
} else { |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
465
|
|
|
|
|
|
|
# all to the graph |
466
|
1
|
|
|
|
|
5
|
my $stmt = ODO::Statement->new( $parent->subject(), $property, |
467
|
|
|
|
|
|
|
$_[0]->subject() ); |
468
|
1
|
|
|
|
|
10
|
$parent->graph()->add($stmt); |
469
|
1
|
|
|
|
|
4
|
$parent->graph()->add( @{$value} ); |
|
1
|
|
|
|
|
10
|
|
470
|
|
|
|
|
|
|
} |
471
|
|
|
|
|
|
|
} |
472
|
2
|
|
|
|
|
10
|
return $parent->get_property_values( |
473
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphLSet'); |
474
|
|
|
|
|
|
|
} |
475
|
|
|
|
|
|
|
|
476
|
|
|
|
|
|
|
sub GraphName { |
477
|
2
|
|
|
2
|
|
16
|
my $self = shift; |
478
|
2
|
|
|
|
|
5
|
my $parent = $self->{'parent'}; |
479
|
2
|
50
|
|
|
|
7
|
unless ($parent) { |
480
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
481
|
|
|
|
|
|
|
} |
482
|
2
|
100
|
66
|
|
|
20
|
if ( scalar(@_) > 0 |
483
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $_[0], 'ODO::Jena::Graph::Properties::GraphName' ) ) |
484
|
|
|
|
|
|
|
{ |
485
|
1
|
|
|
|
|
5
|
my $value = $_[0]->value(); |
486
|
1
|
|
|
|
|
18
|
my $property = |
487
|
|
|
|
|
|
|
ODO::Node::Resource->new( |
488
|
|
|
|
|
|
|
ODO::Jena::Graph::Properties::GraphName->objectURI() ); |
489
|
1
|
50
|
|
|
|
9
|
if ( UNIVERSAL::isa( $value, 'ODO::Node::Literal' ) ) { |
490
|
1
|
|
|
|
|
5
|
my $stmt = |
491
|
|
|
|
|
|
|
ODO::Statement->new( $parent->subject(), $property, $value ); |
492
|
1
|
|
|
|
|
9
|
$parent->graph()->add($stmt); |
493
|
|
|
|
|
|
|
} else { |
494
|
|
|
|
|
|
|
|
495
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
496
|
|
|
|
|
|
|
# all to the graph |
497
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new( $parent->subject(), $property, |
498
|
|
|
|
|
|
|
$_[0]->subject() ); |
499
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
500
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{$value} ); |
|
0
|
|
|
|
|
0
|
|
501
|
|
|
|
|
|
|
} |
502
|
|
|
|
|
|
|
} |
503
|
2
|
|
|
|
|
7
|
return $parent->get_property_values( |
504
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphName'); |
505
|
|
|
|
|
|
|
} |
506
|
|
|
|
|
|
|
|
507
|
|
|
|
|
|
|
sub GraphType { |
508
|
2
|
|
|
2
|
|
20
|
my $self = shift; |
509
|
2
|
|
|
|
|
5
|
my $parent = $self->{'parent'}; |
510
|
2
|
50
|
|
|
|
8
|
unless ($parent) { |
511
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
512
|
|
|
|
|
|
|
} |
513
|
2
|
100
|
66
|
|
|
20
|
if ( scalar(@_) > 0 |
514
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $_[0], 'ODO::Jena::Graph::Properties::GraphType' ) ) |
515
|
|
|
|
|
|
|
{ |
516
|
1
|
|
|
|
|
8
|
my $value = $_[0]->value(); |
517
|
1
|
|
|
|
|
20
|
my $property = |
518
|
|
|
|
|
|
|
ODO::Node::Resource->new( |
519
|
|
|
|
|
|
|
ODO::Jena::Graph::Properties::GraphType->objectURI() ); |
520
|
1
|
50
|
|
|
|
13
|
if ( UNIVERSAL::isa( $value, 'ODO::Node::Literal' ) ) { |
521
|
1
|
|
|
|
|
5
|
my $stmt = |
522
|
|
|
|
|
|
|
ODO::Statement->new( $parent->subject(), $property, $value ); |
523
|
1
|
|
|
|
|
12
|
$parent->graph()->add($stmt); |
524
|
|
|
|
|
|
|
} else { |
525
|
|
|
|
|
|
|
|
526
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
527
|
|
|
|
|
|
|
# all to the graph |
528
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new( $parent->subject(), $property, |
529
|
|
|
|
|
|
|
$_[0]->subject() ); |
530
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
531
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{$value} ); |
|
0
|
|
|
|
|
0
|
|
532
|
|
|
|
|
|
|
} |
533
|
|
|
|
|
|
|
} |
534
|
2
|
|
|
|
|
9
|
return $parent->get_property_values( |
535
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphType'); |
536
|
|
|
|
|
|
|
} |
537
|
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
sub GraphId { |
539
|
2
|
|
|
2
|
|
1312
|
my $self = shift; |
540
|
2
|
|
|
|
|
6
|
my $parent = $self->{'parent'}; |
541
|
2
|
50
|
|
|
|
6
|
unless ($parent) { |
542
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
543
|
|
|
|
|
|
|
} |
544
|
2
|
100
|
66
|
|
|
16
|
if ( scalar(@_) > 0 |
545
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $_[0], 'ODO::Jena::Graph::Properties::GraphId' ) ) |
546
|
|
|
|
|
|
|
{ |
547
|
1
|
|
|
|
|
4
|
my $value = $_[0]->value(); |
548
|
1
|
|
|
|
|
16
|
my $property = |
549
|
|
|
|
|
|
|
ODO::Node::Resource->new( |
550
|
|
|
|
|
|
|
ODO::Jena::Graph::Properties::GraphId->objectURI() ); |
551
|
1
|
50
|
|
|
|
9
|
if ( UNIVERSAL::isa( $value, 'ODO::Node::Literal' ) ) { |
552
|
1
|
|
|
|
|
10
|
my $stmt = |
553
|
|
|
|
|
|
|
ODO::Statement->new( $parent->subject(), $property, $value ); |
554
|
1
|
|
|
|
|
11
|
$parent->graph()->add($stmt); |
555
|
|
|
|
|
|
|
} else { |
556
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
558
|
|
|
|
|
|
|
# all to the graph |
559
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new( $parent->subject(), $property, |
560
|
|
|
|
|
|
|
$_[0]->subject() ); |
561
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
562
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{$value} ); |
|
0
|
|
|
|
|
0
|
|
563
|
|
|
|
|
|
|
} |
564
|
|
|
|
|
|
|
} |
565
|
2
|
|
|
|
|
13
|
return $parent->get_property_values( |
566
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphId'); |
567
|
|
|
|
|
|
|
} |
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
sub GraphPrefix { |
570
|
1
|
|
|
1
|
|
8
|
my $self = shift; |
571
|
1
|
|
|
|
|
3
|
my $parent = $self->{'parent'}; |
572
|
1
|
50
|
|
|
|
5
|
unless ($parent) { |
573
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
574
|
|
|
|
|
|
|
} |
575
|
1
|
50
|
33
|
|
|
6
|
if ( scalar(@_) > 0 |
576
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $_[0], 'ODO::Jena::Graph::Properties::GraphPrefix' ) |
577
|
|
|
|
|
|
|
) |
578
|
|
|
|
|
|
|
{ |
579
|
0
|
|
|
|
|
0
|
my $value = $_[0]->value(); |
580
|
0
|
|
|
|
|
0
|
my $property = |
581
|
|
|
|
|
|
|
ODO::Node::Resource->new( |
582
|
|
|
|
|
|
|
ODO::Jena::Graph::Properties::GraphPrefix->objectURI() ); |
583
|
0
|
0
|
|
|
|
0
|
if ( UNIVERSAL::isa( $value, 'ODO::Node::Literal' ) ) { |
584
|
0
|
|
|
|
|
0
|
my $stmt = |
585
|
|
|
|
|
|
|
ODO::Statement->new( $parent->subject(), $property, $value ); |
586
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
587
|
|
|
|
|
|
|
} else { |
588
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
590
|
|
|
|
|
|
|
# all to the graph |
591
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new( $parent->subject(), $property, |
592
|
|
|
|
|
|
|
$_[0]->subject() ); |
593
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
594
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{$value} ); |
|
0
|
|
|
|
|
0
|
|
595
|
|
|
|
|
|
|
} |
596
|
|
|
|
|
|
|
} |
597
|
1
|
|
|
|
|
6
|
return $parent->get_property_values( |
598
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphPrefix'); |
599
|
|
|
|
|
|
|
} |
600
|
|
|
|
|
|
|
1; |
601
|
|
|
|
|
|
|
|
602
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
package ODO::Jena::Graph::LSet; |
604
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
605
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
606
|
1
|
|
|
1
|
|
40
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
607
|
1
|
|
|
1
|
|
5
|
use ODO; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
77
|
|
608
|
1
|
|
|
1
|
|
4
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
609
|
1
|
|
|
1
|
|
4
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
610
|
1
|
|
|
1
|
|
5
|
use ODO::RDFS::Class; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
763
|
|
611
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Class', ); |
612
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
# |
614
|
|
|
|
|
|
|
# Description: # |
615
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
616
|
|
|
|
|
|
|
sub new { |
617
|
3
|
|
|
3
|
|
7
|
my $self = shift; |
618
|
3
|
|
|
|
|
7
|
my ( $resource, $graph, %properties ) = @_; |
619
|
3
|
|
|
|
|
21
|
$self = $self->SUPER::new(@_); |
620
|
|
|
|
|
|
|
return undef |
621
|
3
|
50
|
|
|
|
9
|
unless ( ref $self ); |
622
|
3
|
|
|
|
|
12
|
$self->propertyContainerName('ODO::Jena::Graph::LSet::PropertiesContainer'); |
623
|
3
|
|
|
|
|
32
|
$self->properties( bless {}, |
624
|
|
|
|
|
|
|
'ODO::Jena::Graph::LSet::PropertiesContainer' ); |
625
|
3
|
|
|
|
|
22
|
$self->properties()->{'parent'} = $self; |
626
|
3
|
100
|
66
|
|
|
37
|
if ( exists( $properties{'LSetType'} ) |
627
|
|
|
|
|
|
|
&& defined( $properties{'LSetType'} ) ) |
628
|
|
|
|
|
|
|
{ |
629
|
|
|
|
|
|
|
|
630
|
1
|
50
|
|
|
|
6
|
unless ( |
631
|
|
|
|
|
|
|
UNIVERSAL::isa( |
632
|
|
|
|
|
|
|
$properties{'LSetType'}, |
633
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetType' |
634
|
|
|
|
|
|
|
) |
635
|
|
|
|
|
|
|
) |
636
|
|
|
|
|
|
|
{ |
637
|
0
|
|
|
|
|
0
|
return undef; |
638
|
|
|
|
|
|
|
} |
639
|
1
|
50
|
|
|
|
14
|
unless ( $self->can('properties') ) { |
640
|
0
|
|
|
|
|
0
|
return undef; |
641
|
|
|
|
|
|
|
} |
642
|
1
|
50
|
|
|
|
4
|
unless ( $self->properties()->can('LSetType') ) { |
643
|
0
|
|
|
|
|
0
|
return undef; |
644
|
|
|
|
|
|
|
} |
645
|
1
|
|
|
|
|
12
|
$self->properties()->LSetType( $properties{'LSetType'} ); |
646
|
|
|
|
|
|
|
} |
647
|
3
|
100
|
66
|
|
|
18
|
if ( exists( $properties{'LSetPSet'} ) |
648
|
|
|
|
|
|
|
&& defined( $properties{'LSetPSet'} ) ) |
649
|
|
|
|
|
|
|
{ |
650
|
1
|
50
|
|
|
|
14
|
unless ( |
651
|
|
|
|
|
|
|
UNIVERSAL::isa( |
652
|
|
|
|
|
|
|
$properties{'LSetPSet'}, |
653
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetPSet' |
654
|
|
|
|
|
|
|
) |
655
|
|
|
|
|
|
|
) |
656
|
|
|
|
|
|
|
{ |
657
|
0
|
|
|
|
|
0
|
return undef; |
658
|
|
|
|
|
|
|
} |
659
|
1
|
50
|
|
|
|
6
|
unless ( $self->can('properties') ) { |
660
|
0
|
|
|
|
|
0
|
return undef; |
661
|
|
|
|
|
|
|
} |
662
|
1
|
50
|
|
|
|
343
|
unless ( $self->properties()->can('LSetPSet') ) { |
663
|
0
|
|
|
|
|
0
|
return undef; |
664
|
|
|
|
|
|
|
} |
665
|
1
|
|
|
|
|
11
|
$self->properties()->LSetPSet( $properties{'LSetPSet'} ); |
666
|
|
|
|
|
|
|
} |
667
|
3
|
100
|
66
|
|
|
21
|
if ( exists( $properties{'LSetName'} ) |
668
|
|
|
|
|
|
|
&& defined( $properties{'LSetName'} ) ) |
669
|
|
|
|
|
|
|
{ |
670
|
1
|
50
|
|
|
|
7
|
unless ( |
671
|
|
|
|
|
|
|
UNIVERSAL::isa( |
672
|
|
|
|
|
|
|
$properties{'LSetName'}, |
673
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetName' |
674
|
|
|
|
|
|
|
) |
675
|
|
|
|
|
|
|
) |
676
|
|
|
|
|
|
|
{ |
677
|
0
|
|
|
|
|
0
|
return undef; |
678
|
|
|
|
|
|
|
} |
679
|
1
|
50
|
|
|
|
6
|
unless ( $self->can('properties') ) { |
680
|
0
|
|
|
|
|
0
|
return undef; |
681
|
|
|
|
|
|
|
} |
682
|
1
|
50
|
|
|
|
4
|
unless ( $self->properties()->can('LSetName') ) { |
683
|
0
|
|
|
|
|
0
|
return undef; |
684
|
|
|
|
|
|
|
} |
685
|
1
|
|
|
|
|
10
|
$self->properties()->LSetName( $properties{'LSetName'} ); |
686
|
|
|
|
|
|
|
} |
687
|
3
|
|
|
|
|
8
|
return $self; |
688
|
|
|
|
|
|
|
} |
689
|
|
|
|
|
|
|
|
690
|
|
|
|
|
|
|
sub queryString { |
691
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
692
|
|
|
|
|
|
|
} |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
sub objectURI { |
695
|
0
|
|
|
0
|
|
0
|
return 'http://jena.hpl.hp.com/2003/04/DB#LSet'; |
696
|
|
|
|
|
|
|
} |
697
|
|
|
|
|
|
|
|
698
|
|
|
|
|
|
|
sub value { |
699
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
700
|
0
|
0
|
|
|
|
0
|
return $self->subject() |
701
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
702
|
0
|
|
|
|
|
0
|
return $self->__to_statement_array(); |
703
|
|
|
|
|
|
|
} |
704
|
|
|
|
|
|
|
|
705
|
|
|
|
|
|
|
sub __to_statement_array { |
706
|
2
|
|
|
2
|
|
5
|
my $self = shift; |
707
|
2
|
|
|
|
|
2
|
my $statements = []; |
708
|
2
|
|
|
|
|
7
|
foreach my $my_super (@ISA) { |
709
|
|
|
|
|
|
|
next |
710
|
2
|
50
|
|
|
|
13
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
711
|
2
|
|
|
|
|
6
|
my $super_func = "${my_super}::__to_statement_array"; |
712
|
2
|
|
|
|
|
3
|
push @{$statements}, @{ $self->$super_func() }; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
12
|
|
713
|
|
|
|
|
|
|
} |
714
|
2
|
|
|
|
|
14
|
my %properties = ( |
715
|
|
|
|
|
|
|
'' => '', |
716
|
|
|
|
|
|
|
'LSetType' => 'ODO::Jena::Graph::Properties::LSetType', |
717
|
|
|
|
|
|
|
'LSetPSet' => 'ODO::Jena::Graph::Properties::LSetPSet', |
718
|
|
|
|
|
|
|
'LSetName' => 'ODO::Jena::Graph::Properties::LSetName', |
719
|
|
|
|
|
|
|
); |
720
|
2
|
|
|
|
|
7
|
foreach my $propertyName ( keys(%properties) ) { |
721
|
|
|
|
|
|
|
next |
722
|
8
|
100
|
66
|
|
|
62
|
unless ( $propertyName && $propertyName ne '' ); |
723
|
6
|
|
|
|
|
24
|
my $property = $self->properties()->$propertyName(); |
724
|
6
|
|
|
|
|
13
|
foreach my $p ( @{$property} ) { |
|
6
|
|
|
|
|
17
|
|
725
|
6
|
|
|
|
|
24
|
my $p_value = $p->value(); |
726
|
6
|
|
|
|
|
79
|
my $property_uri = ODO::Node::Resource->new( |
727
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
728
|
6
|
100
|
|
|
|
61
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
729
|
4
|
|
|
|
|
9
|
push @{$statements}, |
|
4
|
|
|
|
|
18
|
|
730
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
731
|
|
|
|
|
|
|
$p_value ); |
732
|
|
|
|
|
|
|
} else { |
733
|
2
|
|
|
|
|
5
|
push @{$statements}, |
|
2
|
|
|
|
|
14
|
|
734
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
735
|
|
|
|
|
|
|
$p->subject() ); |
736
|
2
|
|
|
|
|
13
|
push @{$statements}, @{$p_value}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
737
|
|
|
|
|
|
|
} |
738
|
|
|
|
|
|
|
} |
739
|
|
|
|
|
|
|
} |
740
|
2
|
|
|
|
|
47
|
return $statements; |
741
|
|
|
|
|
|
|
} |
742
|
|
|
|
|
|
|
1; |
743
|
|
|
|
|
|
|
|
744
|
|
|
|
|
|
|
package ODO::Jena::Graph::LSet::PropertiesContainer; |
745
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
746
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
747
|
1
|
|
|
1
|
|
5
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
748
|
1
|
|
|
1
|
|
4
|
use ODO::RDFS::Class::PropertiesContainer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
666
|
|
749
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Class::PropertiesContainer', ); |
750
|
|
|
|
|
|
|
|
751
|
|
|
|
|
|
|
# Methods |
752
|
|
|
|
|
|
|
sub LSetType { |
753
|
3
|
|
|
3
|
|
32
|
my $self = shift; |
754
|
3
|
|
|
|
|
9
|
my $parent = $self->{'parent'}; |
755
|
3
|
50
|
|
|
|
9
|
unless ($parent) { |
756
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
757
|
|
|
|
|
|
|
} |
758
|
3
|
100
|
66
|
|
|
19
|
if ( scalar(@_) > 0 |
759
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $_[0], 'ODO::Jena::Graph::Properties::LSetType' ) ) |
760
|
|
|
|
|
|
|
{ |
761
|
1
|
|
|
|
|
5
|
my $value = $_[0]->value(); |
762
|
1
|
|
|
|
|
14
|
my $property = |
763
|
|
|
|
|
|
|
ODO::Node::Resource->new( |
764
|
|
|
|
|
|
|
ODO::Jena::Graph::Properties::LSetType->objectURI() ); |
765
|
1
|
50
|
|
|
|
8
|
if ( UNIVERSAL::isa( $value, 'ODO::Node::Literal' ) ) { |
766
|
1
|
|
|
|
|
9
|
my $stmt = |
767
|
|
|
|
|
|
|
ODO::Statement->new( $parent->subject(), $property, $value ); |
768
|
1
|
|
|
|
|
12
|
$parent->graph()->add($stmt); |
769
|
|
|
|
|
|
|
} else { |
770
|
|
|
|
|
|
|
|
771
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
772
|
|
|
|
|
|
|
# all to the graph |
773
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new( $parent->subject(), $property, |
774
|
|
|
|
|
|
|
$_[0]->subject() ); |
775
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
776
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{$value} ); |
|
0
|
|
|
|
|
0
|
|
777
|
|
|
|
|
|
|
} |
778
|
|
|
|
|
|
|
} |
779
|
3
|
|
|
|
|
15
|
return $parent->get_property_values( |
780
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetType'); |
781
|
|
|
|
|
|
|
} |
782
|
|
|
|
|
|
|
|
783
|
|
|
|
|
|
|
sub LSetPSet { |
784
|
3
|
|
|
3
|
|
23
|
my $self = shift; |
785
|
3
|
|
|
|
|
6
|
my $parent = $self->{'parent'}; |
786
|
3
|
50
|
|
|
|
10
|
unless ($parent) { |
787
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
788
|
|
|
|
|
|
|
} |
789
|
3
|
100
|
66
|
|
|
17
|
if ( scalar(@_) > 0 |
790
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $_[0], 'ODO::Jena::Graph::Properties::LSetPSet' ) ) |
791
|
|
|
|
|
|
|
{ |
792
|
1
|
|
|
|
|
5
|
my $value = $_[0]->value(); |
793
|
1
|
|
|
|
|
9
|
my $property = |
794
|
|
|
|
|
|
|
ODO::Node::Resource->new( |
795
|
|
|
|
|
|
|
ODO::Jena::Graph::Properties::LSetPSet->objectURI() ); |
796
|
1
|
50
|
|
|
|
11
|
if ( UNIVERSAL::isa( $value, 'ODO::Node::Literal' ) ) { |
797
|
0
|
|
|
|
|
0
|
my $stmt = |
798
|
|
|
|
|
|
|
ODO::Statement->new( $parent->subject(), $property, $value ); |
799
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
800
|
|
|
|
|
|
|
} else { |
801
|
|
|
|
|
|
|
|
802
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
803
|
|
|
|
|
|
|
# all to the graph |
804
|
1
|
|
|
|
|
6
|
my $stmt = ODO::Statement->new( $parent->subject(), $property, |
805
|
|
|
|
|
|
|
$_[0]->subject() ); |
806
|
1
|
|
|
|
|
8
|
$parent->graph()->add($stmt); |
807
|
1
|
|
|
|
|
5
|
$parent->graph()->add( @{$value} ); |
|
1
|
|
|
|
|
7
|
|
808
|
|
|
|
|
|
|
} |
809
|
|
|
|
|
|
|
} |
810
|
3
|
|
|
|
|
13
|
return $parent->get_property_values( |
811
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetPSet'); |
812
|
|
|
|
|
|
|
} |
813
|
|
|
|
|
|
|
|
814
|
|
|
|
|
|
|
sub LSetName { |
815
|
3
|
|
|
3
|
|
22
|
my $self = shift; |
816
|
3
|
|
|
|
|
8
|
my $parent = $self->{'parent'}; |
817
|
3
|
50
|
|
|
|
9
|
unless ($parent) { |
818
|
0
|
|
|
|
|
0
|
die('Fatal error in property container: parent object is not defined!'); |
819
|
|
|
|
|
|
|
} |
820
|
3
|
100
|
66
|
|
|
16
|
if ( scalar(@_) > 0 |
821
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $_[0], 'ODO::Jena::Graph::Properties::LSetName' ) ) |
822
|
|
|
|
|
|
|
{ |
823
|
1
|
|
|
|
|
5
|
my $value = $_[0]->value(); |
824
|
1
|
|
|
|
|
28
|
my $property = |
825
|
|
|
|
|
|
|
ODO::Node::Resource->new( |
826
|
|
|
|
|
|
|
ODO::Jena::Graph::Properties::LSetName->objectURI() ); |
827
|
1
|
50
|
|
|
|
9
|
if ( UNIVERSAL::isa( $value, 'ODO::Node::Literal' ) ) { |
828
|
1
|
|
|
|
|
3
|
my $stmt = |
829
|
|
|
|
|
|
|
ODO::Statement->new( $parent->subject(), $property, $value ); |
830
|
1
|
|
|
|
|
8
|
$parent->graph()->add($stmt); |
831
|
|
|
|
|
|
|
} else { |
832
|
|
|
|
|
|
|
|
833
|
|
|
|
|
|
|
# The property's value is a URI with other attached URIs so add them |
834
|
|
|
|
|
|
|
# all to the graph |
835
|
0
|
|
|
|
|
0
|
my $stmt = ODO::Statement->new( $parent->subject(), $property, |
836
|
|
|
|
|
|
|
$_[0]->subject() ); |
837
|
0
|
|
|
|
|
0
|
$parent->graph()->add($stmt); |
838
|
0
|
|
|
|
|
0
|
$parent->graph()->add( @{$value} ); |
|
0
|
|
|
|
|
0
|
|
839
|
|
|
|
|
|
|
} |
840
|
|
|
|
|
|
|
} |
841
|
3
|
|
|
|
|
11
|
return $parent->get_property_values( |
842
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetName'); |
843
|
|
|
|
|
|
|
} |
844
|
|
|
|
|
|
|
1; |
845
|
|
|
|
|
|
|
|
846
|
|
|
|
|
|
|
|
847
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::PSetType; |
848
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
849
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
850
|
1
|
|
|
1
|
|
4
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
44
|
|
851
|
1
|
|
|
1
|
|
5
|
use ODO; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
852
|
1
|
|
|
1
|
|
5
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
853
|
1
|
|
|
1
|
|
5
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
854
|
1
|
|
|
1
|
|
593
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
475
|
|
855
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property', ); |
856
|
|
|
|
|
|
|
|
857
|
|
|
|
|
|
|
# |
858
|
|
|
|
|
|
|
# Description: # |
859
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
860
|
|
|
|
|
|
|
sub new { |
861
|
5
|
|
|
5
|
|
45
|
my $self = shift; |
862
|
5
|
|
|
|
|
12
|
my ( $resource, $graph, %properties ) = @_; |
863
|
5
|
|
|
|
|
26
|
$self = $self->SUPER::new(@_); |
864
|
|
|
|
|
|
|
return undef |
865
|
5
|
50
|
|
|
|
17
|
unless ( ref $self ); |
866
|
5
|
|
|
|
|
17
|
$self->propertyContainerName( |
867
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetType::PropertiesContainer'); |
868
|
5
|
|
|
|
|
43
|
$self->properties( bless {}, |
869
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetType::PropertiesContainer' ); |
870
|
5
|
|
|
|
|
31
|
$self->properties()->{'parent'} = $self; |
871
|
5
|
|
|
|
|
41
|
return $self; |
872
|
|
|
|
|
|
|
} |
873
|
|
|
|
|
|
|
|
874
|
|
|
|
|
|
|
sub queryString { |
875
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
876
|
|
|
|
|
|
|
} |
877
|
|
|
|
|
|
|
|
878
|
|
|
|
|
|
|
sub objectURI { |
879
|
8
|
|
|
8
|
|
57
|
return 'http://jena.hpl.hp.com/2003/04/DB#PSetType'; |
880
|
|
|
|
|
|
|
} |
881
|
|
|
|
|
|
|
|
882
|
|
|
|
|
|
|
sub value { |
883
|
4
|
|
|
4
|
|
9
|
my $self = shift; |
884
|
4
|
50
|
|
|
|
20
|
return $self->subject() |
885
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
886
|
0
|
|
|
|
|
0
|
return $self->__to_statement_array(); |
887
|
|
|
|
|
|
|
} |
888
|
|
|
|
|
|
|
|
889
|
|
|
|
|
|
|
sub __to_statement_array { |
890
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
891
|
0
|
|
|
|
|
0
|
my $statements = []; |
892
|
0
|
|
|
|
|
0
|
foreach my $my_super (@ISA) { |
893
|
|
|
|
|
|
|
next |
894
|
0
|
0
|
|
|
|
0
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
895
|
0
|
|
|
|
|
0
|
my $super_func = "${my_super}::__to_statement_array"; |
896
|
0
|
|
|
|
|
0
|
push @{$statements}, @{ $self->$super_func() }; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
897
|
|
|
|
|
|
|
} |
898
|
0
|
|
|
|
|
0
|
my %properties = ( '' => '', ); |
899
|
0
|
|
|
|
|
0
|
foreach my $propertyName ( keys(%properties) ) { |
900
|
|
|
|
|
|
|
next |
901
|
0
|
0
|
0
|
|
|
0
|
unless ( $propertyName && $propertyName ne '' ); |
902
|
0
|
|
|
|
|
0
|
my $property = $self->properties()->$propertyName(); |
903
|
0
|
|
|
|
|
0
|
foreach my $p ( @{$property} ) { |
|
0
|
|
|
|
|
0
|
|
904
|
0
|
|
|
|
|
0
|
my $p_value = $p->value(); |
905
|
0
|
|
|
|
|
0
|
my $property_uri = ODO::Node::Resource->new( |
906
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
907
|
0
|
0
|
|
|
|
0
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
908
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
909
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
910
|
|
|
|
|
|
|
$p_value ); |
911
|
|
|
|
|
|
|
} else { |
912
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
913
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
914
|
|
|
|
|
|
|
$p->subject() ); |
915
|
0
|
|
|
|
|
0
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
916
|
|
|
|
|
|
|
} |
917
|
|
|
|
|
|
|
} |
918
|
|
|
|
|
|
|
} |
919
|
0
|
|
|
|
|
0
|
return $statements; |
920
|
|
|
|
|
|
|
} |
921
|
|
|
|
|
|
|
1; |
922
|
|
|
|
|
|
|
|
923
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::PSetType::PropertiesContainer; |
924
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
925
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
926
|
1
|
|
|
1
|
|
4
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
927
|
1
|
|
|
1
|
|
693
|
use ODO::RDFS::Property::PropertiesContainer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
928
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property::PropertiesContainer', ); |
929
|
|
|
|
|
|
|
|
930
|
|
|
|
|
|
|
# Methods |
931
|
|
|
|
|
|
|
1; |
932
|
|
|
|
|
|
|
|
933
|
|
|
|
|
|
|
|
934
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::PSetTable; |
935
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
27
|
|
936
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
937
|
1
|
|
|
1
|
|
5
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
938
|
1
|
|
|
1
|
|
5
|
use ODO; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
939
|
1
|
|
|
1
|
|
4
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
35
|
|
940
|
1
|
|
|
1
|
|
6
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
941
|
1
|
|
|
1
|
|
6
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
470
|
|
942
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property', ); |
943
|
|
|
|
|
|
|
|
944
|
|
|
|
|
|
|
# |
945
|
|
|
|
|
|
|
# Description: # |
946
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
947
|
|
|
|
|
|
|
sub new { |
948
|
5
|
|
|
5
|
|
49
|
my $self = shift; |
949
|
5
|
|
|
|
|
10
|
my ( $resource, $graph, %properties ) = @_; |
950
|
5
|
|
|
|
|
28
|
$self = $self->SUPER::new(@_); |
951
|
|
|
|
|
|
|
return undef |
952
|
5
|
50
|
|
|
|
19
|
unless ( ref $self ); |
953
|
5
|
|
|
|
|
14
|
$self->propertyContainerName( |
954
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetTable::PropertiesContainer'); |
955
|
5
|
|
|
|
|
49
|
$self->properties( bless {}, |
956
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetTable::PropertiesContainer' ); |
957
|
5
|
|
|
|
|
33
|
$self->properties()->{'parent'} = $self; |
958
|
5
|
|
|
|
|
42
|
return $self; |
959
|
|
|
|
|
|
|
} |
960
|
|
|
|
|
|
|
|
961
|
|
|
|
|
|
|
sub queryString { |
962
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
963
|
|
|
|
|
|
|
} |
964
|
|
|
|
|
|
|
|
965
|
|
|
|
|
|
|
sub objectURI { |
966
|
8
|
|
|
8
|
|
59
|
return 'http://jena.hpl.hp.com/2003/04/DB#PSetTable'; |
967
|
|
|
|
|
|
|
} |
968
|
|
|
|
|
|
|
|
969
|
|
|
|
|
|
|
sub value { |
970
|
4
|
|
|
4
|
|
8
|
my $self = shift; |
971
|
4
|
50
|
|
|
|
26
|
return $self->subject() |
972
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
973
|
0
|
|
|
|
|
0
|
return $self->__to_statement_array(); |
974
|
|
|
|
|
|
|
} |
975
|
|
|
|
|
|
|
|
976
|
|
|
|
|
|
|
sub __to_statement_array { |
977
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
978
|
0
|
|
|
|
|
0
|
my $statements = []; |
979
|
0
|
|
|
|
|
0
|
foreach my $my_super (@ISA) { |
980
|
|
|
|
|
|
|
next |
981
|
0
|
0
|
|
|
|
0
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
982
|
0
|
|
|
|
|
0
|
my $super_func = "${my_super}::__to_statement_array"; |
983
|
0
|
|
|
|
|
0
|
push @{$statements}, @{ $self->$super_func() }; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
984
|
|
|
|
|
|
|
} |
985
|
0
|
|
|
|
|
0
|
my %properties = ( '' => '', ); |
986
|
0
|
|
|
|
|
0
|
foreach my $propertyName ( keys(%properties) ) { |
987
|
|
|
|
|
|
|
next |
988
|
0
|
0
|
0
|
|
|
0
|
unless ( $propertyName && $propertyName ne '' ); |
989
|
0
|
|
|
|
|
0
|
my $property = $self->properties()->$propertyName(); |
990
|
0
|
|
|
|
|
0
|
foreach my $p ( @{$property} ) { |
|
0
|
|
|
|
|
0
|
|
991
|
0
|
|
|
|
|
0
|
my $p_value = $p->value(); |
992
|
0
|
|
|
|
|
0
|
my $property_uri = ODO::Node::Resource->new( |
993
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
994
|
0
|
0
|
|
|
|
0
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
995
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
996
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
997
|
|
|
|
|
|
|
$p_value ); |
998
|
|
|
|
|
|
|
} else { |
999
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1000
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1001
|
|
|
|
|
|
|
$p->subject() ); |
1002
|
0
|
|
|
|
|
0
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1003
|
|
|
|
|
|
|
} |
1004
|
|
|
|
|
|
|
} |
1005
|
|
|
|
|
|
|
} |
1006
|
0
|
|
|
|
|
0
|
return $statements; |
1007
|
|
|
|
|
|
|
} |
1008
|
|
|
|
|
|
|
1; |
1009
|
|
|
|
|
|
|
|
1010
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::PSetTable::PropertiesContainer; |
1011
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
1012
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
1013
|
1
|
|
|
1
|
|
5
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
39
|
|
1014
|
1
|
|
|
1
|
|
4
|
use ODO::RDFS::Property::PropertiesContainer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
1015
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property::PropertiesContainer', ); |
1016
|
|
|
|
|
|
|
|
1017
|
|
|
|
|
|
|
# Methods |
1018
|
|
|
|
|
|
|
1; |
1019
|
|
|
|
|
|
|
|
1020
|
|
|
|
|
|
|
|
1021
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::LSetType; |
1022
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
1023
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
1024
|
1
|
|
|
1
|
|
5
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
1025
|
1
|
|
|
1
|
|
5
|
use ODO; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
1026
|
1
|
|
|
1
|
|
5
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
1027
|
1
|
|
|
1
|
|
4
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
1028
|
1
|
|
|
1
|
|
5
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
431
|
|
1029
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property', ); |
1030
|
|
|
|
|
|
|
|
1031
|
|
|
|
|
|
|
# |
1032
|
|
|
|
|
|
|
# Description: # |
1033
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
1034
|
|
|
|
|
|
|
sub new { |
1035
|
4
|
|
|
4
|
|
55
|
my $self = shift; |
1036
|
4
|
|
|
|
|
11
|
my ( $resource, $graph, %properties ) = @_; |
1037
|
4
|
|
|
|
|
26
|
$self = $self->SUPER::new(@_); |
1038
|
|
|
|
|
|
|
return undef |
1039
|
4
|
50
|
|
|
|
13
|
unless ( ref $self ); |
1040
|
4
|
|
|
|
|
14
|
$self->propertyContainerName( |
1041
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetType::PropertiesContainer'); |
1042
|
4
|
|
|
|
|
39
|
$self->properties( bless {}, |
1043
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetType::PropertiesContainer' ); |
1044
|
4
|
|
|
|
|
29
|
$self->properties()->{'parent'} = $self; |
1045
|
4
|
|
|
|
|
53
|
return $self; |
1046
|
|
|
|
|
|
|
} |
1047
|
|
|
|
|
|
|
|
1048
|
|
|
|
|
|
|
sub queryString { |
1049
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
1050
|
|
|
|
|
|
|
} |
1051
|
|
|
|
|
|
|
|
1052
|
|
|
|
|
|
|
sub objectURI { |
1053
|
6
|
|
|
6
|
|
46
|
return 'http://jena.hpl.hp.com/2003/04/DB#LSetType'; |
1054
|
|
|
|
|
|
|
} |
1055
|
|
|
|
|
|
|
|
1056
|
|
|
|
|
|
|
sub value { |
1057
|
3
|
|
|
3
|
|
9
|
my $self = shift; |
1058
|
3
|
50
|
|
|
|
16
|
return $self->subject() |
1059
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
1060
|
0
|
|
|
|
|
0
|
return $self->__to_statement_array(); |
1061
|
|
|
|
|
|
|
} |
1062
|
|
|
|
|
|
|
|
1063
|
|
|
|
|
|
|
sub __to_statement_array { |
1064
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
1065
|
0
|
|
|
|
|
0
|
my $statements = []; |
1066
|
0
|
|
|
|
|
0
|
foreach my $my_super (@ISA) { |
1067
|
|
|
|
|
|
|
next |
1068
|
0
|
0
|
|
|
|
0
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
1069
|
0
|
|
|
|
|
0
|
my $super_func = "${my_super}::__to_statement_array"; |
1070
|
0
|
|
|
|
|
0
|
push @{$statements}, @{ $self->$super_func() }; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1071
|
|
|
|
|
|
|
} |
1072
|
0
|
|
|
|
|
0
|
my %properties = ( '' => '', ); |
1073
|
0
|
|
|
|
|
0
|
foreach my $propertyName ( keys(%properties) ) { |
1074
|
|
|
|
|
|
|
next |
1075
|
0
|
0
|
0
|
|
|
0
|
unless ( $propertyName && $propertyName ne '' ); |
1076
|
0
|
|
|
|
|
0
|
my $property = $self->properties()->$propertyName(); |
1077
|
0
|
|
|
|
|
0
|
foreach my $p ( @{$property} ) { |
|
0
|
|
|
|
|
0
|
|
1078
|
0
|
|
|
|
|
0
|
my $p_value = $p->value(); |
1079
|
0
|
|
|
|
|
0
|
my $property_uri = ODO::Node::Resource->new( |
1080
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
1081
|
0
|
0
|
|
|
|
0
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
1082
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1083
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1084
|
|
|
|
|
|
|
$p_value ); |
1085
|
|
|
|
|
|
|
} else { |
1086
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1087
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1088
|
|
|
|
|
|
|
$p->subject() ); |
1089
|
0
|
|
|
|
|
0
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1090
|
|
|
|
|
|
|
} |
1091
|
|
|
|
|
|
|
} |
1092
|
|
|
|
|
|
|
} |
1093
|
0
|
|
|
|
|
0
|
return $statements; |
1094
|
|
|
|
|
|
|
} |
1095
|
|
|
|
|
|
|
1; |
1096
|
|
|
|
|
|
|
|
1097
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::LSetType::PropertiesContainer; |
1098
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
1099
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
1100
|
1
|
|
|
1
|
|
4
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
52
|
|
1101
|
1
|
|
|
1
|
|
4
|
use ODO::RDFS::Property::PropertiesContainer; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
38
|
|
1102
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property::PropertiesContainer', ); |
1103
|
|
|
|
|
|
|
|
1104
|
|
|
|
|
|
|
# Methods |
1105
|
|
|
|
|
|
|
1; |
1106
|
|
|
|
|
|
|
|
1107
|
|
|
|
|
|
|
|
1108
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::PSetName; |
1109
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
38
|
|
1110
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
1111
|
1
|
|
|
1
|
|
14
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
1112
|
1
|
|
|
1
|
|
4
|
use ODO; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
1113
|
1
|
|
|
1
|
|
4
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
1114
|
1
|
|
|
1
|
|
4
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
1115
|
1
|
|
|
1
|
|
4
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
454
|
|
1116
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property', ); |
1117
|
|
|
|
|
|
|
|
1118
|
|
|
|
|
|
|
# |
1119
|
|
|
|
|
|
|
# Description: # |
1120
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
1121
|
|
|
|
|
|
|
sub new { |
1122
|
5
|
|
|
5
|
|
55
|
my $self = shift; |
1123
|
5
|
|
|
|
|
11
|
my ( $resource, $graph, %properties ) = @_; |
1124
|
5
|
|
|
|
|
30
|
$self = $self->SUPER::new(@_); |
1125
|
|
|
|
|
|
|
return undef |
1126
|
5
|
50
|
|
|
|
14
|
unless ( ref $self ); |
1127
|
5
|
|
|
|
|
25
|
$self->propertyContainerName( |
1128
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetName::PropertiesContainer'); |
1129
|
5
|
|
|
|
|
49
|
$self->properties( bless {}, |
1130
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::PSetName::PropertiesContainer' ); |
1131
|
5
|
|
|
|
|
40
|
$self->properties()->{'parent'} = $self; |
1132
|
5
|
|
|
|
|
44
|
return $self; |
1133
|
|
|
|
|
|
|
} |
1134
|
|
|
|
|
|
|
|
1135
|
|
|
|
|
|
|
sub queryString { |
1136
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
1137
|
|
|
|
|
|
|
} |
1138
|
|
|
|
|
|
|
|
1139
|
|
|
|
|
|
|
sub objectURI { |
1140
|
8
|
|
|
8
|
|
58
|
return 'http://jena.hpl.hp.com/2003/04/DB#PSetName'; |
1141
|
|
|
|
|
|
|
} |
1142
|
|
|
|
|
|
|
|
1143
|
|
|
|
|
|
|
sub value { |
1144
|
4
|
|
|
4
|
|
6
|
my $self = shift; |
1145
|
4
|
50
|
|
|
|
23
|
return $self->subject() |
1146
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
1147
|
0
|
|
|
|
|
0
|
return $self->__to_statement_array(); |
1148
|
|
|
|
|
|
|
} |
1149
|
|
|
|
|
|
|
|
1150
|
|
|
|
|
|
|
sub __to_statement_array { |
1151
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
1152
|
0
|
|
|
|
|
0
|
my $statements = []; |
1153
|
0
|
|
|
|
|
0
|
foreach my $my_super (@ISA) { |
1154
|
|
|
|
|
|
|
next |
1155
|
0
|
0
|
|
|
|
0
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
1156
|
0
|
|
|
|
|
0
|
my $super_func = "${my_super}::__to_statement_array"; |
1157
|
0
|
|
|
|
|
0
|
push @{$statements}, @{ $self->$super_func() }; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1158
|
|
|
|
|
|
|
} |
1159
|
0
|
|
|
|
|
0
|
my %properties = ( '' => '', ); |
1160
|
0
|
|
|
|
|
0
|
foreach my $propertyName ( keys(%properties) ) { |
1161
|
|
|
|
|
|
|
next |
1162
|
0
|
0
|
0
|
|
|
0
|
unless ( $propertyName && $propertyName ne '' ); |
1163
|
0
|
|
|
|
|
0
|
my $property = $self->properties()->$propertyName(); |
1164
|
0
|
|
|
|
|
0
|
foreach my $p ( @{$property} ) { |
|
0
|
|
|
|
|
0
|
|
1165
|
0
|
|
|
|
|
0
|
my $p_value = $p->value(); |
1166
|
0
|
|
|
|
|
0
|
my $property_uri = ODO::Node::Resource->new( |
1167
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
1168
|
0
|
0
|
|
|
|
0
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
1169
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1170
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1171
|
|
|
|
|
|
|
$p_value ); |
1172
|
|
|
|
|
|
|
} else { |
1173
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1174
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1175
|
|
|
|
|
|
|
$p->subject() ); |
1176
|
0
|
|
|
|
|
0
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1177
|
|
|
|
|
|
|
} |
1178
|
|
|
|
|
|
|
} |
1179
|
|
|
|
|
|
|
} |
1180
|
0
|
|
|
|
|
0
|
return $statements; |
1181
|
|
|
|
|
|
|
} |
1182
|
|
|
|
|
|
|
1; |
1183
|
|
|
|
|
|
|
|
1184
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::PSetName::PropertiesContainer; |
1185
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
27
|
|
1186
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
1187
|
1
|
|
|
1
|
|
4
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
43
|
|
1188
|
1
|
|
|
1
|
|
4
|
use ODO::RDFS::Property::PropertiesContainer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
1189
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property::PropertiesContainer', ); |
1190
|
|
|
|
|
|
|
|
1191
|
|
|
|
|
|
|
# Methods |
1192
|
|
|
|
|
|
|
1; |
1193
|
|
|
|
|
|
|
|
1194
|
|
|
|
|
|
|
|
1195
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::LSetName; |
1196
|
1
|
|
|
1
|
|
9
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
1197
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
1198
|
1
|
|
|
1
|
|
4
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
1199
|
1
|
|
|
1
|
|
4
|
use ODO; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
1200
|
1
|
|
|
1
|
|
6
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
32
|
|
1201
|
1
|
|
|
1
|
|
4
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
1202
|
1
|
|
|
1
|
|
4
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
594
|
|
1203
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property', ); |
1204
|
|
|
|
|
|
|
|
1205
|
|
|
|
|
|
|
# |
1206
|
|
|
|
|
|
|
# Description: # |
1207
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
1208
|
|
|
|
|
|
|
sub new { |
1209
|
4
|
|
|
4
|
|
42
|
my $self = shift; |
1210
|
4
|
|
|
|
|
8
|
my ( $resource, $graph, %properties ) = @_; |
1211
|
4
|
|
|
|
|
24
|
$self = $self->SUPER::new(@_); |
1212
|
|
|
|
|
|
|
return undef |
1213
|
4
|
50
|
|
|
|
10
|
unless ( ref $self ); |
1214
|
4
|
|
|
|
|
12
|
$self->propertyContainerName( |
1215
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetName::PropertiesContainer'); |
1216
|
4
|
|
|
|
|
35
|
$self->properties( bless {}, |
1217
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetName::PropertiesContainer' ); |
1218
|
4
|
|
|
|
|
25
|
$self->properties()->{'parent'} = $self; |
1219
|
4
|
|
|
|
|
973
|
return $self; |
1220
|
|
|
|
|
|
|
} |
1221
|
|
|
|
|
|
|
|
1222
|
|
|
|
|
|
|
sub queryString { |
1223
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
1224
|
|
|
|
|
|
|
} |
1225
|
|
|
|
|
|
|
|
1226
|
|
|
|
|
|
|
sub objectURI { |
1227
|
6
|
|
|
6
|
|
40
|
return 'http://jena.hpl.hp.com/2003/04/DB#LSetName'; |
1228
|
|
|
|
|
|
|
} |
1229
|
|
|
|
|
|
|
|
1230
|
|
|
|
|
|
|
sub value { |
1231
|
3
|
|
|
3
|
|
6
|
my $self = shift; |
1232
|
3
|
50
|
|
|
|
20
|
return $self->subject() |
1233
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
1234
|
0
|
|
|
|
|
0
|
return $self->__to_statement_array(); |
1235
|
|
|
|
|
|
|
} |
1236
|
|
|
|
|
|
|
|
1237
|
|
|
|
|
|
|
sub __to_statement_array { |
1238
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
1239
|
0
|
|
|
|
|
0
|
my $statements = []; |
1240
|
0
|
|
|
|
|
0
|
foreach my $my_super (@ISA) { |
1241
|
|
|
|
|
|
|
next |
1242
|
0
|
0
|
|
|
|
0
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
1243
|
0
|
|
|
|
|
0
|
my $super_func = "${my_super}::__to_statement_array"; |
1244
|
0
|
|
|
|
|
0
|
push @{$statements}, @{ $self->$super_func() }; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1245
|
|
|
|
|
|
|
} |
1246
|
0
|
|
|
|
|
0
|
my %properties = ( '' => '', ); |
1247
|
0
|
|
|
|
|
0
|
foreach my $propertyName ( keys(%properties) ) { |
1248
|
|
|
|
|
|
|
next |
1249
|
0
|
0
|
0
|
|
|
0
|
unless ( $propertyName && $propertyName ne '' ); |
1250
|
0
|
|
|
|
|
0
|
my $property = $self->properties()->$propertyName(); |
1251
|
0
|
|
|
|
|
0
|
foreach my $p ( @{$property} ) { |
|
0
|
|
|
|
|
0
|
|
1252
|
0
|
|
|
|
|
0
|
my $p_value = $p->value(); |
1253
|
0
|
|
|
|
|
0
|
my $property_uri = ODO::Node::Resource->new( |
1254
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
1255
|
0
|
0
|
|
|
|
0
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
1256
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1257
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1258
|
|
|
|
|
|
|
$p_value ); |
1259
|
|
|
|
|
|
|
} else { |
1260
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1261
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1262
|
|
|
|
|
|
|
$p->subject() ); |
1263
|
0
|
|
|
|
|
0
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1264
|
|
|
|
|
|
|
} |
1265
|
|
|
|
|
|
|
} |
1266
|
|
|
|
|
|
|
} |
1267
|
0
|
|
|
|
|
0
|
return $statements; |
1268
|
|
|
|
|
|
|
} |
1269
|
|
|
|
|
|
|
1; |
1270
|
|
|
|
|
|
|
|
1271
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::LSetName::PropertiesContainer; |
1272
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
1273
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
1274
|
1
|
|
|
1
|
|
4
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
38
|
|
1275
|
1
|
|
|
1
|
|
5
|
use ODO::RDFS::Property::PropertiesContainer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
1276
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property::PropertiesContainer', ); |
1277
|
|
|
|
|
|
|
|
1278
|
|
|
|
|
|
|
# Methods |
1279
|
|
|
|
|
|
|
1; |
1280
|
|
|
|
|
|
|
|
1281
|
|
|
|
|
|
|
|
1282
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::GraphName; |
1283
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
1284
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
91
|
|
1285
|
1
|
|
|
1
|
|
4
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
1286
|
1
|
|
|
1
|
|
4
|
use ODO; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
1287
|
1
|
|
|
1
|
|
6
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
1288
|
1
|
|
|
1
|
|
4
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
22
|
|
1289
|
1
|
|
|
1
|
|
6
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
436
|
|
1290
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property', ); |
1291
|
|
|
|
|
|
|
|
1292
|
|
|
|
|
|
|
# |
1293
|
|
|
|
|
|
|
# Description: # |
1294
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
1295
|
|
|
|
|
|
|
sub new { |
1296
|
3
|
|
|
3
|
|
28
|
my $self = shift; |
1297
|
3
|
|
|
|
|
9
|
my ( $resource, $graph, %properties ) = @_; |
1298
|
3
|
|
|
|
|
62
|
$self = $self->SUPER::new(@_); |
1299
|
|
|
|
|
|
|
return undef |
1300
|
3
|
50
|
|
|
|
8
|
unless ( ref $self ); |
1301
|
3
|
|
|
|
|
9
|
$self->propertyContainerName( |
1302
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphName::PropertiesContainer'); |
1303
|
3
|
|
|
|
|
27
|
$self->properties( bless {}, |
1304
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphName::PropertiesContainer' ); |
1305
|
3
|
|
|
|
|
21
|
$self->properties()->{'parent'} = $self; |
1306
|
3
|
|
|
|
|
31
|
return $self; |
1307
|
|
|
|
|
|
|
} |
1308
|
|
|
|
|
|
|
|
1309
|
|
|
|
|
|
|
sub queryString { |
1310
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
1311
|
|
|
|
|
|
|
} |
1312
|
|
|
|
|
|
|
|
1313
|
|
|
|
|
|
|
sub objectURI { |
1314
|
4
|
|
|
4
|
|
25
|
return 'http://jena.hpl.hp.com/2003/04/DB#GraphName'; |
1315
|
|
|
|
|
|
|
} |
1316
|
|
|
|
|
|
|
|
1317
|
|
|
|
|
|
|
sub value { |
1318
|
2
|
|
|
2
|
|
3
|
my $self = shift; |
1319
|
2
|
50
|
|
|
|
17
|
return $self->subject() |
1320
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
1321
|
0
|
|
|
|
|
0
|
return $self->__to_statement_array(); |
1322
|
|
|
|
|
|
|
} |
1323
|
|
|
|
|
|
|
|
1324
|
|
|
|
|
|
|
sub __to_statement_array { |
1325
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
1326
|
0
|
|
|
|
|
0
|
my $statements = []; |
1327
|
0
|
|
|
|
|
0
|
foreach my $my_super (@ISA) { |
1328
|
|
|
|
|
|
|
next |
1329
|
0
|
0
|
|
|
|
0
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
1330
|
0
|
|
|
|
|
0
|
my $super_func = "${my_super}::__to_statement_array"; |
1331
|
0
|
|
|
|
|
0
|
push @{$statements}, @{ $self->$super_func() }; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1332
|
|
|
|
|
|
|
} |
1333
|
0
|
|
|
|
|
0
|
my %properties = ( '' => '', ); |
1334
|
0
|
|
|
|
|
0
|
foreach my $propertyName ( keys(%properties) ) { |
1335
|
|
|
|
|
|
|
next |
1336
|
0
|
0
|
0
|
|
|
0
|
unless ( $propertyName && $propertyName ne '' ); |
1337
|
0
|
|
|
|
|
0
|
my $property = $self->properties()->$propertyName(); |
1338
|
0
|
|
|
|
|
0
|
foreach my $p ( @{$property} ) { |
|
0
|
|
|
|
|
0
|
|
1339
|
0
|
|
|
|
|
0
|
my $p_value = $p->value(); |
1340
|
0
|
|
|
|
|
0
|
my $property_uri = ODO::Node::Resource->new( |
1341
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
1342
|
0
|
0
|
|
|
|
0
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
1343
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1344
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1345
|
|
|
|
|
|
|
$p_value ); |
1346
|
|
|
|
|
|
|
} else { |
1347
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1348
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1349
|
|
|
|
|
|
|
$p->subject() ); |
1350
|
0
|
|
|
|
|
0
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1351
|
|
|
|
|
|
|
} |
1352
|
|
|
|
|
|
|
} |
1353
|
|
|
|
|
|
|
} |
1354
|
0
|
|
|
|
|
0
|
return $statements; |
1355
|
|
|
|
|
|
|
} |
1356
|
|
|
|
|
|
|
1; |
1357
|
|
|
|
|
|
|
|
1358
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::GraphName::PropertiesContainer; |
1359
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
1360
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
1361
|
1
|
|
|
1
|
|
5
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
38
|
|
1362
|
1
|
|
|
1
|
|
6
|
use ODO::RDFS::Property::PropertiesContainer; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
40
|
|
1363
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property::PropertiesContainer', ); |
1364
|
|
|
|
|
|
|
|
1365
|
|
|
|
|
|
|
# Methods |
1366
|
|
|
|
|
|
|
1; |
1367
|
|
|
|
|
|
|
|
1368
|
|
|
|
|
|
|
|
1369
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::GraphLSet; |
1370
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
1371
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
1372
|
1
|
|
|
1
|
|
4
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
1373
|
1
|
|
|
1
|
|
4
|
use ODO; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
1374
|
1
|
|
|
1
|
|
5
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
1375
|
1
|
|
|
1
|
|
4
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
1376
|
|
|
|
|
|
|
|
1377
|
1
|
|
|
1
|
|
44
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
450
|
|
1378
|
|
|
|
|
|
|
@ISA = ( 'ODO::Jena::Graph::LSet', 'ODO::RDFS::Property', ); |
1379
|
|
|
|
|
|
|
|
1380
|
|
|
|
|
|
|
# |
1381
|
|
|
|
|
|
|
# Description: # |
1382
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
1383
|
|
|
|
|
|
|
sub new { |
1384
|
3
|
|
|
3
|
|
33
|
my $self = shift; |
1385
|
3
|
|
|
|
|
23
|
my ( $resource, $graph, %properties ) = @_; |
1386
|
3
|
|
|
|
|
18
|
$self = $self->SUPER::new(@_); |
1387
|
|
|
|
|
|
|
return undef |
1388
|
3
|
50
|
|
|
|
12
|
unless ( ref $self ); |
1389
|
3
|
|
|
|
|
11
|
$self->propertyContainerName( |
1390
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphLSet::PropertiesContainer'); |
1391
|
3
|
|
|
|
|
27
|
$self->properties( bless {}, |
1392
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphLSet::PropertiesContainer' ); |
1393
|
3
|
|
|
|
|
32
|
$self->properties()->{'parent'} = $self; |
1394
|
3
|
|
|
|
|
36
|
return $self; |
1395
|
|
|
|
|
|
|
} |
1396
|
|
|
|
|
|
|
|
1397
|
|
|
|
|
|
|
sub queryString { |
1398
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
1399
|
|
|
|
|
|
|
} |
1400
|
|
|
|
|
|
|
|
1401
|
|
|
|
|
|
|
sub objectURI { |
1402
|
4
|
|
|
4
|
|
28
|
return 'http://jena.hpl.hp.com/2003/04/DB#GraphLSet'; |
1403
|
|
|
|
|
|
|
} |
1404
|
|
|
|
|
|
|
|
1405
|
|
|
|
|
|
|
sub value { |
1406
|
2
|
|
|
2
|
|
5
|
my $self = shift; |
1407
|
2
|
50
|
|
|
|
9
|
return $self->subject() |
1408
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
1409
|
2
|
|
|
|
|
25
|
return $self->__to_statement_array(); |
1410
|
|
|
|
|
|
|
} |
1411
|
|
|
|
|
|
|
|
1412
|
|
|
|
|
|
|
sub __to_statement_array { |
1413
|
2
|
|
|
2
|
|
3
|
my $self = shift; |
1414
|
2
|
|
|
|
|
5
|
my $statements = []; |
1415
|
2
|
|
|
|
|
7
|
foreach my $my_super (@ISA) { |
1416
|
|
|
|
|
|
|
next |
1417
|
4
|
50
|
|
|
|
35
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
1418
|
4
|
|
|
|
|
15
|
my $super_func = "${my_super}::__to_statement_array"; |
1419
|
4
|
|
|
|
|
8
|
push @{$statements}, @{ $self->$super_func() }; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
22
|
|
1420
|
|
|
|
|
|
|
} |
1421
|
2
|
|
|
|
|
9
|
my %properties = ( '' => '', ); |
1422
|
2
|
|
|
|
|
7
|
foreach my $propertyName ( keys(%properties) ) { |
1423
|
|
|
|
|
|
|
next |
1424
|
2
|
50
|
33
|
|
|
12
|
unless ( $propertyName && $propertyName ne '' ); |
1425
|
0
|
|
|
|
|
0
|
my $property = $self->properties()->$propertyName(); |
1426
|
0
|
|
|
|
|
0
|
foreach my $p ( @{$property} ) { |
|
0
|
|
|
|
|
0
|
|
1427
|
0
|
|
|
|
|
0
|
my $p_value = $p->value(); |
1428
|
0
|
|
|
|
|
0
|
my $property_uri = ODO::Node::Resource->new( |
1429
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
1430
|
0
|
0
|
|
|
|
0
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
1431
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1432
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1433
|
|
|
|
|
|
|
$p_value ); |
1434
|
|
|
|
|
|
|
} else { |
1435
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1436
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1437
|
|
|
|
|
|
|
$p->subject() ); |
1438
|
0
|
|
|
|
|
0
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1439
|
|
|
|
|
|
|
} |
1440
|
|
|
|
|
|
|
} |
1441
|
|
|
|
|
|
|
} |
1442
|
2
|
|
|
|
|
16
|
return $statements; |
1443
|
|
|
|
|
|
|
} |
1444
|
|
|
|
|
|
|
1; |
1445
|
|
|
|
|
|
|
|
1446
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::GraphLSet::PropertiesContainer; |
1447
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
1448
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
1449
|
1
|
|
|
1
|
|
4
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
48
|
|
1450
|
1
|
|
|
1
|
|
4
|
use ODO::RDFS::Property::PropertiesContainer; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
41
|
|
1451
|
|
|
|
|
|
|
@ISA = ( |
1452
|
|
|
|
|
|
|
'ODO::Jena::Graph::LSet::PropertiesContainer', |
1453
|
|
|
|
|
|
|
'ODO::RDFS::Property::PropertiesContainer', |
1454
|
|
|
|
|
|
|
); |
1455
|
|
|
|
|
|
|
|
1456
|
|
|
|
|
|
|
# Methods |
1457
|
|
|
|
|
|
|
1; |
1458
|
|
|
|
|
|
|
|
1459
|
|
|
|
|
|
|
|
1460
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::LSetPSet; |
1461
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
25
|
|
1462
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
1463
|
1
|
|
|
1
|
|
4
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
1464
|
1
|
|
|
1
|
|
4
|
use ODO; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
1465
|
1
|
|
|
1
|
|
4
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
1466
|
1
|
|
|
1
|
|
4
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
1467
|
1
|
|
|
1
|
|
4
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
480
|
|
1468
|
|
|
|
|
|
|
@ISA = ( 'ODO::Jena::Graph::PSet', 'ODO::RDFS::Property', ); |
1469
|
|
|
|
|
|
|
|
1470
|
|
|
|
|
|
|
# |
1471
|
|
|
|
|
|
|
# Description: # |
1472
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
1473
|
|
|
|
|
|
|
sub new { |
1474
|
4
|
|
|
4
|
|
45
|
my $self = shift; |
1475
|
4
|
|
|
|
|
11
|
my ( $resource, $graph, %properties ) = @_; |
1476
|
4
|
|
|
|
|
23
|
$self = $self->SUPER::new(@_); |
1477
|
|
|
|
|
|
|
return undef |
1478
|
4
|
50
|
|
|
|
12
|
unless ( ref $self ); |
1479
|
4
|
|
|
|
|
12
|
$self->propertyContainerName( |
1480
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetPSet::PropertiesContainer'); |
1481
|
4
|
|
|
|
|
37
|
$self->properties( bless {}, |
1482
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::LSetPSet::PropertiesContainer' ); |
1483
|
4
|
|
|
|
|
35
|
$self->properties()->{'parent'} = $self; |
1484
|
4
|
|
|
|
|
36
|
return $self; |
1485
|
|
|
|
|
|
|
} |
1486
|
|
|
|
|
|
|
|
1487
|
|
|
|
|
|
|
sub queryString { |
1488
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
1489
|
|
|
|
|
|
|
} |
1490
|
|
|
|
|
|
|
|
1491
|
|
|
|
|
|
|
sub objectURI { |
1492
|
6
|
|
|
6
|
|
45
|
return 'http://jena.hpl.hp.com/2003/04/DB#LSetPSet'; |
1493
|
|
|
|
|
|
|
} |
1494
|
|
|
|
|
|
|
|
1495
|
|
|
|
|
|
|
sub value { |
1496
|
3
|
|
|
3
|
|
6
|
my $self = shift; |
1497
|
3
|
50
|
|
|
|
10
|
return $self->subject() |
1498
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
1499
|
3
|
|
|
|
|
31
|
return $self->__to_statement_array(); |
1500
|
|
|
|
|
|
|
} |
1501
|
|
|
|
|
|
|
|
1502
|
|
|
|
|
|
|
sub __to_statement_array { |
1503
|
3
|
|
|
3
|
|
6
|
my $self = shift; |
1504
|
3
|
|
|
|
|
4
|
my $statements = []; |
1505
|
3
|
|
|
|
|
10
|
foreach my $my_super (@ISA) { |
1506
|
|
|
|
|
|
|
next |
1507
|
6
|
50
|
|
|
|
44
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
1508
|
6
|
|
|
|
|
18
|
my $super_func = "${my_super}::__to_statement_array"; |
1509
|
6
|
|
|
|
|
8
|
push @{$statements}, @{ $self->$super_func() }; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
32
|
|
1510
|
|
|
|
|
|
|
} |
1511
|
3
|
|
|
|
|
12
|
my %properties = ( '' => '', ); |
1512
|
3
|
|
|
|
|
9
|
foreach my $propertyName ( keys(%properties) ) { |
1513
|
|
|
|
|
|
|
next |
1514
|
3
|
50
|
33
|
|
|
17
|
unless ( $propertyName && $propertyName ne '' ); |
1515
|
0
|
|
|
|
|
0
|
my $property = $self->properties()->$propertyName(); |
1516
|
0
|
|
|
|
|
0
|
foreach my $p ( @{$property} ) { |
|
0
|
|
|
|
|
0
|
|
1517
|
0
|
|
|
|
|
0
|
my $p_value = $p->value(); |
1518
|
0
|
|
|
|
|
0
|
my $property_uri = ODO::Node::Resource->new( |
1519
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
1520
|
0
|
0
|
|
|
|
0
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
1521
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1522
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1523
|
|
|
|
|
|
|
$p_value ); |
1524
|
|
|
|
|
|
|
} else { |
1525
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1526
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1527
|
|
|
|
|
|
|
$p->subject() ); |
1528
|
0
|
|
|
|
|
0
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1529
|
|
|
|
|
|
|
} |
1530
|
|
|
|
|
|
|
} |
1531
|
|
|
|
|
|
|
} |
1532
|
3
|
|
|
|
|
14
|
return $statements; |
1533
|
|
|
|
|
|
|
} |
1534
|
|
|
|
|
|
|
1; |
1535
|
|
|
|
|
|
|
|
1536
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::LSetPSet::PropertiesContainer; |
1537
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
27
|
|
1538
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
1539
|
1
|
|
|
1
|
|
3
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
91
|
|
1540
|
1
|
|
|
1
|
|
5
|
use ODO::RDFS::Property::PropertiesContainer; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
46
|
|
1541
|
|
|
|
|
|
|
@ISA = ( |
1542
|
|
|
|
|
|
|
'ODO::Jena::Graph::PSet::PropertiesContainer', |
1543
|
|
|
|
|
|
|
'ODO::RDFS::Property::PropertiesContainer', |
1544
|
|
|
|
|
|
|
); |
1545
|
|
|
|
|
|
|
|
1546
|
|
|
|
|
|
|
# Methods |
1547
|
|
|
|
|
|
|
1; |
1548
|
|
|
|
|
|
|
|
1549
|
|
|
|
|
|
|
|
1550
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::GraphType; |
1551
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
1552
|
1
|
|
|
1
|
|
9
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
1553
|
1
|
|
|
1
|
|
4
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
32
|
|
1554
|
1
|
|
|
1
|
|
4
|
use ODO; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
1555
|
1
|
|
|
1
|
|
5
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
1556
|
1
|
|
|
1
|
|
4
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
1557
|
1
|
|
|
1
|
|
4
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
446
|
|
1558
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property', ); |
1559
|
|
|
|
|
|
|
|
1560
|
|
|
|
|
|
|
# |
1561
|
|
|
|
|
|
|
# Description: # |
1562
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
1563
|
|
|
|
|
|
|
sub new { |
1564
|
3
|
|
|
3
|
|
28
|
my $self = shift; |
1565
|
3
|
|
|
|
|
6
|
my ( $resource, $graph, %properties ) = @_; |
1566
|
3
|
|
|
|
|
20
|
$self = $self->SUPER::new(@_); |
1567
|
|
|
|
|
|
|
return undef |
1568
|
3
|
50
|
|
|
|
10
|
unless ( ref $self ); |
1569
|
3
|
|
|
|
|
11
|
$self->propertyContainerName( |
1570
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphType::PropertiesContainer'); |
1571
|
3
|
|
|
|
|
28
|
$self->properties( bless {}, |
1572
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphType::PropertiesContainer' ); |
1573
|
3
|
|
|
|
|
20
|
$self->properties()->{'parent'} = $self; |
1574
|
3
|
|
|
|
|
33
|
return $self; |
1575
|
|
|
|
|
|
|
} |
1576
|
|
|
|
|
|
|
|
1577
|
|
|
|
|
|
|
sub queryString { |
1578
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
1579
|
|
|
|
|
|
|
} |
1580
|
|
|
|
|
|
|
|
1581
|
|
|
|
|
|
|
sub objectURI { |
1582
|
4
|
|
|
4
|
|
22
|
return 'http://jena.hpl.hp.com/2003/04/DB#GraphType'; |
1583
|
|
|
|
|
|
|
} |
1584
|
|
|
|
|
|
|
|
1585
|
|
|
|
|
|
|
sub value { |
1586
|
2
|
|
|
2
|
|
5
|
my $self = shift; |
1587
|
2
|
50
|
|
|
|
18
|
return $self->subject() |
1588
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
1589
|
0
|
|
|
|
|
0
|
return $self->__to_statement_array(); |
1590
|
|
|
|
|
|
|
} |
1591
|
|
|
|
|
|
|
|
1592
|
|
|
|
|
|
|
sub __to_statement_array { |
1593
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
1594
|
0
|
|
|
|
|
0
|
my $statements = []; |
1595
|
0
|
|
|
|
|
0
|
foreach my $my_super (@ISA) { |
1596
|
|
|
|
|
|
|
next |
1597
|
0
|
0
|
|
|
|
0
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
1598
|
0
|
|
|
|
|
0
|
my $super_func = "${my_super}::__to_statement_array"; |
1599
|
0
|
|
|
|
|
0
|
push @{$statements}, @{ $self->$super_func() }; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1600
|
|
|
|
|
|
|
} |
1601
|
0
|
|
|
|
|
0
|
my %properties = ( '' => '', ); |
1602
|
0
|
|
|
|
|
0
|
foreach my $propertyName ( keys(%properties) ) { |
1603
|
|
|
|
|
|
|
next |
1604
|
0
|
0
|
0
|
|
|
0
|
unless ( $propertyName && $propertyName ne '' ); |
1605
|
0
|
|
|
|
|
0
|
my $property = $self->properties()->$propertyName(); |
1606
|
0
|
|
|
|
|
0
|
foreach my $p ( @{$property} ) { |
|
0
|
|
|
|
|
0
|
|
1607
|
0
|
|
|
|
|
0
|
my $p_value = $p->value(); |
1608
|
0
|
|
|
|
|
0
|
my $property_uri = ODO::Node::Resource->new( |
1609
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
1610
|
0
|
0
|
|
|
|
0
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
1611
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1612
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1613
|
|
|
|
|
|
|
$p_value ); |
1614
|
|
|
|
|
|
|
} else { |
1615
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1616
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1617
|
|
|
|
|
|
|
$p->subject() ); |
1618
|
0
|
|
|
|
|
0
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1619
|
|
|
|
|
|
|
} |
1620
|
|
|
|
|
|
|
} |
1621
|
|
|
|
|
|
|
} |
1622
|
0
|
|
|
|
|
0
|
return $statements; |
1623
|
|
|
|
|
|
|
} |
1624
|
|
|
|
|
|
|
1; |
1625
|
|
|
|
|
|
|
|
1626
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::GraphType::PropertiesContainer; |
1627
|
1
|
|
|
1
|
|
15
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
1628
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
35
|
|
1629
|
1
|
|
|
1
|
|
4
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
48
|
|
|
1
|
|
|
|
|
63
|
|
1630
|
1
|
|
|
1
|
|
6
|
use ODO::RDFS::Property::PropertiesContainer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
1631
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property::PropertiesContainer', ); |
1632
|
|
|
|
|
|
|
|
1633
|
|
|
|
|
|
|
# Methods |
1634
|
|
|
|
|
|
|
1; |
1635
|
|
|
|
|
|
|
|
1636
|
|
|
|
|
|
|
|
1637
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::GraphId; |
1638
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
1639
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
1640
|
1
|
|
|
1
|
|
4
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
1641
|
1
|
|
|
1
|
|
4
|
use ODO; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
57
|
|
1642
|
1
|
|
|
1
|
|
4
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
35
|
|
1643
|
1
|
|
|
1
|
|
5
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
29
|
|
1644
|
1
|
|
|
1
|
|
5
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
425
|
|
1645
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property', ); |
1646
|
|
|
|
|
|
|
|
1647
|
|
|
|
|
|
|
# |
1648
|
|
|
|
|
|
|
# Description: # |
1649
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
1650
|
|
|
|
|
|
|
sub new { |
1651
|
3
|
|
|
3
|
|
29
|
my $self = shift; |
1652
|
3
|
|
|
|
|
7
|
my ( $resource, $graph, %properties ) = @_; |
1653
|
3
|
|
|
|
|
18
|
$self = $self->SUPER::new(@_); |
1654
|
|
|
|
|
|
|
return undef |
1655
|
3
|
50
|
|
|
|
9
|
unless ( ref $self ); |
1656
|
3
|
|
|
|
|
9
|
$self->propertyContainerName( |
1657
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphId::PropertiesContainer'); |
1658
|
3
|
|
|
|
|
24
|
$self->properties( bless {}, |
1659
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphId::PropertiesContainer' ); |
1660
|
3
|
|
|
|
|
18
|
$self->properties()->{'parent'} = $self; |
1661
|
3
|
|
|
|
|
36
|
return $self; |
1662
|
|
|
|
|
|
|
} |
1663
|
|
|
|
|
|
|
|
1664
|
|
|
|
|
|
|
sub queryString { |
1665
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
1666
|
|
|
|
|
|
|
} |
1667
|
|
|
|
|
|
|
|
1668
|
|
|
|
|
|
|
sub objectURI { |
1669
|
4
|
|
|
4
|
|
37
|
return 'http://jena.hpl.hp.com/2003/04/DB#GraphId'; |
1670
|
|
|
|
|
|
|
} |
1671
|
|
|
|
|
|
|
|
1672
|
|
|
|
|
|
|
sub value { |
1673
|
2
|
|
|
2
|
|
5
|
my $self = shift; |
1674
|
2
|
50
|
|
|
|
21
|
return $self->subject() |
1675
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
1676
|
0
|
|
|
|
|
0
|
return $self->__to_statement_array(); |
1677
|
|
|
|
|
|
|
} |
1678
|
|
|
|
|
|
|
|
1679
|
|
|
|
|
|
|
sub __to_statement_array { |
1680
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
1681
|
0
|
|
|
|
|
0
|
my $statements = []; |
1682
|
0
|
|
|
|
|
0
|
foreach my $my_super (@ISA) { |
1683
|
|
|
|
|
|
|
next |
1684
|
0
|
0
|
|
|
|
0
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
1685
|
0
|
|
|
|
|
0
|
my $super_func = "${my_super}::__to_statement_array"; |
1686
|
0
|
|
|
|
|
0
|
push @{$statements}, @{ $self->$super_func() }; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1687
|
|
|
|
|
|
|
} |
1688
|
0
|
|
|
|
|
0
|
my %properties = ( '' => '', ); |
1689
|
0
|
|
|
|
|
0
|
foreach my $propertyName ( keys(%properties) ) { |
1690
|
|
|
|
|
|
|
next |
1691
|
0
|
0
|
0
|
|
|
0
|
unless ( $propertyName && $propertyName ne '' ); |
1692
|
0
|
|
|
|
|
0
|
my $property = $self->properties()->$propertyName(); |
1693
|
0
|
|
|
|
|
0
|
foreach my $p ( @{$property} ) { |
|
0
|
|
|
|
|
0
|
|
1694
|
0
|
|
|
|
|
0
|
my $p_value = $p->value(); |
1695
|
0
|
|
|
|
|
0
|
my $property_uri = ODO::Node::Resource->new( |
1696
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
1697
|
0
|
0
|
|
|
|
0
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
1698
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1699
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1700
|
|
|
|
|
|
|
$p_value ); |
1701
|
|
|
|
|
|
|
} else { |
1702
|
0
|
|
|
|
|
0
|
push @{$statements}, |
|
0
|
|
|
|
|
0
|
|
1703
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1704
|
|
|
|
|
|
|
$p->subject() ); |
1705
|
0
|
|
|
|
|
0
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1706
|
|
|
|
|
|
|
} |
1707
|
|
|
|
|
|
|
} |
1708
|
|
|
|
|
|
|
} |
1709
|
0
|
|
|
|
|
0
|
return $statements; |
1710
|
|
|
|
|
|
|
} |
1711
|
|
|
|
|
|
|
1; |
1712
|
|
|
|
|
|
|
|
1713
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::GraphId::PropertiesContainer; |
1714
|
1
|
|
|
1
|
|
10
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
1715
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
1716
|
1
|
|
|
1
|
|
4
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
49
|
|
1717
|
1
|
|
|
1
|
|
4
|
use ODO::RDFS::Property::PropertiesContainer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
1718
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property::PropertiesContainer', ); |
1719
|
|
|
|
|
|
|
|
1720
|
|
|
|
|
|
|
# Methods |
1721
|
|
|
|
|
|
|
1; |
1722
|
|
|
|
|
|
|
|
1723
|
|
|
|
|
|
|
|
1724
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::GraphPrefix; |
1725
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
1726
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
1727
|
1
|
|
|
1
|
|
4
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
1728
|
1
|
|
|
1
|
|
4
|
use ODO; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
1729
|
1
|
|
|
1
|
|
5
|
use ODO::Query::Simple; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
1730
|
1
|
|
|
1
|
|
9
|
use ODO::Statement::Group; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
1731
|
1
|
|
|
1
|
|
5
|
use ODO::RDFS::Property; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
446
|
|
1732
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property', ); |
1733
|
|
|
|
|
|
|
|
1734
|
|
|
|
|
|
|
# |
1735
|
|
|
|
|
|
|
# Description: # |
1736
|
|
|
|
|
|
|
# Schema URI: http://jena.hpl.hp.com/2003/04/DB## |
1737
|
|
|
|
|
|
|
sub new { |
1738
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
1739
|
0
|
|
|
|
|
0
|
my ( $resource, $graph, %properties ) = @_; |
1740
|
0
|
|
|
|
|
0
|
$self = $self->SUPER::new(@_); |
1741
|
|
|
|
|
|
|
return undef |
1742
|
0
|
0
|
|
|
|
0
|
unless ( ref $self ); |
1743
|
0
|
|
|
|
|
0
|
$self->propertyContainerName( |
1744
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphPrefix::PropertiesContainer'); |
1745
|
0
|
|
|
|
|
0
|
$self->properties( bless {}, |
1746
|
|
|
|
|
|
|
'ODO::Jena::Graph::Properties::GraphPrefix::PropertiesContainer' ); |
1747
|
0
|
|
|
|
|
0
|
$self->properties()->{'parent'} = $self; |
1748
|
0
|
|
|
|
|
0
|
return $self; |
1749
|
|
|
|
|
|
|
} |
1750
|
|
|
|
|
|
|
|
1751
|
|
|
|
|
|
|
sub queryString { |
1752
|
0
|
|
|
0
|
|
0
|
return '(?subj, rdf:type, )'; |
1753
|
|
|
|
|
|
|
} |
1754
|
|
|
|
|
|
|
|
1755
|
|
|
|
|
|
|
sub objectURI { |
1756
|
1
|
|
|
1
|
|
17
|
return 'http://jena.hpl.hp.com/2003/04/DB#GraphPrefix'; |
1757
|
|
|
|
|
|
|
} |
1758
|
|
|
|
|
|
|
|
1759
|
|
|
|
|
|
|
sub value { |
1760
|
0
|
|
|
0
|
|
|
my $self = shift; |
1761
|
0
|
0
|
|
|
|
|
return $self->subject() |
1762
|
|
|
|
|
|
|
if ( UNIVERSAL::isa( $self->subject(), 'ODO::Node::Literal' ) ); |
1763
|
0
|
|
|
|
|
|
return $self->__to_statement_array(); |
1764
|
|
|
|
|
|
|
} |
1765
|
|
|
|
|
|
|
|
1766
|
|
|
|
|
|
|
sub __to_statement_array { |
1767
|
0
|
|
|
0
|
|
|
my $self = shift; |
1768
|
0
|
|
|
|
|
|
my $statements = []; |
1769
|
0
|
|
|
|
|
|
foreach my $my_super (@ISA) { |
1770
|
|
|
|
|
|
|
next |
1771
|
0
|
0
|
|
|
|
|
unless ( UNIVERSAL::can( $my_super, '__to_statement_array' ) ); |
1772
|
0
|
|
|
|
|
|
my $super_func = "${my_super}::__to_statement_array"; |
1773
|
0
|
|
|
|
|
|
push @{$statements}, @{ $self->$super_func() }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1774
|
|
|
|
|
|
|
} |
1775
|
0
|
|
|
|
|
|
my %properties = ( '' => '', ); |
1776
|
0
|
|
|
|
|
|
foreach my $propertyName ( keys(%properties) ) { |
1777
|
|
|
|
|
|
|
next |
1778
|
0
|
0
|
0
|
|
|
|
unless ( $propertyName && $propertyName ne '' ); |
1779
|
0
|
|
|
|
|
|
my $property = $self->properties()->$propertyName(); |
1780
|
0
|
|
|
|
|
|
foreach my $p ( @{$property} ) { |
|
0
|
|
|
|
|
|
|
1781
|
0
|
|
|
|
|
|
my $p_value = $p->value(); |
1782
|
0
|
|
|
|
|
|
my $property_uri = ODO::Node::Resource->new( |
1783
|
|
|
|
|
|
|
$properties{$propertyName}->objectURI() ); |
1784
|
0
|
0
|
|
|
|
|
if ( UNIVERSAL::isa( $p_value, 'ODO::Node::Literal' ) ) { |
1785
|
0
|
|
|
|
|
|
push @{$statements}, |
|
0
|
|
|
|
|
|
|
1786
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1787
|
|
|
|
|
|
|
$p_value ); |
1788
|
|
|
|
|
|
|
} else { |
1789
|
0
|
|
|
|
|
|
push @{$statements}, |
|
0
|
|
|
|
|
|
|
1790
|
|
|
|
|
|
|
ODO::Statement->new( $self->subject(), $property_uri, |
1791
|
|
|
|
|
|
|
$p->subject() ); |
1792
|
0
|
|
|
|
|
|
push @{$statements}, @{$p_value}; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1793
|
|
|
|
|
|
|
} |
1794
|
|
|
|
|
|
|
} |
1795
|
|
|
|
|
|
|
} |
1796
|
0
|
|
|
|
|
|
return $statements; |
1797
|
|
|
|
|
|
|
} |
1798
|
|
|
|
|
|
|
1; |
1799
|
|
|
|
|
|
|
|
1800
|
|
|
|
|
|
|
package ODO::Jena::Graph::Properties::GraphPrefix::PropertiesContainer; |
1801
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
1802
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
39
|
|
|
1
|
|
|
|
|
28
|
|
1803
|
1
|
|
|
1
|
|
4
|
use vars qw( $AUTOLOAD @ISA ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
1804
|
1
|
|
|
1
|
|
5
|
use ODO::RDFS::Property::PropertiesContainer; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
91
|
|
1805
|
|
|
|
|
|
|
@ISA = ( 'ODO::RDFS::Property::PropertiesContainer', ); |
1806
|
|
|
|
|
|
|
|
1807
|
|
|
|
|
|
|
# Methods |
1808
|
|
|
|
|
|
|
1; |