-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsonld.html
1584 lines (1438 loc) · 57.2 KB
/
jsonld.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<title>ORE User Guide - Resource Map Implementation in JSON-LD</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="http://www.openarchives.org/ore/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="http://www.openarchives.org/ore/1.0/ore-spec.css" type="text/css" />
<link href="http://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet" type="text/css" />
<style type="text/css">
pre,code {
font-family: 'Consolas', 'Inconsolata', 'Monaco', monospace;
}
.TODO:before {
content: "TODO: ";
font-weight: bold;
}
.TODO {
display: block;
background: #ee6;
border: 1px dashed #444;
padding: 0.4em;
}
.draft:before {
content: "(Subject to change)";
font-style: italic;
margin-bottom: 1em;
display: block;
}
.draft {
color: #555;
border: 3pt dashed #444;
padding-top: 1em;
padding-bottom: 1em;
}
</style>
</head>
<body>
<div id="header">
<table class="layout">
<tr>
<td><img alt="OAI logo" src="http://www.openarchives.org/images/OA100.gif" width="100" height="70" /></td>
<td class="OREtext">Open Archives Initiative<br />Object Reuse and Exchange</td>
<td><img alt="ORE logo" src="http://www.openarchives.org/ore/logos/ore_logo_e_80.png" width="80" height="80" /></td>
</tr>
</table>
</div>
<div id="titleBlock">
<h2 class="title">ORE User Guide - Resource Map Implementation in JSON-LD</h2>
<h3 class="subTitle">Editors draft, 2014-07-30</h3>
</div><!--div-titleBlock-->
<dl>
<dt>This version:</dt>
<dd><a href="https://w3id.org/ore/">https://w3id.org/ore/</a></dd>
<dt>Editor's draft:</dt>
<dd><a href="http://stain.github.io/ore/jsonld.html">http://stain.github.io/ore/jsonld.html</a>
(see <a href="https://github.com/stain/ore">revisions and pull requests</a>)
</dd>
<dt>Latest version:</dt>
<dd class="TODO"><a href="http://www.openarchives.org/ore/jsonld">http://www.openarchives.org/ore/jsonld</a></dd>
<!--
<dt>Previous version:</dt>
<dd><a href="http://www.openarchives.org/ore/0.9/jsonld">http://www.openarchives.org/ore/0.9/jsonld</a></dd>
-->
</dl>
<dl class="EditorsContributors" prefix="pav: http://purl.org/pav/ foaf: http://xmlns.com/foaf/0.1/">
<dt>Editors</dt>
<dd><a rel="pav:authoredBy" href="http://orcid.org/0000-0001-9842-9718">
<span property="foaf:name">Stian Soiland-Reyes</span></a>,
<a href="http://www.cs.manchester.ac.uk/">University of Manchester</a></dd>
<dd><a rel="pav:contributedBy" href="http://orcid.org/0000-0003-4913-1485">
<span property="foaf:name">Matthew Gamble</span></a>,
<a href="http://www.cs.manchester.ac.uk/">University of Manchester</a></dd>
<dt>Contributors</dt>
<dd><a rel="pav:contributedBy" href="http://orcid.org/0000-0002-9260-0753">
<span property="foaf:name">Oscar Corcho</span></a>,
<a href="http://www.oeg-upm.net/">Universidad Politecnica de Madrid</a></dd>
<dd><a property="pav:contributedBy" href="http://orcid.org/0000-0002-7970-7855">
<span property="foaf:name">Simeon Warner</span></a>,
<a href="http://www.cornell.edu/">Cornell University</a></dd>
</dl>
<section>
<div class="abstract" id="abstract">
<h2>Abstract</h2>
<p>Open Archives Initiative Object Reuse and Exchange (OAI-ORE)
defines standards for the description and exchange of aggregations of
Web resources. OAI-ORE introduces the notion of a Resource Map, an
RDF Graph [<a href="http://www.w3.org/TR/rdf11-concepts/">RDF Concepts</a>] which
describes the Aggregation, the aggregated Resources of which it is
composed, and the relationships between them (and/or the relationships
between these and other resources).</p>
<p>Since a Resource Map is an RDF
Graph, it can be serialized using any RDF syntax. This document
outlines the use of one such syntax for the serialization of Resource
Maps: <a href="http://json-ld.org/">JSON-LD</a>. Two companion documents
[<a href="http://www.openarchives.org/ore/1.0/rdfa">ORE RDFa</a>] and
[<a href="http://www.openarchives.org/ore/1.0/rdfxml">ORE RDF/XML</a>]
outline the serialization of Resource Maps in
[<a href="http://www.w3.org/TR/rdfa-syntax/">RDFa Syntax</a>] and
[<a href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML syntax</a>].</p>
<p>This document is intended for implementers who have an understanding of ORE concepts
and are responsible for the development of applications which generate or process
Resource Maps using JSON-LD. Readers who want a high-level understanding of the motivation
for ORE, and of the solution it provides, should read the [<a href="http://www.openarchives.org/ore/1.0/primer">ORE Primer</a>];
readers who want further details of the JSON-LD syntax should consult the W3C
<a href="http://www.w3.org/TR/json-ld/">JSON-LD specification</a> [<a href="#JSON-LD">JSON-LD</a>].</p>
<p>This is one of several
documents comprising the <a href="http://www.openarchives.org/ore/1.0/toc">OAI-ORE specifications and user
guides</a>.</p>
</div>
</section>
<hr />
<!--
Generated with respec.js
-->
<section id="toc">
<h2>Table of Contents</h2>
<ul class="toc" role="directory" id="respecContents">
<li class="tocline">
<a href="#introduction">1. Introduction</a>
<ul class="toc">
<li class="tocline">
<a href="#notational_conventions">1.1 Notational Conventions</a>
</li>
<li class="tocline">
<a href="#namespaces">1.2 Namespaces</a>
</li>
<li class="tocline">
<a href="#conformance">1.3 Conformance</a>
</li>
</ul>
</li>
<li class="tocline">
<a href="#syntax">2. Overview of ORE in JSON-LD syntax</a>
<ul class="toc">
<li class="tocline">
<a href="#aggregation">2.1 ResourceMap, describes, Aggregation</a>
</li>
<li class="tocline">
<a href="#isDescribedBy">2.2 isDescribedBy</a>
</li>
<li class="tocline">
<a href="#similarTo">2.3 similarTo</a>
</li>
<li class="tocline">
<a href="#aggregates">2.4 aggregates</a>
</li>
<li class="tocline">
<a href="#isAggregatedBy">2.5 isAggregatedBy, isDescribedBy</a>
</li>
<li class="tocline">
<a href="#proxies">2.6 proxies, proxyFor, proxyIn</a>
</li>
<li class="tocline">
<a href="#provenance">2.7 lineage and provenance of proxy</a>
</li>
</ul>
</li>
<li class="tocline">
<a href="#context">3. ORE JSON-LD context</a>
<ul class="toc">
<li class="tocline">
<a href="#additional-contexts">3.1 Additional contexts</a>
</li>
<li class="tocline">
<a href="#context-content">3.2 Content of ORE JSON-LD context</a>
</li>
</ul>
</li>
<li class="tocline">
<a href="#complete-example">4. Complete example</a>
<ul class="toc">
<li class="tocline">
<a href="#example-jsonld">4.1 Example JSON-LD</a>
</li>
<li class="tocline">
<a href="#example-triples">4.2 Example triples</a>
</li>
</ul>
</li>
<li class="tocline">
<a href="#frame">5. ORE JSON-LD frame</a>
<ul class="toc">
<li class="tocline">
<a href="#example-framing">5.1 Example framing</a>
</li>
<li class="tocline">
<a href="#framing-proxies">5.2 Framing proxies</a>
</li>
</ul>
</li>
<li class="tocline">
<a href="#references">6. References</a>
</li>
<li class="tocline">
<a href="#acknowledgements">A. Acknowledgements</a>
</li>
<li class="tocline">
<a href="#changelog">B. Change Log</a>
</li>
</ul>
</section>
<hr />
<section id="introduction">
<h2>1. Introduction</h2>
<p>
Open Archives Initiative Object Reuse and Exchange (OAI-ORE)
defines standards for the description and exchange of aggregations
of web resources. The
<a href="http://www.openarchives.org/ore/1.0/datamodel">OAI-ORE Abstract Data Model</a>
[<a href="#ORE_Model">ORE Model</a>]
introduces the notion of a Resource Map, an <a
href="http://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/#section-rdf-graph">RDF Graph</a>
[<a href="#RDF_Concepts">RDF Concepts</a>] which describes the
Aggregation, the aggregated Resources of which it is composed,
and the relationships between them (and/or the relationships
between these and other resources). Since a Resource Map is
an RDF Graph, it can be serialized using any RDF syntax.
This document outlines the use of one such syntax for the
serialization of Resource Maps: <a href="http://json-ld.org/">JSON-LD</a>.
</p>
<p>
The <a href="http://www.w3.org/TR/json-ld/">JSON-LD specification</a>
describes a format for serialising RDF
graphs as <a href="http://www.ietf.org/rfc/rfc4627.txt">JSON</a> [RFC4627].
In short, the JSON-LD format allows the use of JSON Objects (maps/dictionaries)
to represent an RDF resource. The JSON-LD reserved key
<a href="http://www.w3.org/TR/2014/REC-json-ld-20140116/#node-identifiers"><code>@id</code></a> defines the
IRI for the resource, and
<a href="http://www.w3.org/TR/2014/REC-json-ld-20140116/#specifying-the-type"><code>@type</code></a>
defines the <code>rdf:type</code> (class of the
resource). Other RDF properties are defined using additional keys on the
resource, and can point to either other JSON Objects, JSON Lists (multiple
property relations) or to plain JSON literals. The JSON-LD
<a href="http://www.w3.org/TR/2014/REC-json-ld-20140116/#the-context"><code>@context</code></a>
can define
prefixes and short-hand names, thus avoiding the need to use full IRIs
for identifying properties and types. This specification includes a
<a href="context">ORE JSON-LD context</a> for this purpose.
</p>
<p>
JSON-LD allows for several equivalent representations of the same graph
triples, and a compliant ORE JSON-LD document might therefore not follow the
JSON structure exactly as listed in the examples of this document.
See the <a href="framing">framing section</a> for measures to
shape an ORE JSON-LD document into a predictable JSON structure.
</p>
<section id="notational_conventions">
<h3>1.1 Notational Conventions</h3>
<p>The keywords "MUST", "MUST NOT",
"REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED",
"NOT RECOMMENDED",
"MAY", and "OPTIONAL" in this document are to be
interpreted as described in RFC 2119
[<cite><a href="http://www.ietf.org/rfc/rfc2119.txt">RFC2119</a></cite>].</p>
<p>This specification may use the common term <em>URI</em> to mean both IRI
[<a href="http://www.ietf.org/rfc/rfc3987">RFC3987</a>]
and URI [<a href="http://www.ietf.org/rfc/rfc3986">RFC3986</a>].
JSON-LD <a href="http://www.w3.org/TR/json-ld/#iris">natively supports IRIs</a>
without any special measures.
</p>
</section>
<section id="namespaces">
<h3>1.2 Namespaces</h3>
<p>This specification uses the following namespaces and prefixes:</p>
<table class="namespace-table">
<tr>
<th>Prefix</th>
<th>Namespace URI</th>
<th>Description</th>
</tr>
<tr>
<td><span class="code">ore</span></td>
<td><span class="code">http://www.openarchives.org/ore/terms/</span></td>
<td><a href="http://www.openarchives.org/ore/1.0/vocabulary">ORE</a> vocabulary</td>
</tr>
<tr>
<td><span class="code">rdf</span></td>
<td><span class="code">http://www.w3.org/1999/02/22-rdf-syntax-ns#</span></td>
<td><a href="http://www.w3.org/TR/rdf-schema/">RDF</a> built-in vocabulary </td>
</tr>
<tr>
<td><span class="code">rdfs</span></td>
<td><span class="code">http://www.w3.org/2000/01/rdf-schema#</span></td>
<td><a href="http://www.w3.org/TR/rdf-schema/">RDFS</a> vocabulary </td>
</tr>
<tr>
<td><span class="code">owl</span></td>
<td><span class="code">http://www.w3.org/2002/07/owl#</span></td>
<td><a href="http://www.w3.org/TR/owl2-primer/">OWL</a> vocabulary </td>
</tr>
<tr>
<td><span class="code">dcterms</span></td>
<td><span class="code">http://purl.org/dc/terms/</span></td>
<td><a href="http://dublincore.org/documents/2012/06/14/dcmi-terms/">Dublin Core Terms</a></td>
</tr>
<tr>
<td><span class="code">dcmitype</span></td>
<td><span class="code">http://purl.org/dc/dcmitype/</span></td>
<td><a href="http://dublincore.org/documents/2012/06/14/dcmi-terms/?v=dcmitype#H7">Dublin Core DCMI types</a></td>
</tr>
<tr>
<td><span class="code">fabio</span></td>
<td><span class="code">http://purl.org/spar/fabio/</span></td>
<td><a href="http://purl.org/spar/fabio/">FaBiO</a>, the FRBR-aligned Bibliographic Ontology</td>
</tr>
<tr>
<td><span class="code">foaf</span></td>
<td><span class="code">http://xmlns.com/foaf/0.1/</span></td>
<td><a href="http://xmlns.com/foaf/spec/">FOAF</a> vocabulary</td>
</tr>
<tr>
<td><span class="code">prov</span></td>
<td><span class="code">http://w3.org/ns/prov#/</span></td>
<td><a href="http://www.w3.org/TR/prov-o/">PROV ontology</a></td>
</tr>
<tr>
<td><span class="code">pav</span></td>
<td><span class="code">http://purl.org/pav/</span></td>
<td><a href="http://purl.org/pav/html">PAV</a> ontology</td>
</tr>
<tr>
<td><span class="code">schema</span></td>
<td><span class="code">http://schema.org/</span></td>
<td><a href="http://schema.org/">schema.org</a> vocabulary</td>
</tr>
</table>
</section>
<section id="conformance">
<h3>1.3 Conformance</h3>
<p>The Internet Media Type (MIME type) for JSON-LD is
<a href="http://www.w3.org/TR/json-ld/#application-ld-json"><code>application/ld+json</code></a>.
Where JSON-LD is used to provide representations of ORE Resource Maps, that
media type SHOULD be used. For backwards compatibility, the JSON-LD
specification allows for the alternative content-type of
<code>application/json</code>, in which case the
<a href="http://www.w3.org/TR/json-ld/#interpreting-json-as-json-ld">JSON-LD context Link header</a>
MUST be present.
</p>
<p> A consumer of ORE Resource Maps encoded in
JSON-LD SHOULD support all of the syntactic conventions defined by
JSON-LD. This allowance for different syntactic conventions is
supported by conformant
<a href="http://json-ld.org/#developers">JSON-LD parsers</a>.
</p>
</section>
</section>
<section id="syntax">
<h2>2. Overview of ORE in JSON-LD syntax</h2>
<p>
An ORE Resource Map expressed as a JSON-LD resource MUST be valid
<a href="https://www.ietf.org/rfc/rfc4627">JSON</a> [<a href="#RFC4627">RFC4627</a>], and
MUST be valid <a href="http://www.w3.org/TR/json-ld/">JSON-LD</a> [<a href="#JSON-LD">JSON-LD</a>].
</p>
<p>
An ORE JSON-LD resource MUST define a JSON-LD <code>@context</code>,
which SHOULD be <code>https://w3id.org/ore/context</code>
(see <a href="#context">ORE JSON-LD context</a> below).
</p>
<p>
The <code>@type</code> SHOULD be provided for ORE resources of type
<code>Aggregation</code>,
<code>ResourceMap</code>,
<code>Proxy</code>, and MAY be provided for resources of type
<code>AggregatedResource</code> and others.
</p>
<section id="aggregation">
<h4>ResourceMap, describes, Aggregation</h4>
<p>
The <a href="http://www.openarchives.org/ore/1.0/datamodel#Resource_Map"><code>ResourceMap</code></a>
SHOULD be the top-level JSON object
(indicating that the JSON-LD document <em>is</em> the resource map),
in which case it MUST indicate which
<a href="http://www.openarchives.org/ore/1.0/datamodel#Aggregation"><code>Aggregation</code></a>
it <a href="http://www.openarchives.org/ore/1.0/vocabulary#ore-describes"><code>describes</code></a>:
</p>
<pre>
{ "@context": "https://w3id.org/ore/context",
<strong>
"@type": "ResourceMap",
"@id": "",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation"
}
</strong>
}
</pre>
The Aggregation MUST have an <code>@id</code> to identify it; this URI SHOULD be absolute.
The ResourceMap MAY have an identifier using <code>@id</code>, which MUST be different from
the Aggregation URI.
</section>
<section id="isDescribedBy">
<h4>isDescribedBy</h4>
The <code>Aggregation</code> MAY list
<a href="http://www.openarchives.org/ore/1.0/datamodel#ReM-to-aggr">other resource maps</a>
it <a href="http://www.openarchives.org/ore/1.0/vocabulary#ore-is-described-by"><code>isDescribedBy</code></a>,
which SHOULD be given as a JSON list of URIs:
<pre>
{ "@context": "https://w3id.org/ore/context",
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
<strong>
"isDescribedBy": [
"http://example.com/aggregation-1.rdf",
"http://example.com/aggregation-1.jsonld"
]
</strong>
}
}
</pre>
</section>
<section id="similarTo">
<h4>similarTo</h4>
<p>
If an <code>Aggregation</code> can be considered
<a href="http://www.openarchives.org/ore/1.0/vocabulary#ore-similarTo">similar to</a> another
resource, like a journal article identified with a DOI, then this MAY be indicated using
<code>similarTo</code>:
</p>
<pre>
{ "@context": "https://w3id.org/ore/context",
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
<strong>
"similarTo": "http://dx.doi.org/10.1002/cpe.1594"
</strong>
}
}
</pre>
</section>
<section id="aggregates">
<h4>aggregates</h4>
All resources aggregated by this <code>Aggregation</code> MUST be listed using
<a href="http://www.openarchives.org/ore/1.0/vocabulary#ore-aggregates"><code>aggregates</code></a>,
which SHOULD be given as a JSON list. The list MUST
contain either URI strings or JSON Objects, which SHOULD specify their URI
with <code>@id</code>:
<pre>
{ "@context": "https://w3id.org/ore/context",
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
<strong>
"aggregates": [
"http://example.com/document-1",
{ "@id": "http://other.example.org/data-2",
"@type": "AggregatedResource"
}
]
</strong>
}
}
</pre>
<p>
Aggregated resources MAY specify their
<code>"@type": "<a href="http://www.openarchives.org/ore/1.0/vocabulary#aggr_res">AggregatedResource</a>"</code>.
If a
more specific type of the resource is known (e.g. <a href="http://purl.org/dc/dcmitype/MovingImage">dcmitype:MovingImage</a> or
<a href="http://purl.org/spar/fabio/MagazineNewsItem">fabio:MagazineNewsItem</a>),
it is RECOMMENDED to specify this using <code>@type</code> and the full URI of
the class. A JSON List MAY be used to indicate multiple types. Example:
</p>
<pre>
{ "@context": "https://w3id.org/ore/context",
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
<strong>
"aggregates": [
"http://example.com/document-1",
{ "@id": "http://other.example.org/data-2",
"@type": ["AggregatedResource",
"http://purl.org/dc/dcmitype/Dataset",
"http://www.w3.org/ns/dcat#Dataset"]
}
]
</strong>
}
}
</pre>
<p>
Additional descriptions of aggregated resources MAY be provided using other RDF vocabularies
following the <a href="http://www.w3.org/TR/json-ld/">JSON-LD syntax</a>.
The example below shows how to to indicate the <a href="http://www.w3.org/TR/prov-primer/">provenance</a>
of an aggregated resource using
<a href="http://www.w3.org/TR/prov-o/">PROV-O</a> [<a href="#PROV-O">PROV-O</a>]
and <a href="http://purl.org/pav/html">PAV</a> [<a href="#PAV">PAV</a>].
When using third-party vocabularies it may be desirable to add prefixes using
<a href="#additional-contexts">additional contexts</a> as a list.
</p>
<pre>
{ "@context": [
"https://w3id.org/ore/context",
{
"foaf": "http://xmlns.com/foaf/0.1/",
"schema": "http://schema.org/",
"prov": "http://www.w3.org/ns/prov#",
"pav": "http://purl.org/pav/"
}
],
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
"aggregates": [
"http://example.com/document-1",
{ "@id": "http://example.com/blog/",
<strong>
"@type": "schema:BlogPosting",
"prov:wasDerivedFrom": {
"@id": "http://example.com/document-1"
},
"pav:authoredBy": {
"@id": "http://orcid.org/0000-0001-9842-9718",
"foaf:name": "Stian Soiland-Reyes"
}
</strong>
}
]
}
}
</pre>
</section>
<section id="isAggregatedBy">
<h4>isAggregatedBy, isDescribedBy</h4>
<p>
If a resource is also part of a <em>different</em> <code>Aggregation</code>,
then this can be indicated with
<a href="http://www.openarchives.org/ore/1.0/vocabulary#ore-is-aggregated-by"><code>isAggregatedBy</code></a>:
</p>
<pre>
{ "@context": "https://w3id.org/ore/context",
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
"aggregates": [
{ "@id": "http://other.example.org/data-2",
<strong>
"isAggregatedBy": {
"@id": "http://other.example.org/aggregation-2",
"@type": "Aggregation"
}
</strong>
}
]
}
}
</pre>
<p>
It is NOT RECOMMENDED to detail the <a href="#aggregates"><code>aggregates</code></a>
of the other <code>Aggregation</code>, but one MAY use
<a href="http://www.openarchives.org/ore/1.0/vocabulary#ore-is-described-by"><code>isDescribedBy</code></a>
to indicate its <code>ResourceMap</code> representations.</p>
<p>In the special case of <em>aggregating another Aggregation</em>,
that SHOULD be typed as an <code>Aggregation</code>,
and there SHOULD be at least one <code>ResourceMap</code>
representation indicated with <code>isDescribedBy</code>:
</p>
<pre>
{ "@context": "https://w3id.org/ore/context",
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
"aggregates": [
{ "@id": "http://other.example.org/aggregation-2",
<strong>
"@type": "Aggregation",
"isDescribedBy": [ "http://other.example.org/aggregation-2.rdf",
"http://other.example.org/aggregation-2.jsonld" ]
</strong>
}
]
}
}
</pre>
</section>
<section id="proxies">
<h4>proxies, proxyFor, proxyIn</h4>
<p>
A <a href="http://www.openarchives.org/ore/1.0/datamodel#Proxies">Proxy</a>
represents an <code>AggregatedResource</code> as it exists in a specific <code>Aggregation</code>,
which can be used as a
<a href="http://www.openarchives.org/ore/1.0/datamodel#ProxyTarget">subject in other annotations</a>
and aggregations. Proxies
SHOULD be provided for each aggregated resource:
</p>
<pre>
{ "@context": "https://w3id.org/ore/context",
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
"aggregates": [
{ "@id": "http://example.com/document-1" }
],
<strong>
"proxies": [
{ "@id": "urn:uuid:d4e63599-d28d-4966-8606-dbb985a865f2",
"@type": "Proxy",
"proxyFor": "http://example.com/document-1" }
]
</strong>
}
}
</pre>
<p>
The property <code>proxies</code> SHOULD be a JSON List of resources,
each of which SHOULD have
<code>"@type": "<a href="http://www.openarchives.org/ore/1.0/vocabulary#proxy">Proxy</a>"</code> and MUST
identify the aggregated resource using <a href="http://www.openarchives.org/ore/1.0/vocabulary#ore-proxyFor"><code>proxyFor</code></a>.
The resource identified by <code>proxyFor</code> MUST be listed under <a href="#aggreates"><code>aggregates</code></a>.
</p>
<p>
The proxy MUST be identified with an URI using <code>@id</code>, which MAY
be a randomly generated <a href="http://www.ietf.org/rfc/rfc4122.txt">UUID</a>
[<a href="RFC4122">UUID</a>]
using the <code>urn:uuuid:</code> scheme.
</p>
<p>Note that, unlike in other serializations of ORE resource maps,
the property <a href="http://www.openarchives.org/ore/1.0/vocabulary#ore-proxyIn"><code>proxyIn</code></a>
SHOULD NOT be given for proxies listed under
<code>proxies</code> (it is already given as <code>proxies</code> is a
<a href="http://www.w3.org/TR/json-ld/#reverse-properties"><code>@reverse</code></a>
property for <code>proxyIn</code>);
however in the special case of <em>aggregating
a proxy</em>, that MUST specify <code>proxyIn</code>, which MUST be a different Aggregation:</p>
<pre>
{ "@context": "https://w3id.org/ore/context",
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
"aggregates": [
{ "@id": "urn:uuid:09561248-bf55-4c85-930a-9a7a60e81602",
<strong>
"@type": "Proxy",
"proxyFor": "http://example.com/document-1",
"proxyIn": "http://other.example.org/aggregation-3"
</strong>
}
]
}
}
</pre>
<p>
Such "external" proxies MUST NOT be listed under <code>proxies</code> as a proxy can
only be <code>proxyFor</code> for a single <code>Aggregation</code>, and an
aggregation SHOULD NOT aggregate its own proxies. The <code>proxyIn</code>
MAY be expanded to a JSON Object with <code>@id</code> and <code>"@type": "Aggregation"</code>
to provide <code>isDescribedBy</code> .
</p>
</section>
<section id="provenance">
<h4>lineage and provenance of proxy</h4>
<p>
If an aggregated resource was <em>discovered in a different aggregation</em>, this
<a href="http://www.openarchives.org/ore/1.0/vocabulary#ore-lineage">lineage</a>
can be described between the corresponding proxies:
</p>
<pre>
{ "@context": "https://w3id.org/ore/context",
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
"aggregates": [
{ "@id": "http://example.com/document-1" },
],
"proxies": [
{ "@id": "urn:uuid:d4e63599-d28d-4966-8606-dbb985a865f2",
"@type": "Proxy",
"proxyFor": "http://example.com/document-1"
<strong>
"lineage" {
"@id": "urn:uuid:09561248-bf55-4c85-930a-9a7a60e81602",
"@type": "Proxy",
"proxyFor": "http://example.com/document-1",
"proxyIn": "http://other.example.org/aggregation-3"
}
</strong>
]
}
}
</pre>
<p>
Other kinds of <em>provenance of a proxy</em> (e.g. who aggregated the given resource)
MAY be stated using vocabularies like
<a href="http://www.w3.org/TR/prov-o/">PROV-O</a>
and <a href="http://purl.org/pav/html">PAV</a>. The example below says that Matthew
aggregated <code>document-1</code> (e.g. created its proxy in this aggregation)
on the 17th of May 2014 (without implying that he created <code>document-1</code>):
</p>
<pre>
{ "@context": [
"https://w3id.org/ore/context",
{
"foaf": "http://xmlns.com/foaf/0.1/",
"prov": "http://www.w3.org/ns/prov#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"prov:generatedAtTime": { "@type": "xsd:dateTime" }
}
],
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
"aggregates": [
"http://example.com/document-1"
],
"proxies": [
{ "@id": "urn:uuid:d4e63599-d28d-4966-8606-dbb985a865f2",
"@type": "Proxy",
"proxyFor": "http://example.com/document-1",
<strong>
"prov:attributedTo": {
"@id": "http://orcid.org/0000-0003-4913-1485",
"foaf:name": "Matthew Gamble"
},
"prov:generatedAtTime": "2014-05-17T14:00:00Z"
</strong>
}
]
}
}
</pre>
</section>
</section>
<section id="context">
<h2>3. ORE JSON-LD context</h2>
<p>
A <a href="http://www.w3.org/TR/2014/REC-json-ld-20140116/#the-context">JSON-LD context</a>
defines how to understand identifiers in a JSON-LD document.
The <a href="context.json">ORE context</a> thus defines how to
interpret documents according to the <a href="#syntax">ORE
JSON-LD syntax</a> as defined above. This allows
these documents to be processed using <a
href="http://json-ld.org/#developers">JSON-LD tools</a>, for instance to
convert to other RDF formats.
</p>
<p>
The context is available from <a href="https://w3id.org/ore/context">https://w3id.org/ore/context</a>,
from where it SHOULD be included using the <code>@context</code>
keyword at the top-level node of ORE JSON-LD documents:
</p>
<pre>
{ <strong>"@context": "https://w3id.org/ore/context"</strong>,
"@type": "ResourceMap",
"...": ""
}
</pre>
<section id="additional-contexts">
<h3>3.1 Additional contexts</h3>
<p>
In order to facilitate usage of additional RDF vocabularies,
one MAY instead specify
<a href="http://www.w3.org/TR/json-ld/#the-context"><code>@context</code></a>
as a JSON List which includes the
ORE context and additional contexts as either URIs or
JSON objects:
</p>
<pre>
{ "@context": [
"https://w3id.org/ore/context",
<strong>"http://example.com/other/context",
{
"prov": "http://www.w3.org/ns/prov#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"prov:generatedAtTime": { "@type": "xsd:dateTime" }
}</strong>
],
"@type": "ResourceMap",
"...": ""
}
</pre>
</section>
<section id="context-content">
<h3>3.2 Content of ORE JSON-LD context</h3>
<!--
<div class="draft">
An alternative context is available at
<a href="https://w3id.org/ore/context-ore">https://w3id.org/ore/context-ore</a>,
which defines ORE terms with the <code>ore:</code> prefix. This context MAY be used instead,
for instance to avoid naming conflicts when including the ORE context in another JSON-LD context.
</div>
-->
<p>
The content of the <a href="context.json">ORE JSON-LD context</a> at time of writing is:
</p>
<pre class="draft">
{
"@context" : {
"Proxy" : {
"@id" : "http://www.openarchives.org/ore/terms/Proxy"
},
"proxyFor" : {
"@id" : "http://www.openarchives.org/ore/terms/proxyFor",
"@type" : "@id"
},
"lineage" : {
"@id" : "http://www.openarchives.org/ore/terms/lineage",
"@type" : "@id"
},
"describes" : {
"@id" : "http://www.openarchives.org/ore/terms/describes",
"@type" : "@id"
},
"AggregatedResource" : {
"@id" : "http://www.openarchives.org/ore/terms/AggregatedResource"
},
"ResourceMap" : {
"@id" : "http://www.openarchives.org/ore/terms/ResourceMap"
},
"similarTo" : {
"@id" : "http://www.openarchives.org/ore/terms/similarTo",
"@type" : "@id"
},
"Aggregation" : {
"@id" : "http://www.openarchives.org/ore/terms/Aggregation"
},
"isAggregatedBy" : {
"@id" : "http://www.openarchives.org/ore/terms/isAggregatedBy",
"@type" : "@id"
},
"proxyIn" : {
"@id" : "http://www.openarchives.org/ore/terms/proxyIn",
"@type" : "@id"
},
"aggregates" : {
"@id" : "http://www.openarchives.org/ore/terms/aggregates",
"@type" : "@id"
},
"isDescribedBy" : {
"@id" : "http://www.openarchives.org/ore/terms/isDescribedBy",
"@type" : "@id"
},
"proxies": {
"@reverse" : "http://www.openarchives.org/ore/terms/proxyIn"
}
}
}
</pre>
</section>
</section>
<section id="complete-example">
<h2>4. Complete example</h2>
<p>
The following complete example shows a <em>ResourceMap</em> describing <code>aggregation-1</code>
containing 4 resources (<code>document-1</code>,
<code>data-2</code>, <code>aggregation-3</code> and
a <em>proxy for document-1 within aggregation-3</em>). <code>data-2</code> is also
known to be aggregated by <code>aggregation-2</code>.
</p>
<p>
The aggregated resource <code>aggregation-3</code> is itself an aggregation
with its own resource maps and proxies, but they are not detailed fully here (except
for the aggregated external proxy <code>urn:uuid:095612..</code>).
</p>
<p>
Finally our aggregation has its own set of
identified <code>proxies</code>, one for each aggregated resource.
Here, the lineage of
<code>data-2</code>'s aggregation is shown to be originating from
<code>aggregation-2</code>.
</p>
<section id="example-jsonld">
<h3>4.1 Example JSON-LD</h3>
<pre>
{ "@context": "https://w3id.org/ore/context",
"@id": "",
"@type": "ResourceMap",
"describes": {
"@id": "http://example.com/aggregation-1",
"@type": "Aggregation",
"isDescribedBy": [
"http://example.com/aggregation-1.rdf",
"http://example.com/aggregation-1.jsonld"
],
"aggregates": [
"http://example.com/document-1",
{ "@id": "http://other.example.org/data-2",
"isAggregatedBy": {
"@id": "http://other.example.org/aggregation-2",
"@type": "Aggregation",
"isDescribedBy": "http://other.example.org/aggregation-2.rdf"
}
},
{ "@id": "http://other.example.org/aggregation-3",
"@type": "Aggregation",
"isDescribedBy": [ "http://other.example.org/aggregation-3.rdf",
"http://other.example.org/aggregation-3.jsonld" ]
},
{ "@id": "urn:uuid:09561248-bf55-4c85-930a-9a7a60e81602",
"@type": "Proxy",
"proxyFor": "http://example.com/document-1",
"proxyIn": "http://other.example.org/aggregation-3"
}
],
"proxies": [
{ "@id": "urn:uuid:d4e63599-d28d-4966-8606-dbb985a865f2",
"@type": "Proxy",
"proxyFor": "http://example.com/document-1"
},
{ "@id": "urn:uuid:05bd5e0c-94c7-4856-a53f-7f6cf0756751",