Overview.html
75.3 KB
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>API for Media Resource 1.0</title>
<style type="text/css">
/**/
code { font-family: monospace; }
div.constraint,
div.issue,
div.note,
div.notice { margin-left: 2em; }
ol.enumar { list-style-type: decimal; }
ol.enumla { list-style-type: lower-alpha; }
ol.enumlr { list-style-type: lower-roman; }
ol.enumua { list-style-type: upper-alpha; }
ol.enumur { list-style-type: upper-roman; }
dt.label { display: run-in; }
li, p { margin-top: 0.3em;
margin-bottom: 0.3em; }
.diff-chg { background-color: yellow; }
.diff-del { background-color: red; text-decoration: line-through;}
.diff-add { background-color: lime; }
table { empty-cells: show; }
table caption {
font-weight: normal;
font-style: italic;
text-align: left;
margin-bottom: .5em;
}
div.issue {
color: red;
}
.rfc2119 {
font-variant: small-caps;
}
div.exampleInner pre { margin-left: 1em;
margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
margin: 0em; padding: 0em}
div.exampleInner { background-color: #d5dee3;
border-top-width: 4px;
border-top-style: double;
border-top-color: #d3d3d3;
border-bottom-width: 4px;
border-bottom-style: double;
border-bottom-color: #d3d3d3;
padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
margin: 4px}
div.boxedtext {
border: solid #bebebe 1px;
margin: 2em 1em 1em 2em;
}
span.practicelab {
margin: 1.5em 0.5em 1em 1em;
font-weight: bold;
font-style: italic;
}
span.practicelab { background: #dfffff; }
span.practicelab {
position: relative;
padding: 0 0.5em;
top: -1.5em;
}
p.practice
{
margin: 1.5em 0.5em 1em 1em;
}
@media screen {
p.practice {
position: relative;
top: -2em;
padding: 0;
margin: 1.5em 0.5em -1em 1em;
}
}
/**/ </style>
<link rel="stylesheet" type="text/css"
href="http://www.w3.org/StyleSheets/TR/W3C-WD.css" />
</head>
<body>
<div class="head">
<p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home"
alt="W3C" height="48" width="72" /></a></p>
<h1><a name="d3e4" id="d3e4"></a>API for Media Resource 1.0</h1>
<h2><a name="w3c-doctype" id="w3c-doctype"></a><a name="w3c-doctype1"
id="w3c-doctype1"></a>W3C Working Draft 09 March 2010</h2>
<dl>
<dt>This version:</dt>
<dd><a
href="http://www.w3.org/TR/2010/WD-mediaont-api-1.0-20100309">http://www.w3.org/TR/2010/WD-mediaont-api-1.0-20100309</a></dd>
<dt>Latest version:</dt>
<dd><a
href="http://www.w3.org/TR/mediaont-api-1.0">http://www.w3.org/TR/mediaont-api-1.0</a></dd>
<dt>Previous version:</dt>
<dd><a
href="http://www.w3.org/TR/2009/WD-mediaont-api-1.0-20091020">http://www.w3.org/TR/2009/WD-mediaont-api-1.0-20091020</a></dd>
<dt>Editors:</dt>
<dd>이원석(WonSuk Lee), Electronics and Telecommunications Research
Institute (ETRI)</dd>
<dd>Florian Stegmaier, University of Passau</dd>
<dd>Chris Poppe, Ghent University</dd>
</dl>
<p class="copyright"><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2010 <a
href="http://www.w3.org/"><acronym
title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a
href="http://www.csail.mit.edu/"><acronym
title="Massachusetts Institute of Technology">MIT</acronym></a>, <a
href="http://www.ercim.org/"><acronym
title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a
href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document
use</a> rules apply.</p>
</div>
<hr />
<div>
<h2><a name="abstract" id="abstract"></a>Abstract</h2>
<p>This specification defines a client-side API to access metadata information
related to media resources on the Web. The overall purpose of the API is to
provide developers with a convenient access to metadata information stored in
different metadata formats. The API will be introduced in an abstract manner
using the interface definition language Web IDL. Thereby, the Media Ontology
Core Properties will be used as a pivot vocabulary in the API.</p>
</div>
<div>
<h2><a name="status" id="status"></a>Status of this Document</h2>
<p>This section describes the status of this document at the time of its
publication. Other documents may supersede this document. A list of current W3C
publications and the latest revision of this technical report can be found in
the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at
http://www.w3.org/TR/.</p>
<p>This is the <a
href="http://www.w3.org/2005/10/Process-20051014/tr.html#first-wd">second
Working Draft</a> of the API for Media Resource 1.0 specification. It has been
produced by the <a href="http://www.w3.org/2008/WebVideo/Annotations/">Media
Annotations Working Group</a>, which is part of the <a
href="http://www.w3.org/2008/WebVideo/">W3C Video on the Web Activity</a>.</p>
<p>Please send comments about this document to <a
href="mailto:public-media-annotation@w3.org">public-media-annotation@w3.org</a>
mailing list (<a
href="http://lists.w3.org/Archives/Public/public-media-annotation/">public
archive</a>).</p>
<p>Publication as a Working Draft does not imply endorsement by the W3C
Membership. This is a draft document and may be updated, replaced or obsoleted
by other documents at any time. It is inappropriate to cite this document as
other than work in progress. </p>
<p>This document was produced by a group operating under the <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C
Patent Policy</a>. W3C maintains a <a
href="http://www.w3.org/2004/01/pp-impl/42786/status">public list of any patent
disclosures</a> made in connection with the deliverables of the group; that
page also includes instructions for disclosing a patent. An individual who has
actual knowledge of a patent which the individual believes contains <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
Claim(s)</a> must disclose the information in accordance with <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
6 of the W3C Patent Policy</a>.</p>
<p></p>
</div>
<div class="toc">
<h2><a name="contents" id="contents"></a>Table of Contents</h2>
<p class="toc">1 <a href="#introduction">Introduction</a><br />
1.1 <a href="#formats-in-scope">Formats in scope</a><br />
1.2 <a href="#formats-out-of-scope">Formats out of scope</a><br />
1.3 <a href="#terminology">Terminology</a><br />
2 <a href="#api-description">API Description</a><br />
2.1 <a href="#design-consideration">Design consideration</a><br />
2.2 <a href="#api-for-identifying-media-resource">API for identifying
the media resource and metadata</a><br />
2.3 <a href="#api-for-accessing-properties">API for accessing
properties</a><br />
2.3.1 <a href="#id-properties">Identification Properties</a><br
/>
2.3.1.1 <a href="#identifier">Identifier</a><br />
2.3.1.2 <a href="#title">Title</a><br />
2.3.1.3 <a href="#language">Language </a><br />
2.3.1.4 <a href="#locator">Locator</a><br />
2.3.2 <a href="#creation-properties">Creation Properties</a><br
/>
2.3.2.1 <a href="#contributors">Contributor</a><br />
2.3.2.2 <a href="#creator">Creator</a><br />
2.3.2.3 <a href="#createDate">CreateDate</a><br />
2.3.2.4 <a href="#location">Location</a><br />
2.3.3 <a href="#content-properties">Content Properties</a><br />
2.3.3.1 <a href="#description">Description</a><br />
2.3.3.2 <a href="#keyword">Keyword</a><br />
2.3.3.3 <a href="#genre">Genre</a><br />
2.3.3.4 <a href="#rating">Rating</a><br />
2.3.4 <a href="#relational-properties">Relational
Properties</a><br />
2.3.4.1 <a href="#relation">Relation</a><br />
2.3.4.2 <a href="#collection">Collection</a><br />
2.3.5 <a href="#rights-properties">Rights Properties</a><br />
2.3.5.1 <a href="#copyright">Copyright</a><br />
2.3.5.2 <a href="#policy">Policy</a><br />
2.3.6 <a href="#distribution-properties">Distribution
Properties</a><br />
2.3.6.1 <a href="#publisher">Publisher</a><br />
2.3.6.2 <a href="#targetaudience">TargetAudience</a><br
/>
2.3.7 <a href="#fragments-properties">Fragments
Properties</a><br />
2.3.7.1 <a href="#fragments">Fragments</a><br />
2.3.7.2 <a href="#namedfragments">NamedFragments</a><br
/>
2.3.8 <a href="#technical-properties">API for Technical
Properties</a><br />
2.3.8.1 <a href="#framesize">FrameSize</a><br />
2.3.8.2 <a href="#compression">Compression</a><br />
2.3.8.3 <a href="#duration">Duration</a><br />
2.3.8.4 <a href="#format">Format</a><br />
2.3.8.5 <a href="#samplingrate">Samplingrate</a><br />
2.3.8.6 <a href="#framerate">Framerate</a><br />
2.3.8.7 <a href="#bitrate">Bitrate</a><br />
2.3.8.8 <a href="#numtracks">NumTracks</a><br />
2.4 <a href="#api-for-diagnosis">API for retrieval of reason of an
error</a><br />
2.5 <a href="#api-for-iterating-operation">API for iterating</a><br />
2.5.1 <a
href="#getPropertyNamesWithValues">getPropertyNamesWithValues</a><br />
2.5.2 <a
href="#getSourceFormatsWithValues">getSourceFormatsWithValues</a><br />
2.5.3 <a href="#getOriginalData">getOriginalData</a><br />
3 <a href="#examples">Examples of how to use the API</a><br />
4 <a href="#security">Security Considerations</a><br />
</p>
<h3><a name="appendices" id="appendices"></a>Appendices</h3>
<p class="toc">A <a href="#webidl-for-api">Web IDL description for API</a><br />
B <a href="#normative-references">References(Normative)</a><br />
C <a href="#non-normative-references">References(Non-Normative)</a><br />
D <a href="#acknowledgments">Acknowledgements</a> (Non-Normative)<br />
</p>
</div>
<hr />
<div class="body">
<div class="div1">
<h2><a name="introduction" id="introduction"></a>1 Introduction</h2>
<p><em>This section is informative.</em></p>
<table border="1" summary="Editorial note">
<tbody>
<tr>
<td align="left" valign="top" width="50%"><b>Editorial note</b></td>
<td align="right" valign="top" width="50%"> </td>
</tr>
<tr>
<td colspan="2" align="left" valign="top">This part will be elaborated in
the perspectives of reason why we want to provide an API and an
explanation on who should use/implement it.</td>
</tr>
</tbody>
</table>
<p>This specification defines a client-side API to access metadata information
related to media resources on the Web. The overall purpose of the API is to
provide developers with a convenient access to metadata information stored in
different metadata formats. Thereby, the <a
href="http://www.w3.org/TR/mediaont-10/#core-property-definitions">Media
Ontology Core Properties</a> will be used as a pivot vocabulary in the API. The
description of relations between these core properties and the metadata formats
in scope (<a href="#formats-in-scope"><b>1.1 Formats in scope</b></a>) are
stored in the Media Ontology in order to provide cross-community data
integration. The API will be introduced in an abstract manner using the
interface definition language <cite><a href="#webidl">Web IDL</a></cite>. The
decision to use Web IDL, which offers bindings for ECMAScript and Java, can be
based on the <a href="http://www.w3.org/TR/media-annot-reqs/">Use Cases and
Requirements for Ontology and API for Media Object 1.0</a>. This document
clearly states that the focus for this API lies on multimedia services on the
Web.</p>
<p>The API serves as a mediator between a developer and the underlying <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resource 1.0</a>
with the goal to support interoperability between metadata formats. It offers
GET operations to retrieve particular metadata informations represented in a
certain metadata format related to media ressources on the Web.</p>
<p>The initial version of this document contains only a limited description of
API. In addtion, there are many open issues including definitions of return
types. Nevertheless it is being published with the aspiration to gather wide
feedback on the yet available API design.</p>
<div class="div2">
<h3><a name="formats-in-scope" id="formats-in-scope"></a>1.1 Formats in
scope</h3>
<p>Refers to the <a
href="http://www.w3.org/TR/mediaont-10/#formats-in-scope">formats in scope</a>
of <a href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resource
1.0</a>.</p>
</div>
<div class="div2">
<h3><a name="formats-out-of-scope" id="formats-out-of-scope"></a>1.2 Formats
out of scope</h3>
<p>Refers to the <a
href="http://www.w3.org/TR/mediaont-10/#formats-out-of-scope">Formats out of
scope</a> of <a href="http://www.w3.org/TR/mediaont-10/">Ontology for Media
Resource 1.0</a>.</p>
</div>
<div class="div2">
<h3><a name="terminology" id="terminology"></a>1.3 Terminology</h3>
<p>In this document the terms "Media Resource", "Property", "Mapping" and
"Property value type" are to be interpreted as defined in <a
href="http://www.w3.org/TR/mediaont-10/#Terminology">Section 2 of Ontology for
Media Resource 1.0</a>.</p>
</div>
</div>
<div class="div1">
<h2><a name="api-description" id="api-description"></a>2 API Description</h2>
<table border="1" summary="Editorial note">
<tbody>
<tr>
<td align="left" valign="top" width="50%"><b>Editorial note</b></td>
<td align="right" valign="top" width="50%"> </td>
</tr>
<tr>
<td colspan="2" align="left" valign="top">There are many open issues
about SET interfaces, so these issues will be covered later.</td>
</tr>
</tbody>
</table>
<div class="div2">
<h3><a name="design-consideration" id="design-consideration"></a>2.1 Design
consideration</h3>
<p>This part defines the interface for accessing the metadata. The API has been
described using <cite><a href="#webidl">Web IDL</a></cite>. All properties can
be accessed through a specific operation, encapsulated in the
<code>MediaResource</code> interface within the <code>mawg</code> module.
Currently, only read access is defined. When an attempt to read a property
fails, diagnostics information can be obtained using a diagnosis operation.
Certain properties have complex structures so the return type consists of one
or more <code>object</code> types. The structure of these objects is still to
be defined, currently these follow different interfaces which have been defined
in the <code>returnValues</code> module.</p>
<p>Note that, some of these interfaces inherit from the <code>MAObject</code>
interface and the <code>Language</code> interface. </p>
<dl>
<dt class="label">Web IDL syntax:</dt>
<dd>
<div class="exampleInner">
<pre>
interface MAObject {
attribute DOMString unstructuredValue;
attribute DOMString uri;
attribute DOMString sourceFormat;
attribute DOMString fragmentIdentifier;
attribute DOMString mappingType;
};
interface Language {
attribute DOMString language;
};
</pre>
</div>
</dd>
<dt class="label">Description:</dt>
<dd><p>The <code>MAObject</code> interface has an attribute
<code>unstructeredValue</code> using <code>DOMString</code>. If it is not
clear how a certain value for a property should be structured, this
attribute allows to describe the value in plain text. A <code>uri</code>
attribute is provided which should hold an URI. This can for example be
used to represent labels as uri's. A <code>language</code> attribute
allows to specify the language of the returned property. The
<code>sourceFormat</code> attribute allows to specify the metadata source
from which the metadata was retrieved. The
<code>fragmentIdentifier</code> attribute determins the fragment for
which the metadata is relevant. Lastly, the <code>mappingType</code>
attribute specifies the kind of mapping as discussed in <a
href="http://www.w3.org/TR/mediaont-10/#semantic-level-mappings">the
semantic level mappings</a>. </p>
<p>The <code>Language</code> interface includes an attribute
<code>language</code> that holds the language of the metadata.</p>
</dd>
</dl>
<p>We consider two scenarios where the API could be implemented: either in the
user agent (scenario 1) or as a web service (scenario 2). The two scenarios are
shown in the figure. </p>
<dl>
<dt class="label">Scenario 1: User agent</dt>
<dd><p>The API is implemented in the user agent (e.g., browser or browser
plugin) and exposed as a JavaScript API (using the WebIDL JavaScript
binding). The user agent includes the components for metadata access
(possibly extraction) and mappings for a supported set of formats. The
metadata sources (the media resource and/or metadata document(s)) must be
retrievable and access (establish connection, retrieval) of the metadata
sources is handled by the user agent.</p>
</dd>
<dt class="label">Scenario 2: Web service</dt>
<dd><p>The API is implemented as a Web service. Such an implementation
would be typically used by a non-UI client, such as an agent harvesting
metadata. However, the API could be also accessed from a user agent, and
used the same way as described in scenario 1 by the help of a JavaScript
library for accessing the web service. At the back-end of the web
service, this scenario also allows supporting a media repository (e.g.
content provider's archive database, movie store) from which the user
agent could directly retrieve metadata sources and which might have a
custom metadata format not supported by a user agent. In contrast to an
integrated component (see scenario 1), an implementation of the API in a
web service could do more complex mappings on the fly as a component
integrated in a user agent, and can be more flexible (e.g., supporting
additional formats). </p>
</dd>
</dl>
<p><img src="API_options.png" alt="Overview of different API options." /></p>
<p>In both scenarios, the access to the metadata properties needs the following
stack of components:</p>
<ul>
<li><p>An implementation of the API for Media Resource (as defined in this
document), which providers the actual getter methods for the properties.</p>
</li>
<li><p>An implementation of the mappings from a specific source format to the
properties of the media ontology (as defined in Ontology for Media Resource
1.0).</p>
</li>
<li><p>A format specific API to access the metadata. This is can be an API
for accessing a metadata document describing a media resource (e.g. an XML
parser and a set of XPath statements) or an extractor the read metadata
embedded in the media resource (e.g. a library to read EXIF information
from JPEG images). In order to define the context on which the API for
Media Resource is working (cf. Section 2.2), it is assumed that there is at
least a unidirectional reference from the media resource to the metadata
document or vice versa. If this is not the case such a reference needs to
be provided by the web application (scenario 1), web service (scenario 2)
or media repository (scenario 2).</p>
</li>
</ul>
</div>
<div class="div2">
<h3><a name="api-for-identifying-media-resource"
id="api-for-identifying-media-resource"></a>2.2 API for identifying the media
resource and metadata</h3>
<p>This part defines part of the interface for identifying the Media Resource
for which the API will grant access to. One general operation is defined that
allows access to the properties. The specific property is passed as an argument
and a list of objects is returned that hold the values according to the
requested property. Depending on the requested property, the returned objects
follow a different interface. These are listed in the following sections. </p>
<dl>
<dt class="label">Web IDL syntax:</dt>
<dd>
<div class="exampleInner">
<pre> boolean setContext(in DOMString mediaResource, in optional Object[] metadataSources );</pre>
</div>
</dd>
<dt class="label">Description:</dt>
<dd><p>The <code>setContext</code> operation allows to set the specific
Media Resource and metadata sources for which the API applies. The
<code>mediaResource</code> argument identifies the Media Resource. The
implementation of the API should try to find relevant metadata sources
for this Media Resource. Additionally, the <code>metadataSources</code>
argument allows to identify other metadata sources which should be
included by the API. This argument is an array of objects, each
implementing the <code>MetadataSource</code> interface. This interface
holds an uri identifying the metadata source
(<code>metadataSource</code>) and the name of the actual metadata format
(<code>sourceFormat</code>). The return value of the operation is a
boolean stating whether the Media Resource and metadata sources were
succesfully loaded. </p>
<div class="exampleInner">
<pre> interface MetadataSource {
attribute DOMString metadataSource;
attribute DOMString sourceFormat;
};
</pre>
</div>
</dd>
<dt class="label">Return type:</dt>
<dd><p>A boolean stating whether the Media Resource and metadata resources
could be identified.</p>
</dd>
</dl>
</div>
<div class="div2">
<h3><a name="api-for-accessing-properties"
id="api-for-accessing-properties"></a>2.3 API for accessing properties</h3>
<p>This part defines part of the interface for accessing the metadata that
describes a Media Resource. One general operation is defined that allows access
to the properties. The specific property is passed as an argument and a list of
objects is returned that hold the values according to the requested property.
Depending on the requested property, the returned objects follow a different
interface. These are listed in the following sections. </p>
<dl>
<dt class="label">Web IDL syntax:</dt>
<dd>
<div class="exampleInner">
<pre>MAObject[] getProperty(in DOMString propertyName, in optional DOMString sourceFormat, in optional DOMString subtype,
in optional DOMString language, in optional DOMString fragment );</pre>
</div>
</dd>
<dt class="label">Description:</dt>
<dd><p>The <code>getProperty</code> operation allows to retrieve the value
of a certain property. The <code>propertyName</code> argument identifies
the property for which the values need to be retrieved. Optional
arguments allow to refine the request. The <code>sourceFormat</code>
identifies a specific metadata format. If a metadata format is defined,
only the metadata available in the corresponding metadata format are
retrieved. The <code>subtype</code> argument identifies a subtype. Some
properties can be filtered on subtypes. The <code>language</code>
argument allows to identify the language of the metadata. Only if the
metadata is available in the specified language, the values are returned.
Finally, the <code>fragment</code> argument allows to identify the
specific media fragment for which the metadata is requested.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>MAObjects</code> that hold the values of the
requested property.Depending on the requested property, these objects
implement a different interface. The next sections list the different
properties and the returned objects.</p>
</dd>
</dl>
<div class="div3">
<h4><a name="id-properties" id="id-properties"></a>2.3.1 Identification
Properties</h4>
<div class="div4">
<h5><a name="identifier" id="identifier"></a>2.3.1.1 Identifier</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>identifier</code> property identifies a resource. </p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>StringObject</code> interface. The <code>value</code> attribute
should represent a URI identifying the resource, the <code>type</code>
attribute holds the type of the identifier, which can be filtered on in
the <code>getProperty</code> operation. Possible values are " UMID" and
"ISAN". </p>
<div class="exampleInner">
<pre>interface Identifier: MAObject {
attribute DOMString value;
attribute DOMString type;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["http://www.w3.org/2008/WebVideo/Annotations/wiki/Image:MAWG-Stockholm-20090626.JPG"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=identifier</p>
</li>
<li><p>Response (JSON format): "identifier" :
["http://www.w3.org/2008/WebVideo/Annotations/wiki/Image:MAWG-Stockholm-20090626.JPG"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="title" id="title"></a>2.3.1.2 Title</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>title</code> property defines the title of the document,
or the name given to the resource.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>Title</code> interface. The <code>value</code> attribute should
hold the title as a plain string. Additionally, a <code>type</code>
describes the type of the title, which can be filtered on in the
<code>getProperty</code> operation. Possibilities for this are "Album
title" and "Song title".</p>
<div class="exampleInner">
<pre>interface Title: MAObject, Language {
attribute DOMString value;
attribute DOMString type;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["MAWG Stockholm 20090626",""]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=title</p>
</li>
<li><p>Response (JSON format): "title" : ["MAWG Stockholm 20090626"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="language" id="language"></a>2.3.1.3 Language </h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>language</code> property specifies a language used in the
entity, Recommended best practice is to use BCP 47 [<cite><a
href="#bcp47">BCP 47</a></cite>]. </p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>StringObject</code> interface. The <code>value</code> attribute
should represent the language as a plain string.</p>
<div class="exampleInner">
<pre>interface StringObject: MAObject {
attribute DOMString value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["en-us"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=language</p>
</li>
<li><p>Response (JSON format): "language" : ["en-us"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="locator" id="locator"></a>2.3.1.4 Locator</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>locator</code> property holds a URI at which the entity
can be accessed (e.g. a URL, or a DVB URI).</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>StringObject</code> interface. The <code>value</code> attribute
should hold the URI.</p>
<div class="exampleInner">
<pre>interface StringObject: MAObject {
attribute DOMString value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["http://www.w3.org/2008/WebVideo/Annotations/wiki/images/9/93/MAWG-Stockholm-20090626.JPG"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=locator</p>
</li>
<li><p>Response (JSON format): "locator" :
["http://www.w3.org/2008/WebVideo/Annotations/wiki/images/9/93/MAWG-Stockholm-20090626.JPG"]</p>
</li>
</ul>
</div>
</div>
<div class="div3">
<h4><a name="creation-properties" id="creation-properties"></a>2.3.2 Creation
Properties</h4>
<div class="div4">
<h5><a name="contributors" id="contributors"></a>2.3.2.1 Contributor</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>contributor</code> property holds a pair identifying the
contributors and the nature of the contribution. E.g. actor, cameraman,
director, singer, author, artist (Note: subject see addition of
contributors type) identifies a resource.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>Contributor</code> interface. This object has an attribute
<code>id</code> which identifies the contributor. Additionally, the
<code>role</code> attribute defines the role, which can be filtered on in
the <code>getProperty</code> operation. For the latter a number of
suggested terms are defined: </p>
<ul>
<li><p>editor (EBU 11.1)</p>
</li>
<li><p>actor (EBU 25.9)</p>
</li>
<li><p>composer</p>
</li>
<li><p>featured_in</p>
</li>
<li><p>cinematographer</p>
</li>
<li><p>director</p>
</li>
<li><p>musicproducer</p>
</li>
<li><p>producer</p>
</li>
<li><p>screenplayer</p>
</li>
<li><p>writer</p>
</li>
<li><p>distributor (company)</p>
</li>
<li><p>production company</p>
</li>
</ul>
<div class="exampleInner">
<pre>interface Contributor: MAObject {
attribute DOMString id;
attribute DOMString role;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["http://individuals.example.com/Contributor1", "editor"],
["http://individuals.example.com/Contributor2", "producer"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=contributors</p>
</li>
<li><p>Response (JSON format): "contributors" : ["editor (EBU 11.1)", "actor
(EBU 25.9)", "composer", "featured_in", "cinematographer", "director",
"musicproducer", "producer", "screenplayer", "writer", "distributor
(company)", "production company"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="creator" id="creator"></a>2.3.2.2 Creator</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>creator</code> property holds the authors of the resource
(listed in order of precedence, if significant).</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>StringObject</code> interface. The <code>value</code> attribute
should hold an identifier for an author.</p>
<div class="exampleInner">
<pre>interface StringObject: MAObject {
attribute DOMString value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["http://individuals.example.com/Author1",
"http://individuals.example.com/Author2"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=creator</p>
</li>
<li><p>Response (JSON format): "creator" :
["http://individuals.example.com/Author1",
"http://individuals.example.com/Author2"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="createDate" id="createDate"></a>2.3.2.3 CreateDate</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>createDate</code> property holds the date and time the
entity was originally created. (for commercial purpose there might be an
annotation of publication date). </p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>Date</code> interface. The exact format of the <code>date</code>
attribute is currently undefined. It should hold a <code>type</code>
attribute defining the specific type of creation, which can be filtered
on in the <code>getProperty</code> operation. Possibilities are "Create
Date" and "Publish Date".</p>
<div class="exampleInner">
<pre>interface Date: MAObject {
attribute DOMString date;
attribute DOMString type;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>[2009-06-26T15:30:00]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=createDate</p>
</li>
<li><p>Response (JSON format): "createDate" : ["2009-06-26T15:30:00"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="location" id="location"></a>2.3.2.4 Location</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>location</code> property holds the location where the
resource has been shot/recorded.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>Location</code> interface. The <code>name</code> attribute holds a
free text name of the location. The <code>longitude</code>,
<code>latitude</code>, and <code>altitude</code> determin the spatial
coordinates according to the system defined in <code>system</code>.</p>
<div class="exampleInner">
<pre>interface Location: MAObject, Language {
attribute DOMString name;
attribute Float longitude;
attribute Float latitude;
attribute Float altitude;
attribute DOMString system;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["San Jose", 37.33986481118008, -121.88507080078125, 0, "GPS"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=location</p>
</li>
<li><p>Response (JSON format): "location" : ["San Jose", 37.33986481118008,
-121.88507080078125, 0, "GPS"]</p>
</li>
</ul>
</div>
</div>
<div class="div3">
<h4><a name="content-properties" id="content-properties"></a>2.3.3 Content
Properties</h4>
<div class="div4">
<h5><a name="description" id="description"></a>2.3.3.1 Description</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>description</code> property holds a textual description of
the content of the resource.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>StringObject</code> interface. The <code>value</code> attribute
should hold a description of the content of the media resource.</p>
<div class="exampleInner">
<pre>interface StringObject: MAObject, Language {
attribute DOMString value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["Group picture of the W3C Media Annotations WG at the face-to-face
meeting in Stockholm."]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=description</p>
</li>
<li><p>Response (JSON format): "description" : ["Group picture of the W3C
Media Annotations WG at the face-to-face meeting in Stockholm."]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="keyword" id="keyword"></a>2.3.3.2 Keyword</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>keyword</code> property represents a keyword that
specifies the topic of the content of the resource.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>StringObject</code> interface. The <code>value</code> attribute
should hold one keyword.</p>
<div class="exampleInner">
<pre>interface StringObject: MAObject, Language {
attribute DOMString value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["W3C Media Annotations WG", "meeting", "group picture"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=keyword</p>
</li>
<li><p>Response (JSON format): "keyword" : ["W3C Media Annotations WG",
"meeting", "group picture"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="genre" id="genre"></a>2.3.3.3 Genre</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>genre</code> property describes the genre of the
entity.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>StringObject</code> interface. The <code>value</code> attribute
should represent the genre of the media resource.</p>
<div class="exampleInner">
<pre>interface StringObject: MAObject, Language {
attribute DOMString value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["Work"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=genre</p>
</li>
<li><p>Response (JSON format): "genre" : ["Work"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="rating" id="rating"></a>2.3.3.4 Rating</h5>
<table border="1" summary="Editorial note">
<tbody>
<tr>
<td align="left" valign="top" width="50%"><b>Editorial note</b></td>
<td align="right" valign="top" width="50%"> </td>
</tr>
<tr>
<td colspan="2" align="left" valign="top">It should be clarified about
what the 'context' of a rating is</td>
</tr>
</tbody>
</table>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>rating</code> property holds information to identify the
rating person or organization and the rating (real value). Additionally,
a minimum and maximum value can be given. Lastly, information on the
context of the rating is also included.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>Rating</code> interface. This object holds an attribute
<code>issuer</code> to identify the rating person or organization. Next,
the rating <code>value</code> can be represented, together with the
<code>minimum</code> and <code>maximum</code> rating values. These allow
to interpret the rating value. Lastly, a textual description of the
<code>context</code> can be given. A <code>type</code> attribute
determines the type of the rating, which can be filtered on in the
<code>getProperty</code> operation. Possibilities are "Review Rating",
"MPAA", "Personal Rating"</p>
<div class="exampleInner">
<pre>interface Rating: MAObject, Language {
attribute DOMString issuer;
attribute short value;
attribute short minimum;
attribute short maximum;
attribute DOMString type;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["http://individuals.example.com/ChrisPoppe", 10.0, 0, 10.0,
"Personal Rating"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=rating</p>
</li>
<li><p>Response (JSON format): "rating" :
["http://individuals.example.com/ChrisPoppe", 10.0, 0, 10.0, "Personal
Rating"]</p>
</li>
</ul>
</div>
</div>
<div class="div3">
<h4><a name="relational-properties" id="relational-properties"></a>2.3.4
Relational Properties</h4>
<div class="div4">
<h5><a name="relation" id="relation"></a>2.3.4.1 Relation</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>relation</code> property holds pairs identifying the
entities and the nature of the realtionships. E.g. transcript,
original_work.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>Relation</code> interface. This object holds an attribute
<code>id</code> to identify the entitiy. A textual description of the
relationship is represented using the <code>relationship</code>
attribute, which can be filtered on in the <code>getProperty</code>
operation. For the latter a number of suggested terms are defined:</p>
<ul>
<li><p>version of</p>
</li>
<li><p>reference</p>
</li>
<li><p>sound tracks</p>
</li>
<li><p>influenced by</p>
</li>
<li><p>re-edit</p>
</li>
<li><p>adapted_work</p>
</li>
<li><p>translated</p>
</li>
<li><p>interpretation</p>
</li>
<li><p>followed by</p>
</li>
<li><p>similar theme</p>
</li>
<li><p>similar touch</p>
</li>
<li><p>is similar to</p>
</li>
<li><p>nominated award</p>
</li>
<li><p>origin country</p>
</li>
</ul>
<div class="exampleInner">
<pre>interface Relation: MAObject {
attribute DOMString id;
attribute DOMString relationship;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["http://www.w3.org/2008/WebVideo/Annotations/wiki/Image:MAWG-Stockholm-20090626_thumb.JPG",
"re-edit"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=relation</p>
</li>
<li><p>Response (JSON format): "relation" :
["http://www.w3.org/2008/WebVideo/Annotations/wiki/Image:MAWG-Stockholm-20090626_thumb.JPG",
"re-edit"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="collection" id="collection"></a>2.3.4.2 Collection</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>collection</code> property holds a name of the collection
from wich the entities originates.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>StringObject</code> interface. The <code>value</code> attribute
should hold the name of the collection from which the media resource
originates.</p>
<div class="exampleInner">
<pre>interface StringObject: MAObject, Language {
attribute DOMString value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["My Work Pictures"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=collection</p>
</li>
<li><p>Response (JSON format): "collection" : ["My Work Pictures"]</p>
</li>
</ul>
</div>
</div>
<div class="div3">
<h4><a name="rights-properties" id="rights-properties"></a>2.3.5 Rights
Properties</h4>
<div class="div4">
<h5><a name="copyright" id="copyright"></a>2.3.5.1 Copyright</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>copyright</code> property holds the copyright statement
and an identification of the copyrights holder (DRM is out of scope for
MAWG).</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of<code>object</code> elements implementing the
<code>Copyright</code> interface. This object holds an attribute
<code>statement</code> that holds the copyright statement. An array of
<code>DOMString</code> elements is used to denote the copyright holders
and stored in attribute <code>holder</code>.</p>
<div class="exampleInner">
<pre>interface Copyright: MAObject, Language {
attribute DOMString statement;
attribute DOMString[] holder;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["All images in the collection are copyrighted by John Doe",
"http://individuals.example.com/JohnDoe"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=rights-properties</p>
</li>
<li><p>Response (JSON format): "rights-properties" : ["All images in the
collection are copyrighted by John Doe",
"http://individuals.example.com/JohnDoe]"</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="policy" id="policy"></a>2.3.5.2 Policy</h5>
<table border="1" summary="Editorial note">
<tbody>
<tr>
<td align="left" valign="top" width="50%"><b>Editorial note</b></td>
<td align="right" valign="top" width="50%"> </td>
</tr>
<tr>
<td colspan="2" align="left" valign="top">license/statement attribute: is
this really free text? </td>
</tr>
</tbody>
</table>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>policy</code> property holds a description of the
rights-related information regarding the media resource.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>Policy</code> interface. This object holds an attribute
<code>policy</code> that holds the description of the license. Attribute
<code>organization</code> identifies the organization that issued the
license. Lastly, the <code>type</code> holds the actual type of the
policy, which can be filtered on in the <code>getProperty</code>
operation. Current possibilities are "license", "access", and
"privacy".</p>
<div class="exampleInner">
<pre>interface Policy: MAObject, Language {
attribute DOMString policy;
attribute DOMString organization;
attribute DOMString type;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["Attribution 2.5 ",
"http://creativecommons.org/licenses/by/2.5"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=policy</p>
</li>
<li><p>Response (JSON format): "policy" : ["Attribution 2.5 ",
"http://creativecommons.org/licenses/by/2.5"]</p>
</li>
</ul>
</div>
</div>
<div class="div3">
<h4><a name="distribution-properties" id="distribution-properties"></a>2.3.6
Distribution Properties</h4>
<div class="div4">
<h5><a name="publisher" id="publisher"></a>2.3.6.1 Publisher</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>publisher</code> property holds identification of the
publisher of the entitiy. Examples of a Publisher include a person, an
organization, or a service. Typically, the name of a Publisher should be
used to indicate the entity.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>StringObject</code> interface. The <code>value</code> attribute
should represent the name of the publisher.</p>
<div class="exampleInner">
<pre> interface StringObject: MAObject, Language {
attribute DOMString value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["http://individuals.example.com/JohnDoe"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=publisher</p>
</li>
<li><p>Response (JSON format): "publisher" :
["http://individuals.example.com/JohnDoe"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="targetaudience" id="targetaudience"></a>2.3.6.2 TargetAudience</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>targetAudience</code> property holds a pair identifying
the issuer of the classification (agency) and the classification. E.g.
parental guide, targeted geographical region. Lastly, a <code>type</code>
attribute defines the type of the classification. Possible values are
"Age group" and "Geographical".</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>TargetAudience</code> interface. This object has an attribute
<code>issuer</code> which identifies the issuer of the classification.
Additionally, the <code>classification</code> attribute defines the
actual classification. Lastly, a <code>type</code> attribute determins
the type of the classification, which can be filtered on in the
<code>getProperty</code> operation. Possibilities include "Age group" and
"Geographical". </p>
<div class="exampleInner">
<pre>interface TargetAudience: MAObject, Language {
attribute DOMString issuer;
attribute DOMString classification;
attribute DOMString type;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["http://www.fosi.org/icra","no nudity", "Age Group"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=targetaudience</p>
</li>
<li><p>Response (JSON format): "targetaudience" :
["http://www.fosi.org/icra","no nudity", "Age Group"]</p>
</li>
</ul>
</div>
</div>
<div class="div3">
<h4><a name="fragments-properties" id="fragments-properties"></a>2.3.7
Fragments Properties</h4>
<div class="div4">
<h5><a name="fragments" id="fragments"></a>2.3.7.1 Fragments</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>fragments</code> property holds a list of pairs of
fragment role and fragment identifier (e.g. chapters, favourite
scenes).</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>Fragment</code> interface. This object holds an attribute
<code>role</code> that holds the role of the fragment. The attribute
<code>identifier</code> is used to identify the fragment.</p>
<div class="exampleInner">
<pre>interface Fragment: MAObject {
attribute DOMString role;
attribute DOMString identifier;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>[["Person",
"http://www.example.com/movie.mov#xywh=320,320,40,100"],</p>
<p>["Person", "http://www.example.com/movie.mov#xywh=300,350,40, 40"]]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=fragments</p>
</li>
<li><p>Response (JSON format): "fragments" : [["Person",
"http://www.example.com/movie.mov#xywh=320,320,40,100"],["Person",
"http://www.example.com/movie.mov#xywh=300,350,40, 40"]]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="namedfragments" id="namedfragments"></a>2.3.7.2 NamedFragments</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>namedFragments</code> property holds the list of named
fragments annotated for this resource (pairs of label and fragment
identifier).</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>NamedFragment</code> interface. This object holds an attribute
<code>name</code> with the name given to the fragment. The attribute
<code>identifier</code> is used to identify the fragment.</p>
<div class="exampleInner">
<pre>interface NamedFragment: MAObject {
attribute DOMString name;
attribute DOMString identifier;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>[["Joakim Söderberg",
"http://www.w3.org/2008/WebVideo/Annotations/wiki/Image:MAWG-Stockholm-20090626.JPG#xywh=1600,550,80,150]",</p>
<p>["Chris Poppe",
"http://www.w3.org/2008/WebVideo/Annotations/wiki/Image:MAWG-Stockholm-20090626.JPG#xywh=1400,600,80,
80]]"</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=namedFragments</p>
</li>
<li><p>Response (JSON format): "namedfragments" : [["Joakim Söderberg",
"http://www.w3.org/2008/WebVideo/Annotations/wiki/Image:MAWG-Stockholm-20090626.JPG#xywh=1600,550,80,150"],
["Chris Poppe",
"http://www.w3.org/2008/WebVideo/Annotations/wiki/Image:MAWG-Stockholm-20090626.JPG#xywh=1400,600,80,
80"]]</p>
</li>
</ul>
</div>
</div>
<div class="div3">
<h4><a name="technical-properties" id="technical-properties"></a>2.3.8 API for
Technical Properties</h4>
<p>This part defines the interfaces for accessing the technical metadata that
describe information for dealing with the creation or storage encoding
processes or formats of the resource.</p>
<div class="div4">
<h5><a name="framesize" id="framesize"></a>2.3.8.1 FrameSize</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>frameSize</code> property determines the frame size.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>FrameSize</code> interface. This object has an attribute
<code>width</code> and <code>height</code> to represent the width and
height of the frame, respectively.</p>
<div class="exampleInner">
<pre>interface FrameSize: MAObject {
attribute unsigned long width;
attribute unsigned long height;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>[3.072, 2.304]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=technical-properties</p>
</li>
<li><p>Response (JSON format): "technical-properties" : [3.072, 2.304]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="compression" id="compression"></a>2.3.8.2 Compression</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>compression</code> property holds the compression type
used. Note: it might be possible to use extended mime type, see RFC
4281.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>StringObject</code> interface. The <code>value</code> attribute
should hold the compression type as a plain string.</p>
<div class="exampleInner">
<pre> interface StringObject: MAObject, Language {
attribute DOMString value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>["H.264/AVC"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=compression</p>
</li>
<li><p>Response (JSON format): "compression" : ["H.264/AVC"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="duration" id="duration"></a>2.3.8.3 Duration</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>duration</code> property represents the duration of the
entitiy.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>FloatObject</code> interface. The <code>value</code> attribute
should represent the duration (in secs).</p>
<div class="exampleInner">
<pre>interface FloatObject: MAObject {
attribute unsigned long value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>[3600]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=duration</p>
</li>
<li><p>Response (JSON format): "duration" : [3600]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="format" id="format"></a>2.3.8.4 Format</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>format</code> property holds the MIME type of the entity
(wrapper, bucket media types).</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>StringObject</code> interface. The <code>value</code> attribute
should hold the MIME type as a plain string.</p>
<div class="exampleInner">
<pre> interface StringObject: MAObject, Language {
attribute DOMString value;
};
</pre>
</div>
<p>A <code>DOMString</code> representing the MIME type.</p>
</dd>
<dt class="label">Example:</dt>
<dd><p>["image/jpeg"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=format</p>
</li>
<li><p>Response (JSON format): "format" : ["image/jpeg"]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="samplingrate" id="samplingrate"></a>2.3.8.5 Samplingrate</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>samplingrate</code> property holds the samplingrate of an
audio file. Only applicable for audio.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>UnsignedLongObject</code> interface. The <code>value</code>
attribute should represent the samplingrate (in Hz).</p>
<div class="exampleInner">
<pre>interface UnsignedLongObject: MAObject {
attribute unsigned long value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>[100]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=samplingrate</p>
</li>
<li><p>Response (JSON format): "samplingrate" : [100]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="framerate" id="framerate"></a>2.3.8.6 Framerate</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>framerate</code> property holds the frame rate of the
video. Only applicable for video.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>FloatObject</code> interface. The <code>value</code> attribute
should represent the framerate (in fps).</p>
<div class="exampleInner">
<pre>interface FloatObject: MAObject {
attribute float value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>[30]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=framerate</p>
</li>
<li><p>Response (JSON format): "framerate" : [30]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="bitrate" id="bitrate"></a>2.3.8.7 Bitrate</h5>
<table border="1" summary="Editorial note">
<tbody>
<tr>
<td align="left" valign="top" width="50%"><b>Editorial note</b></td>
<td align="right" valign="top" width="50%"> </td>
</tr>
<tr>
<td colspan="2" align="left" valign="top">Should bitrate be a number?
What about Variable Bit Rate? Or would we raise NoValue in that
case?</td>
</tr>
</tbody>
</table>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>bitrate</code> property holds the average bitrate. Only
applicable for audio and video.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>FloatObject</code> interface. The <code>value</code> attribute
should represent the bitrate (in kbps).</p>
<div class="exampleInner">
<pre>interface FloatObject: MAObject {
attribute float value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>[100]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=bitrate</p>
</li>
<li><p>Response (JSON format): "bitrate" : [100]</p>
</li>
</ul>
</div>
<div class="div4">
<h5><a name="numtracks" id="numtracks"></a>2.3.8.8 NumTracks</h5>
<dl>
<dt class="label">Description:</dt>
<dd><p>The <code>numTracks</code> property holds the number of tracks.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>object</code> elements implementing the
<code>UnsignedShortObject</code> interface. The <code>value</code>
attribute should represent the number of tracks.</p>
<div class="exampleInner">
<pre>interface StringObject: MAObject {
attribute unsigned short value;
};
</pre>
</div>
</dd>
<dt class="label">Example:</dt>
<dd><p>[2]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=numtracks</p>
</li>
<li><p>Response (JSON format): "numtracks" : [2]</p>
</li>
</ul>
</div>
</div>
</div>
<div class="div2">
<h3><a name="api-for-diagnosis" id="api-for-diagnosis"></a>2.4 API for
retrieval of reason of an error</h3>
<p>This part defines part of the interface that allows to retrieve the reason
for an error. </p>
<dl>
<dt class="label">Web IDL syntax:</dt>
<dd>
<div class="exampleInner">
<pre> DOMString getDiagnosis();
</pre>
</div>
</dd>
<dt class="label">Description:</dt>
<dd><p>This operation allows to retrieve the reason for an error (e.g., the
<code>getProperty</code> operation returning a null value). </p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>A <code>DOMString</code> representing the reason for the last
error.</p>
</dd>
<dt class="label">Example:</dt>
<dd><p>["Property undefined for this media type."]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=numtracks&getDiagnosis=</p>
</li>
<li><p>Response (JSON format): "getDiagnosis" : ["Property undefined for this
media type."]</p>
</li>
</ul>
</div>
<div class="div2">
<h3><a name="api-for-iterating-operation"
id="api-for-iterating-operation"></a>2.5 API for iterating</h3>
<p>This part defines part of the interface for iterating over the available
metadata for a Media Resource. </p>
<div class="div3">
<h4><a name="getPropertyNamesWithValues"
id="getPropertyNamesWithValues"></a>2.5.1 getPropertyNamesWithValues</h4>
<dl>
<dt class="label">Web IDL syntax:</dt>
<dd>
<div class="exampleInner">
<pre> DOMString[] getPropertyNamesWithValues(in optional DOMString sourceFormat,
in optional DOMString language, in optional DOMString fragment);
</pre>
</div>
</dd>
<dt class="label">Description:</dt>
<dd><p>This operation allows to retrieve all property names for which
metadata is available. If this operation returns a property name, this
means that a call to the <code>getProperty</code> operation with the
corresponding property name will return at least one object.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>DOMStrings</code> representing the names of the
properties that will return values when accessed throug the
<code>getProperty</code> operation.</p>
</dd>
<dt class="label">Example:</dt>
<dd><p>["identifier", "title"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?getPropertyNamesWithValues=</p>
</li>
<li><p>Response (JSON format): "getPropertyNamesWithValues" : ["identifier",
"title"]</p>
</li>
</ul>
</div>
<div class="div3">
<h4><a name="getSourceFormatsWithValues"
id="getSourceFormatsWithValues"></a>2.5.2 getSourceFormatsWithValues</h4>
<dl>
<dt class="label">Web IDL syntax:</dt>
<dd>
<div class="exampleInner">
<pre> DOMString[] getSourceFormatsWithValues(in optional DOMString language);
</pre>
</div>
</dd>
<dt class="label">Description:</dt>
<dd><p>This operation allows to retrieve all source formats for which
metadata is available. If this operation returns a source format, this
means that a call to the <code>getProperty</code> operation with the
corresponding source format will return at least one object.</p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>DOMStrings</code> representing the names of the
source formats that will return values when accessed throug the
<code>getProperty</code> operation.</p>
</dd>
<dt class="label">Example:</dt>
<dd><p>["MPEG-7", "EXIF"]</p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?getSourceFormatsWithValues=</p>
</li>
<li><p>Response (JSON format): "getSourceFormatsWithValues" : ["MPEG-7",
"EXIF"]</p>
</li>
</ul>
</div>
<div class="div3">
<h4><a name="getOriginalData" id="getOriginalData"></a>2.5.3
getOriginalData</h4>
<dl>
<dt class="label">Web IDL syntax:</dt>
<dd>
<div class="exampleInner">
<pre> DOMString[] getOriginalData(in DOMString sourceFormat);
</pre>
</div>
</dd>
<dt class="label">Description:</dt>
<dd><p>This operation allows to retrieve the original metadata according to
the specified source format. </p>
</dd>
<dt class="label">Return type:</dt>
<dd><p>An array of <code>DOMStrings</code> that hold the original metadata.
Each DOMString corresponds to one metadata source. The type of the
metadata depends on the source format (e.g., XML for MPEG-7, binary code
for EXIF).</p>
</dd>
<dt class="label">Example:</dt>
<dd><p>["<?xml version="1.0"?> <metadata
xmlns="http://example.org/myapp/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://example.org/myapp/
http://example.org/myapp/schema.xsd"
xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:title>DC
title</dc:title></metadata>"] </p>
</dd>
</dl>
<p>Usage as a service:</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?getOriginalData=</p>
</li>
<li><p>Response (JSON format): "getOriginalData" : ["<?xml
version="1.0"?> <metadata xmlns="http://example.org/myapp/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://example.org/myapp/
http://example.org/myapp/schema.xsd"
xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:title>DC
title</dc:title></metadata>"]</p>
</li>
</ul>
</div>
</div>
</div>
<div class="div1">
<h2><a name="examples" id="examples"></a>3 Examples of how to use the API</h2>
<table border="1" summary="Editorial note">
<tbody>
<tr>
<td align="left" valign="top" width="50%"><b>Editorial note</b></td>
<td align="right" valign="top" width="50%"> </td>
</tr>
<tr>
<td colspan="2" align="left" valign="top">This part will illustrate how
to use the API in the actual (working) implementations</td>
</tr>
</tbody>
</table>
</div>
<div class="div1">
<h2><a name="security" id="security"></a>4 Security Considerations</h2>
<p><em>This section is informative.</em></p>
<table border="1" summary="Editorial note">
<tbody>
<tr>
<td align="left" valign="top" width="50%"><b>Editorial note</b></td>
<td align="right" valign="top" width="50%"> </td>
</tr>
<tr>
<td colspan="2" align="left" valign="top">It is required to be considered
in the perspectives of developer, user and content’s provider. This
will be revised with more security issues.</td>
</tr>
</tbody>
</table>
<p>This specification defines a client-side API to access metadata information
related to media resources on the Web. These APIs will provide the methods for
getting and setting metadata information which can be in one of different
formats, either as separate document or embedded in media resources. So far
concerning the setting method, there could be security consideration issues.</p>
<p>There are related activity and technical documents in W3C such as <cite><a
href="#policyReq">Policy Requirements</a></cite> in DAP WG, <cite><a
href="#odrl">ODRL 1.1</a></cite>, <cite><a href="#p3p">P3P 1.1</a></cite> and
<cite><a href="#pling">PLING Wiki</a></cite>.</p>
</div>
</div>
<div class="back">
<div class="div1">
<h2><a name="webidl-for-api" id="webidl-for-api"></a>A Web IDL description for
API</h2>
<div class="exampleInner">
<pre>module mawg {
interface MediaResource {
//Media Resource context
boolean setContext(in DOMString mediaResource, in optional Object[] metadataSources );
// Property Access
object[] getProperty(in DOMString propertyName, in optional DOMString sourceFormat, in optional DOMString subtype,
in optional DOMString language, in optional DOMString fragment );
//Iterating
DOMString[] getPropertyNamesWithValues(in optional DOMString sourceFormat,
in optional DOMString language, in optional DOMString fragment);
DOMString[] getSourceFormatsWithValues(in optional DOMString language);
DOMString getOriginalData(in DOMString sourceFormat);
//Operation for retrieval of the reason of an error
DOMString getDiagnosis();
};
interface MetadataSource {
attribute DOMString metadataSource;
attribute DOMString sourceFormat;
};
module returnValues {
interface MAObject {
attribute DOMString unstructuredValue;
attribute DOMString uri;
attribute DOMString sourceFormat;
attribute DOMString fragmentIdentifier;
attribute DOMString mappingType;
};
interface Language {
attribute DOMString language;
};
interface StringObject: MAObject, Language {
attribute DOMString value;
};
interface UnsignedLongObject: MAObject {
attribute unsigned long value;
};
interface UnsignedShortObject: MAObject {
attribute unsigned short value;
};
interface FloatObject: MAObject {
attribute float value;
};
interface Identifier: MAObject {
attribute DOMString value;
attribute DOMString type;
};
interface Title: MAObject, Language {
attribute DOMString value;
attribute DOMString type;
};
interface Contributor: MAObject {
attribute DOMString id;
attribute DOMString role;
};
interface Date: MAObject {
attribute DOMString date;
attribute DOMString type;
};
interface Location: MAObject, Language {
attribute DOMString name;
attribute Float longitude;
attribute Float latitude;
attribute Float altitiude;
attribute DOMString system;
};
interface Rating: MAObject, Language {
attribute DOMString issuer;
attribute short value;
attribute short minimum;
attribute short maximum;
attribute DOMString context;
attribute DOMString type;
};
interface Relation: MAObject, Language {
attribute DOMString id;
attribute DOMString relationship;
};
interface Copyright: MAObject, Language {
attribute DOMString statement;
attribute DOMString[] holder;
};
interface Policy: MAObject, Language {
attribute DOMString statement;
attribute DOMString organization;
attribute DOMString type;
};
interface TargetAudience: MAObject, Language {
attribute DOMString issuer;
attribute DOMString classification;
};
interface Fragment: MAObject, Language {
attribute DOMString role;
attribute DOMString identifier;
};
interface NamedFragment: MAObject, Language {
attribute DOMString name;
attribute DOMString identifier;
};
interface FrameSize: MAObject {
attribute unsigned long width;
attribute unsigned long height;
};
};
};
</pre>
</div>
</div>
<div class="div1">
<h2><a name="normative-references" id="normative-references"></a>B
References(Normative)</h2>
<dl>
<dt class="label"><a name="mediaontology"></a>[Ontology for Media Resource
1.0] </dt>
<dd><a href="http://www.w3.org/TR/mediaont-10/"><cite>Ontology for Media
Resource 1.0</cite></a>, WonSuk Lee, Tobias Bürger, Felix Sasaki,
Véronique Malaisé, Florian Stegmaier and Joakim Söderberg. W3C Working
Draft, 18 June 2009. Available at http://www.w3.org/TR/mediaont-10/ .
</dd>
</dl>
</div>
<div class="div1">
<h2><a name="non-normative-references" id="non-normative-references"></a>C
References(Non-Normative)</h2>
<dl>
<dt class="label"><a name="bcp47"></a>[BCP 47] </dt>
<dd><a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt"><cite>BCP 47
(Tags for Identifying Languages)</cite></a>, A. Phillips and M. Davis,
Editors. Available at http://www.rfc-editor.org/rfc/bcp/bcp47.txt. </dd>
<dt class="label"><a name="policyReq"></a>[Policy Requirements] </dt>
<dd><a href="http://dev.w3.org/2009/dap/policy-reqs/"><cite>Policy
Requirement in DAP WG</cite></a>. Available at
http://dev.w3.org/2009/dap/policy-reqs/. </dd>
<dt class="label"><a name="odrl"></a>[ODRL 1.1] </dt>
<dd><a href="http://www.w3.org/TR/odrl/"><cite>Open Digital Rights Language
(ODRL) Version 1.1</cite></a>, Renato Iannella. W3C Note, 19 September
2002. Available at http://www.w3.org/TR/odrl/. </dd>
<dt class="label"><a name="p3p"></a>[P3P 1.1] </dt>
<dd><a href="http://www.w3.org/TR/P3P11/"><cite>The Platform for Privacy
Preferences 1.1 (P3P1.1) Specification</cite></a>, Rigo Wenning and Rigo
Wenning. W3C Working Group Note, 13 November 2006. Available at
http://www.w3.org/TR/P3P11/. </dd>
<dt class="label"><a name="pling"></a>[PLING Wiki] </dt>
<dd><a href="http://www.w3.org/Policy/pling/"><cite>PLING Wiki</cite></a>.
Available at http://www.w3.org/Policy/pling/. </dd>
<dt class="label"><a name="webidl"></a>[Web IDL] </dt>
<dd><a href="http://www.w3.org/TR/WebIDL/"><cite>Web IDL</cite></a>,
Cameron McCormack, Editor. W3C Working Draft, 19 December 2008. Available
at http://www.w3.org/TR/WebIDL/ . </dd>
</dl>
</div>
<div class="div1">
<h2><a name="acknowledgments" id="acknowledgments"></a>D Acknowledgements
(Non-Normative)</h2>
<p>This document is the work of the <a
href="http://www.w3.org/2008/WebVideo/Annotations/">W3C Media Annotations
Working Group</a>.</p>
<p>Members of the Working Group are (at the time of writing, and by
alphabetical order): Werner Bailer (K-Space), Tobias Bürger (University of
Innsbruck), Eric Carlson (Apple, Inc.), Pierre-Antoine Champin ((public)
Invited expert), Jaime Delgado (Universitat Politècnica de Catalunya),
Jean-Pierre EVAIN ((public) Invited expert), Ralf Klamma ((public) Invited
expert), WonSuk Lee (Electronics and Telecommunications Research Institute
(ETRI)), Véronique Malaisé (Vrije Universiteit), Erik Mannens (IBBT), Hui
Miao (Samsung Electronics Co., Ltd.), Thierry Michel (W3C/ERCIM), Frank Nack
(University of Amsterdam), Soohong Daniel Park (Samsung Electronics Co., Ltd.),
Silvia Pfeiffer (W3C Invited Experts), Chris Poppe (IBBT), Víctor Rodríguez
(Universitat Politècnica de Catalunya), Felix Sasaki (Potsdam University of
Applied Sciences), David Singer (Apple, Inc.), Joakim Söderberg (ERICSSON),
Thai Wey Then (Apple, Inc.), Ruben Tous (Universitat Politècnica de
Catalunya), Raphaël Troncy (CWI), Vassilis Tzouvaras (K-Space), Davy Van
Deursen (IBBT). </p>
<p>The people who have contributed to <a
href="http://lists.w3.org/Archives/Public/public-media-annotation/">discussions
on public-media-annotation@w3.org</a> are also gratefully acknowledged. </p>
</div>
</div>
</body>
</html>