line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
1859
|
use utf8; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
28
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package SemanticWeb::Schema::Thing; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# ABSTRACT: The most generic type of item. |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
156
|
use v5.14; |
|
3
|
|
|
|
|
11
|
|
8
|
3
|
|
|
3
|
|
20
|
use Moo; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
19
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extends qw/ SemanticWeb::Schema /; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
1092
|
use MooX::JSON_LD 'Thing'; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
22
|
|
14
|
3
|
|
|
3
|
|
6639
|
use Ref::Util qw/ is_plain_hashref /; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
142
|
|
15
|
|
|
|
|
|
|
# RECOMMEND PREREQ: Ref::Util::XS |
16
|
|
|
|
|
|
|
|
17
|
3
|
|
|
3
|
|
26
|
use namespace::autoclean; |
|
3
|
|
|
|
|
33
|
|
|
3
|
|
|
|
|
19
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our $VERSION = 'v21.0.1'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has additional_type => ( |
23
|
|
|
|
|
|
|
is => 'rw', |
24
|
|
|
|
|
|
|
predicate => '_has_additional_type', |
25
|
|
|
|
|
|
|
json_ld => 'additionalType', |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has alternate_name => ( |
31
|
|
|
|
|
|
|
is => 'rw', |
32
|
|
|
|
|
|
|
predicate => '_has_alternate_name', |
33
|
|
|
|
|
|
|
json_ld => 'alternateName', |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has description => ( |
39
|
|
|
|
|
|
|
is => 'rw', |
40
|
|
|
|
|
|
|
predicate => '_has_description', |
41
|
|
|
|
|
|
|
json_ld => 'description', |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
has disambiguating_description => ( |
47
|
|
|
|
|
|
|
is => 'rw', |
48
|
|
|
|
|
|
|
predicate => '_has_disambiguating_description', |
49
|
|
|
|
|
|
|
json_ld => 'disambiguatingDescription', |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
has identifier => ( |
55
|
|
|
|
|
|
|
is => 'rw', |
56
|
|
|
|
|
|
|
predicate => '_has_identifier', |
57
|
|
|
|
|
|
|
json_ld => 'identifier', |
58
|
|
|
|
|
|
|
); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
has image => ( |
63
|
|
|
|
|
|
|
is => 'rw', |
64
|
|
|
|
|
|
|
predicate => '_has_image', |
65
|
|
|
|
|
|
|
json_ld => 'image', |
66
|
|
|
|
|
|
|
); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
has main_entity_of_page => ( |
71
|
|
|
|
|
|
|
is => 'rw', |
72
|
|
|
|
|
|
|
predicate => '_has_main_entity_of_page', |
73
|
|
|
|
|
|
|
json_ld => 'mainEntityOfPage', |
74
|
|
|
|
|
|
|
); |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
has name => ( |
79
|
|
|
|
|
|
|
is => 'rw', |
80
|
|
|
|
|
|
|
predicate => '_has_name', |
81
|
|
|
|
|
|
|
json_ld => 'name', |
82
|
|
|
|
|
|
|
); |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
has potential_action => ( |
87
|
|
|
|
|
|
|
is => 'rw', |
88
|
|
|
|
|
|
|
predicate => '_has_potential_action', |
89
|
|
|
|
|
|
|
json_ld => 'potentialAction', |
90
|
|
|
|
|
|
|
); |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
has same_as => ( |
95
|
|
|
|
|
|
|
is => 'rw', |
96
|
|
|
|
|
|
|
predicate => '_has_same_as', |
97
|
|
|
|
|
|
|
json_ld => 'sameAs', |
98
|
|
|
|
|
|
|
); |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
has subject_of => ( |
103
|
|
|
|
|
|
|
is => 'rw', |
104
|
|
|
|
|
|
|
predicate => '_has_subject_of', |
105
|
|
|
|
|
|
|
json_ld => 'subjectOf', |
106
|
|
|
|
|
|
|
); |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
has url => ( |
111
|
|
|
|
|
|
|
is => 'rw', |
112
|
|
|
|
|
|
|
predicate => '_has_url', |
113
|
|
|
|
|
|
|
json_ld => 'url', |
114
|
|
|
|
|
|
|
); |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
1; |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
__END__ |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=pod |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=encoding UTF-8 |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head1 NAME |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
SemanticWeb::Schema::Thing - The most generic type of item. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head1 VERSION |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
version v21.0.1 |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head1 DESCRIPTION |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
The most generic type of item. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head2 C<additional_type> |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
C<additionalType> |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=for html <p>An additional type for the item, typically used for adding more specific |
147
|
|
|
|
|
|
|
types from external vocabularies in microdata syntax. This is a |
148
|
|
|
|
|
|
|
relationship between something and a class that the thing is in. Typically |
149
|
|
|
|
|
|
|
the value is a URI-identified RDF class, and in this case corresponds to |
150
|
|
|
|
|
|
|
the use of rdf:type in RDF. Text values can be used sparingly, for cases |
151
|
|
|
|
|
|
|
where useful information can be added without their being an appropriate |
152
|
|
|
|
|
|
|
schema to reference. In the case of text values, the class label should |
153
|
|
|
|
|
|
|
follow the schema.org <a |
154
|
|
|
|
|
|
|
href="http://schema.org/docs/styleguide.html">style guide</a></p> |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
A additional_type should be one of the following types: |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=over |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=item C<Str> |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=back |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head2 C<_has_additional_type> |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
A predicate for the L</additional_type> attribute. |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=head2 C<alternate_name> |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
C<alternateName> |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
An alias for the item. |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
A alternate_name should be one of the following types: |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=over |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=item C<Str> |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=back |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head2 C<_has_alternate_name> |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
A predicate for the L</alternate_name> attribute. |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=head2 C<description> |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
A description of the item. |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
A description should be one of the following types: |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=over |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=item C<InstanceOf['SemanticWeb::Schema::TextObject']> |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
=item C<Str> |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
=back |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
=head2 C<_has_description> |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
A predicate for the L</description> attribute. |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
=head2 C<disambiguating_description> |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
C<disambiguatingDescription> |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
A sub property of description. A short description of the item used to |
209
|
|
|
|
|
|
|
disambiguate from other, similar items. Information from other properties |
210
|
|
|
|
|
|
|
(in particular, name) may be necessary for the description to be useful for |
211
|
|
|
|
|
|
|
disambiguation. |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
A disambiguating_description should be one of the following types: |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
=over |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
=item C<Str> |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
=back |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
=head2 C<_has_disambiguating_description> |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
A predicate for the L</disambiguating_description> attribute. |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
=head2 C<identifier> |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
The identifier property represents any kind of identifier for any kind of L<SemanticWeb::Schema::Thing>, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See L<background notes|/docs/datamodel.html#identifierBg> for more details. |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
A identifier should be one of the following types: |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
=over |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
=item C<InstanceOf['SemanticWeb::Schema::PropertyValue']> |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
=item C<Str> |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
=back |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
=head2 C<_has_identifier> |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
A predicate for the L</identifier> attribute. |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
=head2 C<image> |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
An image of the item. This can be a L<SemanticWeb::Schema::URL> or a fully described L<SemanticWeb::Schema::ImageObject>. |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
A image should be one of the following types: |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
=over |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
=item C<InstanceOf['SemanticWeb::Schema::ImageObject']> |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
=item C<Str> |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
=back |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
=head2 C<_has_image> |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
A predicate for the L</image> attribute. |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
=head2 C<main_entity_of_page> |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
C<mainEntityOfPage> |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
Indicates a page (or other CreativeWork) for which this thing is the main |
266
|
|
|
|
|
|
|
entity being described. See [background |
267
|
|
|
|
|
|
|
notes](/docs/datamodel.html#mainEntityBackground) for details. |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
A main_entity_of_page should be one of the following types: |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
=over |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
=item C<InstanceOf['SemanticWeb::Schema::CreativeWork']> |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
=item C<Str> |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
=back |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
=head2 C<_has_main_entity_of_page> |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
A predicate for the L</main_entity_of_page> attribute. |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
=head2 C<name> |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
The name of the item. |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
A name should be one of the following types: |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
=over |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
=item C<Str> |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
=back |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
=head2 C<_has_name> |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
A predicate for the L</name> attribute. |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
=head2 C<potential_action> |
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
C<potentialAction> |
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
Indicates a potential Action, which describes an idealized action in which |
304
|
|
|
|
|
|
|
this thing would play an 'object' role. |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
A potential_action should be one of the following types: |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
=over |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
=item C<InstanceOf['SemanticWeb::Schema::Action']> |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
=back |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
=head2 C<_has_potential_action> |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
A predicate for the L</potential_action> attribute. |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
=head2 C<same_as> |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
C<sameAs> |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
URL of a reference Web page that unambiguously indicates the item's |
323
|
|
|
|
|
|
|
identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or |
324
|
|
|
|
|
|
|
official website. |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
A same_as should be one of the following types: |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
=over |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
=item C<Str> |
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
=back |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
=head2 C<_has_same_as> |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
A predicate for the L</same_as> attribute. |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
=head2 C<subject_of> |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
C<subjectOf> |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
A CreativeWork or Event about this Thing. |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
A subject_of should be one of the following types: |
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
=over |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
=item C<InstanceOf['SemanticWeb::Schema::CreativeWork']> |
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
=item C<InstanceOf['SemanticWeb::Schema::Event']> |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
=back |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
=head2 C<_has_subject_of> |
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
A predicate for the L</subject_of> attribute. |
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
=head2 C<url> |
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
URL of the item. |
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
A url should be one of the following types: |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
=over |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
=item C<Str> |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
=back |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
=head2 C<_has_url> |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
A predicate for the L</url> attribute. |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
=head1 SEE ALSO |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
L<SemanticWeb::Schema> |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
=head1 SOURCE |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
The development version is on github at L<https://github.com/robrwo/SemanticWeb-Schema> |
381
|
|
|
|
|
|
|
and may be cloned from L<git://github.com/robrwo/SemanticWeb-Schema.git> |
382
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
=head1 BUGS |
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
Please report any bugs or feature requests on the bugtracker website |
386
|
|
|
|
|
|
|
L<https://github.com/robrwo/SemanticWeb-Schema/issues> |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
When submitting a bug or request, please include a test-file or a |
389
|
|
|
|
|
|
|
patch to an existing test-file that illustrates the bug or desired |
390
|
|
|
|
|
|
|
feature. |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
=head1 AUTHOR |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
Robert Rothenberg <rrwo@cpan.org> |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
This software is Copyright (c) 2018-2023 by Robert Rothenberg. |
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
This is free software, licensed under: |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
=cut |