WD-mediaont-api-1.0-20110712
253 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
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
<?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 Resources 1.0</title>
<link rel="stylesheet" type="text/css" href="respec.css" />
<link rel="stylesheet" type="text/css" href="W3C-ED.css" />
<link rel="stylesheet" type="text/css" href="ma-api-spec.css" />
<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 Resources 1.0</h1>
<h2><a name="w3c-doctype" id="w3c-doctype"></a><a name="w3c-doctype1"
id="w3c-doctype1"></a>W3C Working Draft 12 July 2011</h2>
<dl>
<dt>This version:</dt>
<dd><a
href="http://www.w3.org/TR/2011/WD-mediaont-api-1.0-20110712">http://www.w3.org/TR/2011/WD-mediaont-api-1.0-20110712</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/2010/WD-mediaont-api-1.0-20100608">http://www.w3.org/TR/2010/WD-mediaont-api-1.0-20100608</a></dd>
<dt>Editors:</dt>
<dd>Florian Stegmaier, University of Passau</dd>
<dd>이원석(WonSuk Lee), Samsung Electronics Co., Ltd.</dd>
<dd>Chris Poppe, Ghent University</dd>
<dd>Werner Bailer, JOANNEUM RESEARCH</dd>
</dl>
<p class="copyright"><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
2011 <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 class="introductory section" id="abstract">
<h2>Abstract</h2>
This specification defines an API to access metadata information related to
media resources on the Web. The overall purpose is to provide developers with a
convenient access to metadata information stored in different metadata formats.
The API provides means to access the set of metadata properties defined in the
<a href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources
1.0</a> specification. These <a
href="http://www.w3.org/TR/mediaont-10/#core-property-definitions">properties</a>
are used as a pivot vocabulary in this API. The core of this specification is
the definition of API interfaces for retrieving metadata information in
synchronous and asynchronous way as well as interfaces for structured return
types along with the specification of the behavior of an API implementation.
The API has been designed for both client and server side implementations.
</div>
<div id="sotd" class="introductory section">
<h2>Status of This Document</h2>
<p><em>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/.</em></p>
<p>This is the second Last Call Working Draft 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>The W3C Membership and other interested parties are invited to review the
document and send comments through 07 August 2011. Comments must be sent to to
<a
href="mailto:public-media-annotation@w3.org?subject=%5B2ndLC%20Comment%20API%5D">public-media-annotation@w3.org</a>
mailing list (<a
href="http://lists.w3.org/Archives/Public/public-media-annotation/">public
archive</a>). Use "[2ndLC Comment API]" in the subject line of your email.</p>
<p>For your convenience, the differences between this 2nd Last Call version and
the First Last Call Working Draft are highlighted in the <a
href="2ndLC-diff">Diff file</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>
</div>
<div class="section" id="toc">
<h2 class="introductory">Table of Contents</h2>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#introduction"><span
class="secno">1. </span>Introduction</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#formats-in-scope"><span
class="secno">1.1 </span>Formats in scope</a></li>
<li class="tocline"><a class="tocxref" href="#formats-out-of-scope"><span
class="secno">1.2 </span>Formats out of scope</a></li>
<li class="tocline"><a class="tocxref" href="#terminology"><span
class="secno">1.3 </span>Terminology</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#conformance"><span
class="secno">2. </span>Conformance</a></li>
<li class="tocline"><a class="tocxref" href="#design-consideration"><span
class="secno">3. </span>Design consideration</a></li>
<li class="tocline"><a class="tocxref" href="#api-description"><span
class="secno">4. </span>API Description</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#root-api"><span
class="secno">4.1 </span><code>MediaResource</code> interface</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#methods"><span
class="secno">4.1.1 </span>Methods</a></li>
<li class="tocline"><a class="tocxref"
href="#sync-api-examples"><span class="secno">4.1.2 </span>Examples
in Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#async-api"><span
class="secno">4.2 </span><code>AsyncMediaResource</code> interface</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#methods-1"><span
class="secno">4.2.1 </span>Methods</a></li>
<li class="tocline"><a class="tocxref"
href="#Callback-interfaces"><span class="secno">4.2.2
</span>Callback interfaces</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#propertycallback--interface"><span class="secno">4.2.2.1
</span><code>PropertyCallback </code> interface</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#methods-2"><span class="secno">4.2.2.1.1
</span>Methods</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#metadatacallback--interface"><span class="secno">4.2.2.2
</span><code>MetadataCallback </code> interface</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#methods-3"><span class="secno">4.2.2.2.1
</span>Methods</a></li>
</ul>
</li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#sync-api-examples-2"><span class="secno">4.2.3
</span>Examples in Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#sync-api"><span
class="secno">4.3 </span><code>SyncMediaResource</code> interface</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#methods-4"><span
class="secno">4.3.1 </span>Methods</a></li>
<li class="tocline"><a class="tocxref"
href="#sync-api-examples-3"><span class="secno">4.3.2
</span>Examples in Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#maobject-interface"><span
class="secno">4.4 </span><code>MediaAnnotation</code> interface</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#attributes"><span
class="secno">4.4.1 </span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript"><span class="secno">4.4.2
</span>Example in JavaScript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#Properties"><span
class="secno">4.5 </span>Properties</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#identification-interface"><span class="secno">4.5.1
</span>Identification Properties</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#identifier"><span
class="secno">4.5.1.1 </span>Identifier</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-1"><span class="secno">4.5.1.1.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-1"><span
class="secno">4.5.1.1.2 </span>Example in
JavaScript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#title-1"><span
class="secno">4.5.1.2 </span>Title</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-2"><span class="secno">4.5.1.2.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-2"><span
class="secno">4.5.1.2.2 </span>Example in
JavaScript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#language"><span
class="secno">4.5.1.3 </span>Language</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-3"><span class="secno">4.5.1.3.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-3"><span
class="secno">4.5.1.3.2 </span>Example in
JavaScript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#locator"><span
class="secno">4.5.1.4 </span>Locator</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-4"><span class="secno">4.5.1.4.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-4"><span
class="secno">4.5.1.4.2 </span>Example in
JavaScript</a></li>
</ul>
</li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#creation-properties"><span class="secno">4.5.2
</span>Creation Properties</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#contributor"><span
class="secno">4.5.2.1 </span>Contributor</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-5"><span class="secno">4.5.2.1.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-5"><span
class="secno">4.5.2.1.2 </span>Example in
JavaScript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#creator"><span
class="secno">4.5.2.2 </span>Creator</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-6"><span class="secno">4.5.2.2.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-6"><span
class="secno">4.5.2.2.2 </span>Example in
JavaScript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#madate"><span
class="secno">4.5.2.3 </span>MADate</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-7"><span class="secno">4.5.2.3.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-7"><span
class="secno">4.5.2.3.2 </span>Example in
JavaScript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#location"><span
class="secno">4.5.2.4 </span>Location </a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-8"><span class="secno">4.5.2.4.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-8"><span
class="secno">4.5.2.4.2 </span>Example in
JavaScript</a></li>
</ul>
</li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#content-properties"><span class="secno">4.5.3 </span>Content
Properties</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#description"><span
class="secno">4.5.3.1 </span>Description</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-9"><span class="secno">4.5.3.1.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-9"><span
class="secno">4.5.3.1.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#keyword"><span
class="secno">4.5.3.2 </span>Keyword </a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-10"><span class="secno">4.5.3.2.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-10"><span
class="secno">4.5.3.2.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#genre"><span
class="secno">4.5.3.3 </span>Genre</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-11"><span class="secno">4.5.3.3.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-11"><span
class="secno">4.5.3.3.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#rating"><span
class="secno">4.5.3.4 </span>Rating</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-12"><span class="secno">4.5.3.4.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-12"><span
class="secno">4.5.3.4.2 </span>Example in
Javascript</a></li>
</ul>
</li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#relational-properties"><span class="secno">4.5.4
</span>Relational Properties</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#relation"><span
class="secno">4.5.4.1 </span>Relation</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-13"><span class="secno">4.5.4.1.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-13"><span
class="secno">4.5.4.1.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#collection"><span
class="secno">4.5.4.2 </span>Collection</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-14"><span class="secno">4.5.4.2.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-14"><span
class="secno">4.5.4.2.2 </span>Example in
Javascript</a></li>
</ul>
</li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#rights-properties"><span class="secno">4.5.5 </span>Rights
Properties</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#copyright"><span
class="secno">4.5.5.1 </span>Copyright</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-15"><span class="secno">4.5.5.1.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-15"><span
class="secno">4.5.5.1.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#policy"><span
class="secno">4.5.5.2 </span>Policy</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-16"><span class="secno">4.5.5.2.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-16"><span
class="secno">4.5.5.2.2 </span>Example in
Javascript</a></li>
</ul>
</li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#distribution-properties"><span class="secno">4.5.6
</span>Distribution Properties</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#publisher"><span
class="secno">4.5.6.1 </span>Publisher</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-17"><span class="secno">4.5.6.1.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-17"><span
class="secno">4.5.6.1.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#targetaudience"><span class="secno">4.5.6.2
</span>TargetAudience</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-18"><span class="secno">4.5.6.2.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-18"><span
class="secno">4.5.6.2.2 </span>Example in
Javascript</a></li>
</ul>
</li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#fragments-properties"><span class="secno">4.5.7
</span>Fragments Properties</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#fragment"><span
class="secno">4.5.7.1 </span>Fragment</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-19"><span class="secno">4.5.7.1.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-19"><span
class="secno">4.5.7.1.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#namedfragment"><span class="secno">4.5.7.2
</span>NamedFragment</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-20"><span class="secno">4.5.7.2.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-20"><span
class="secno">4.5.7.2.2 </span>Example in
Javascript</a></li>
</ul>
</li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#technical-interface"><span class="secno">4.5.8
</span>Technical Properties</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#framesize"><span
class="secno">4.5.8.1 </span>FrameSize</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-21"><span class="secno">4.5.8.1.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-21"><span
class="secno">4.5.8.1.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#compression"><span
class="secno">4.5.8.2 </span>Compression</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-22"><span class="secno">4.5.8.2.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-22"><span
class="secno">4.5.8.2.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#duration"><span
class="secno">4.5.8.3 </span>Duration</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-23"><span class="secno">4.5.8.3.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-23"><span
class="secno">4.5.8.3.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#format"><span
class="secno">4.5.8.4 </span>Format</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-24"><span class="secno">4.5.8.4.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-24"><span
class="secno">4.5.8.4.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#samplingrate"><span
class="secno">4.5.8.5 </span>SamplingRate</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-25"><span class="secno">4.5.8.5.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-25"><span
class="secno">4.5.8.5.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#framerate"><span
class="secno">4.5.8.6 </span>FrameRate</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-26"><span class="secno">4.5.8.6.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-26"><span
class="secno">4.5.8.6.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref"
href="#averagebitrate"><span class="secno">4.5.8.7
</span>AverageBitRate</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-27"><span class="secno">4.5.8.7.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-27"><span
class="secno">4.5.8.7.2 </span>Example in
Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#numtracks"><span
class="secno">4.5.8.8 </span>NumTracks</a>
<ul class="toc">
<li class="tocline"><a class="tocxref"
href="#attributes-28"><span class="secno">4.5.8.8.1
</span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#example-in-javascript-28"><span
class="secno">4.5.8.8.2 </span>Example in
Javascript</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#masource-interface"><span
class="secno">4.6 </span><code>MetadataSource</code> interface</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#attributes-29"><span
class="secno">4.6.1 </span>Attributes</a></li>
<li class="tocline"><a class="tocxref"
href="#sync-api-examples-4"><span class="secno">4.6.2
</span>Examples in Javascript</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#api-status-codes"><span
class="secno">4.7 </span>API Status Codes</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#usage-examples"><span
class="secno">5. </span>Usage examples</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#usage-js"><span
class="secno">5.1 </span>Usage as JavaScript API</a></li>
<li class="tocline"><a class="tocxref"
href="#usage-examples-web-service"><span class="secno">5.2 </span>Usage
as Web Service</a></li>
</ul>
</li>
<li class="tocline"><a class="tocxref" href="#security-considerations"><span
class="secno">6. </span>Security Considerations</a></li>
<li class="tocline"><a class="tocxref" href="#webidl-for-api"><span
class="secno">A. </span>Web IDL description</a></li>
<li class="tocline"><a class="tocxref" href="#acknowledgements"><span
class="secno">B. </span>Acknowledgements</a></li>
<li class="tocline"><a class="tocxref" href="#references"><span
class="secno">C. </span>References</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#normative-references"><span
class="secno">C.1 </span>Normative references</a></li>
<li class="tocline"><a class="tocxref"
href="#informative-references"><span class="secno">C.2
</span>Informative references</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="introduction">
<!-- class="informative"-->
<!--OddPage-->
<h2><span class="secno">1. </span>Introduction</h2>
<p>This specification defines an API to access metadata information related to
media resources on the Web. The overall purpose is to provide developers with a
convenient access to metadata information stored in different metadata formats.
The <a href="http://www.w3.org/TR/mediaont-10/#core-property-definitions">core
properties</a>, defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification, will be used as a pivot vocabulary in this API. The description
of relations between these core properties and the <a
href="#formats-in-scope">metadata formats in scope</a> are documented in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification in order to provide cross-community data integration. This API is
described using the interface definition language Web IDL [<cite><a
href="#bib-WEBIDL" rel="biblioentry" class="bibref">WEBIDL</a></cite>]. The
decision to use Web IDL, which offers bindings for ECMAScript and Java, can be
based on the Use Cases and Requirements for Ontology and API for Media
Resources 1.0 [<cite><a href="#bib-MEDIA-ANNOT-REQS" rel="biblioentry"
class="bibref">MEDIA-ANNOT-REQS</a></cite>].</p>
<p>This API defines/exposes interfaces that enables users/applications to
consume metadata in an interoperable manner. Here, interoperability between
metadata formats is ensured by the use of the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
as pivot metadata format. This API offers operations to request particular
metadata information represented in a certain metadata format related to media
resources on the Web. Further it specifies the actual representation of the <a
href="http://www.w3.org/TR/mediaont-10/#core-property-definitions">core
properties</a> and the behaviour of this API.</p>
<div class="section" id="formats-in-scope">
<h3><span class="secno">1.1 </span>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 Resources
1.0</a>.</p>
</div>
<div class="section" id="formats-out-of-scope">
<h3><span class="secno">1.2 </span>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
Resources 1.0</a>.</p>
</div>
<div class="section" id="terminology">
<h3><span class="secno">1.3 </span>Terminology</h3>
<p>In this document the terms "Ontology", "Media Resource", "Property",
"Mapping" and "Property value types" are to be interpreted as defined in <a
href="http://www.w3.org/TR/mediaont-10/#Terminology">Section 2</a> of <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources
1.0</a>.</p>
</div>
</div>
<div class="section" id="conformance">
<!--OddPage-->
<h2><span class="secno">2. </span>Conformance</h2>
<p>As well as sections marked as non-normative, all authoring guidelines,
diagrams, examples, and notes in this specification are non-normative.
Everything else in this specification is normative.</p>
<p>The key words <em title="must" class="rfc2119">must</em>, <em
title="must not" class="rfc2119">must not</em>, <em title="required"
class="rfc2119">required</em>, <em title="should" class="rfc2119">should</em>,
<em title="should not" class="rfc2119">should not</em>, <em title="recommended"
class="rfc2119">recommended</em>, <em title="may" class="rfc2119">may</em>, and
<em title="optional" class="rfc2119">optional</em> in this specification are to
be interpreted as described in [<cite><a href="#bib-RFC2119" rel="biblioentry"
class="bibref">RFC2119</a></cite>].</p>
</div>
<div class="section" id="design-consideration">
<!--OddPage-->
<h2><span class="secno">3. </span>Design consideration</h2>
<p>Before introducing the two example usage scenarios of this API, two modes of
operations must be defined: asynchronous and synchronous mode. For this API the
asynchronous mode is considered to be used as default. Here, a request will be
executed within a certain time period and then returned. In contrast to that,
the synchronous mode implicates an immediate answer to every request.</p>
<p>We consider two scenarios, where this API could be implemented:</p>
<ul>
<li><p>User agent</p>
</li>
<li><p>Web Service</p>
</li>
</ul>
<p>The two scenarios are shown in <a href="#API-options">Figure 1.</a></p>
<p style="font-style:italic;" align="center"><img id="API-options" width="90%"
src="API_options.png"
alt="Diagram showing 2 scenarios with different usage of the API."
align="middle" /></p>
<p></p>
<center>
Figure 1: Two scenarios with different usage of this API.</center>
<p></p>
<p>Note: This specification only defines this API for Media Resources. Other
components depicted in Figure 1 (e.g., access/extraction/storage of metadata)
are not covered.</p>
<dl>
<dt>Scenario 1: User agent</dt>
<dd>In this scenario, this API is implemented in a user agent (e.g.,
browser or browser plugin) and exposed as a JavaScript API (using the
WebIDL JavaScript binding). Usually, such an implementation is per
default an example for an asynchronous processing. Besides the "API for
Media Resources 1.0", the user agent includes components for metadata
access (and possibly extraction) and mappings for a supported set of
formats, e.g., as defined in the <a
href="http://www.w3.org/TR/mediaont-10/#property-mapping-table">property
mapping table</a> of the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources
1.0</a> specification. Further, the metadata sources (the media resource
and/or metadata document(s)) must be retrievable, while the access (e.g.,
establish connection, retrieval) to the metadata sources is handled by
the user agent. </dd>
<dt>Scenario 2: Web service</dt>
<dd>In the second scenario, this API is encapsulated in a Web Service
following the principle of synchronous processing. Such an implementation
would be typically used by a non-UI client, such as an agent harvesting
metadata. However, this API could be also accessed from a user agent, and
used the same way as described in scenario 1 with the help of a
JavaScript library for accessing the Web Service. In the implementation
of the Web Service, this scenario also allows supporting a media
repository (e.g. content provider's archive database, movie store). With
the help of such a service the user agent could retrieve metadata
sources, 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 this API in a web service could do more complex
mappings on the fly than a component integrated in a user agent, and can
be more flexible (e.g., supporting additional formats). </dd>
</dl>
<p>In both scenarios, this API serves as a mediator between a client
application and the actual metadata sources. Interoperability is ensured by
defining i) operations for accessing the metadata information, ii) common
object structure and iii) API behaviour (e.g., status codes). Following this,
an implementation has to implement this stack of components:</p>
<ul>
<li><p>An implementation of the API for Media Resources (as defined in this
document), which provides the actual getter methods for the properties.</p>
</li>
<li><p>An implementation of the mappings from a specific source format to the
core properties. Here, the API for Media Resources 1.0 may use the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources
1.0</a> specification.</p>
</li>
<li><p>A format specific API to access the metadata. This can be an API for
retrieving a metadata document describing a media resource (e.g. an XML
parser and a set of XPath statements) or an extractor to read metadata
embedded in the media resource (e.g. a library to read EXIF information
from JPEG images). In order to define the context in which this API is
applied, at least a unidirectional reference from the media resource to the
metadata document or vice versa is needed. 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>
<p>Note that, this API provides access to metadata information stored in
different metadata formats. As such, different instances of the same property
can exist.</p>
</div>
<div class="section" id="api-description">
<!--OddPage-->
<h2><span class="secno">4. </span>API Description</h2>
<p>This API defines a number of interfaces using [<cite><a href="#bib-WEBIDL"
rel="biblioentry" class="bibref">WEBIDL</a></cite>]. These can be grouped in
the following categories:</p>
<ul>
<li><p>Interfaces defining the actual retrieval operations for metadata,
called <code>MediaResource</code>, and provided in both synchronous and
asynchronous versions (see <a href="#root-api">Section 4.1</a>, <a
href="#async-api">Section 4.2</a> and <a href="#sync-api">Section
4.3</a>)</p>
</li>
<li><p>Interfaces defining the data structure of response objects/metadata
annotations, called <code>MediaAnnotation</code> (see <a
href="#maobject-interface">Section 4.4</a> and <a
href="#Properties">Section 4.5</a>) </p>
</li>
<li><p>An interfaces defining a data structure for metadata sources, called
<code>MetadataSource</code> (see <a href="#masource-interface">Section
4.6</a>) </p>
</li>
</ul>
<p>Next, the different interfaces and exposed operations (in case of the
<code>MediaResource</code> interfaces and its implementing interfaces) are
discussed. Implementations of this API <em title="must"
class="rfc2119">must</em> support at least one of the versions and <em
title="must" class="rfc2119">must</em> support the other interfaces defined in
this document. We have not specified exceptions on the operations or on
accessing the attributes. Instead, a status code is returned (in the
synchronous API) or can be accessed (in the asynchronous API) in case an error
occurs indicating the state of processing (see <a
href="#api-status-codes">Section 4.7</a>).</p>
<p>Then, the interfaces for the return types, i.e.,
<code>MediaAnnotation</code> and its specializations, and
<code>MetadataSource</code> are defined.</p>
<p>The IDL fragment in <a href="#webidl-for-api">Appendix A</a> of this
specification must be interpreted as required for conforming IDL fragments, as
described in the “Web IDL” specification. [<cite><a href="#bib-WEBIDL"
rel="biblioentry" class="bibref">WEBIDL</a></cite>]</p>
<div class="section" id="root-api">
<h3><span class="secno">4.1 </span><code>MediaResource</code> interface</h3>
<p>The <code>MediaResource</code> interface is the core of this API and
provides operations to access the metadata properties of a specific media
resource. Here, a clear separation between asynchronous and synchronous mode of
operation has been achieved by defining two implementing interfaces, the
<code>AsyncMediaResource</code> and the <code>SyncMediaResource</code>
interface. Objects of these interfaces will be created by calling
<code>createMediaResource</code> of the <code>MediaResource</code> interface.
The actual connection to a specified metadata source will be created with the
execution of the <code>getMediaProperty</code> operation of
<code>AsyncMediaResource</code> or <code>SyncMediaResource</code> interface.</p>
<pre class="idl"><span class="idlInterface" id="idl-def-MediaResource">interface <span class="idlInterfaceID">MediaResource</span> {
<span class="idlMethod"> <span class="idlMethType"><a>short</a></span> <span class="idlMethName"><a href="#widl-MediaResource-getSupportedModes-short">getSupportedModes</a></span> ();</span>
<span class="idlMethod"> <span class="idlMethType"><a class="idlType" href="#idl-def-MediaResource"><code>MediaResource</code></a></span> <span class="idlMethName"><a href="#widl-MediaResource-createMediaResource-MediaResource-DOMString-mediaResource-MetadataSourceArray-metadataSources-short-mode">createMediaResource</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">mediaResource</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a class="idlType" href="#idl-def-MetadataSource"><code>MetadataSource</code></a>[]</span> <span class="idlParamName">metadataSources</span></span>, <br /> <span class="idlParam">in optional <span class="idlParamType"><a>short</a></span> <span class="idlParamName">mode</span></span>);</span>
};</span></pre>
<div class="section" id="methods">
<h4><span class="secno">4.1.1 </span>Methods</h4>
<dl class="methods">
<dt
id="widl-MediaResource-createMediaResource-MediaResource-DOMString-mediaResource-MetadataSourceArray-metadataSources-short-mode"><code>createMediaResource</code></dt>
<dd>This operation instantiates an object of either
<code>AsyncMediaResource</code> or <code>SyncMediaResource</code>
interface. Further, it allows to set the specific media resource and
metadata sources to which this API is applied.
<table class="parameters">
<tbody>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Nullable</th>
<th>Optional</th>
<th>Description</th>
</tr>
<tr>
<td class="prmName">mediaResource</td>
<td class="prmType"><code><a>DOMString</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptFalse">✘</td>
<td class="prmDesc">This attribute must set the specific media
resource that should be processed by the API.</td>
</tr>
<tr>
<td class="prmName">metadataSources</td>
<td class="prmType"><code><a class="idlType"
href="#idl-def-MetadataSource"><code>MetadataSource</code></a>[]</code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptTrue">✔</td>
<td class="prmDesc">This attribute should specify additional
metadata sources.</td>
</tr>
<tr>
<td class="prmName">mode</td>
<td class="prmType"><code><a>short</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptTrue">✔</td>
<td class="prmDesc">This attribute should specify the desired mode
of operation. <code><b>1</b></code> for asynchronous and
<code><b>2</b></code> for synchronous mode should be used. </td>
</tr>
</tbody>
</table>
<div>
<em>No exceptions.</em></div>
<div>
<em>Return type: </em><code><a class="idlType"
href="#idl-def-MediaResource"><code>MediaResource</code></a></code></div>
</dd>
<dt
id="widl-MediaResource-getSupportedModes-short"><code>getSupportedModes</code></dt>
<dd>This operation is called to identify the implemented mode. The return
codes should be as follows: <code><b>1</b></code> for asynchronous,
<code><b>2</b></code> for synchronous and <code><b>3</b></code> for both
modes.
<div>
<em>No parameters.</em></div>
<div>
<em>No exceptions.</em></div>
<div>
<em>Return type: </em><code><a>short</a></code></div>
</dd>
</dl>
</div>
<div class="section" id="sync-api-examples">
<h4><span class="secno">4.1.2 </span>Examples in Javascript</h4>
<p>Example for <code>getSupportedModes</code>:</p>
<pre class="example sh_javascript sh_sourceCode">ma <span class="sh_symbol">=</span> <span class="sh_keyword">new</span> <span class="sh_function">MediaResource</span><span class="sh_symbol">();</span>
<span class="sh_keyword">var</span> mode <span class="sh_symbol">=</span> ma<span class="sh_symbol">.</span><span class="sh_function">getSupportedModes</span><span class="sh_symbol">();</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * { "supportedModes" : 3 }</span>
<span class="sh_comment"> */</span></pre>
<p id="example-sync-construct">Example for <code>createMediaResource</code>:</p>
<pre class="example sh_javascript sh_sourceCode">metadataSources <span class="sh_symbol">=</span> <span class="sh_keyword">new</span> MetadataSource<span class="sh_symbol">[</span><span class="sh_number">2</span><span class="sh_symbol">];</span>
metadataSources<span class="sh_symbol">[</span><span class="sh_number">0</span><span class="sh_symbol">]</span> <span class="sh_symbol">=</span> <span class="sh_keyword">new</span> <span class="sh_function">MetadataSource</span><span class="sh_symbol">(</span>
<span class="sh_string">"http://www.w3.org/2008/WebVideo/Annotations/drafts/metadata_formats/DC_example1.xml"</span><span class="sh_symbol">,</span><span class="sh_string">"dc"</span><span class="sh_symbol">);</span>
metadataSources<span class="sh_symbol">[</span><span class="sh_number">1</span><span class="sh_symbol">]</span> <span class="sh_symbol">=</span> <span class="sh_keyword">new</span> <span class="sh_function">MetadataSource</span><span class="sh_symbol">(</span>
<span class="sh_string">"http://www.w3.org/2008/WebVideo/Annotations/wiki/images/9/93/MAWG-Stockholm-20090626.JPG"</span><span class="sh_symbol">,</span><span class="sh_string">"exif"</span><span class="sh_symbol">);</span>
mediaResource <span class="sh_symbol">=</span> <span class="sh_keyword">new</span> <span class="sh_function">MediaResource</span><span class="sh_symbol">();</span>
<span class="sh_keyword">if</span> <span class="sh_symbol">(</span>mediaResource<span class="sh_symbol">.</span><span class="sh_function">getSupportedModes</span><span class="sh_symbol">()</span> <span class="sh_symbol">==</span> <span class="sh_number">1</span> <span class="sh_symbol">||</span> mediaResource<span class="sh_symbol">.</span><span class="sh_function">getSupportedModes</span><span class="sh_symbol">()</span> <span class="sh_symbol">==</span> <span class="sh_number">3</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
aSyncObject <span class="sh_symbol">=</span> mediaResource<span class="sh_symbol">.</span><span class="sh_function">createMediaResource</span><span class="sh_symbol">(</span>
<span class="sh_string">"http://www.w3.org/2008/WebVideo/Annotations/wiki/images/9/93/MAWG-Stockholm-20090626.JPG"</span><span class="sh_symbol">,</span>
metadataSources<span class="sh_symbol">,</span> <span class="sh_number">1</span><span class="sh_symbol">);</span>
<span class="sh_cbracket">}</span> <span class="sh_keyword">else</span> <span class="sh_keyword">if</span> <span class="sh_symbol">(</span>mediaResource<span class="sh_symbol">.</span><span class="sh_function">getSupportedModes</span><span class="sh_symbol">()</span> <span class="sh_symbol">==</span> <span class="sh_number">2</span> <span class="sh_symbol">||</span> mediaResource<span class="sh_symbol">.</span><span class="sh_function">getSupportedModes</span><span class="sh_symbol">()</span> <span class="sh_symbol">==</span> <span class="sh_number">3</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
syncObject <span class="sh_symbol">=</span> mediaResource<span class="sh_symbol">.</span><span class="sh_function">createMediaResource</span><span class="sh_symbol">(</span>
<span class="sh_string">"http://www.w3.org/2008/WebVideo/Annotations/wiki/images/9/93/MAWG-Stockholm-20090626.JPG"</span><span class="sh_symbol">,</span>
metadataSources<span class="sh_symbol">,</span> <span class="sh_number">2</span><span class="sh_symbol">);</span>
<span class="sh_cbracket">}</span></pre>
</div>
</div>
<div class="section" id="async-api">
<h3><span class="secno">4.2 </span><code>AsyncMediaResource</code>
interface</h3>
<p>The <code>AsyncMediaResource</code> interface provides a number of
operations that allow accessing the metadata of a media resource. By calling
the <code>getMediaProperty</code> operation with the argument "title" we can
retrieve the title of the corresponding media resource.</p>
<p>Next, we give the Web IDL description of the <code>AsyncMediaResource</code>
interface and describe the different operations that are part of it. The
mediaResource argument identifies the media resource, for which the
implementation of this API should try to find relevant metadata sources.
Optionally, references to metadata sources can be passed using an array of
objects, each implementing the <code>MetadataSource</code> interface. This
interface holds an URI identifying the metadata source (metadataSource) and the
name of the actual metadata format (sourceFormat).</p>
<p class="note">In this section the <code>MediaAnnotations</code> interface is
used in the interface definitions. It serves as a container to hold general
values about properties enabling an iteration over a set of different
properties. Its explanation can be found in <a
href="#maobject-interface">Section 4.4</a></p>
<pre class="idl"><span class="idlInterface" id="idl-def-AsyncMediaResource">interface <span class="idlInterfaceID">AsyncMediaResource</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaResource"><code>MediaResource</code></a></span> {
<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-AsyncMediaResource-getMediaProperty-void-DOMStringArray-propertyNames-PropertyCallback-successCallback-ErrorCallback-errorCallback-DOMString-fragment-DOMString-sourceFormat-DOMString-language">getMediaProperty</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a>[]</span> <span class="idlParamName">propertyNames</span></span>, <span class="idlParam">in <span class="idlParamType"><a class="idlType" href="#idl-def-PropertyCallback"><code>PropertyCallback</code></a></span> <span class="idlParamName">successCallback</span></span>,<br /> <span class="idlParam">in <span class="idlParamType"><a>ErrorCallback</a></span> <span class="idlParamName">errorCallback</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">fragment</span></span>,<br /> <span class="idlParam">in optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">sourceFormat</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">language</span></span>);</span>
<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-AsyncMediaResource-getOriginalMetadata-void-DOMString-sourceFormat-MetadataCallback-successCallback-ErrorCallback-errorCallback">getOriginalMetadata</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">sourceFormat</span></span>, <span class="idlParam">in <span class="idlParamType"><a class="idlType" href="#idl-def-MetadataCallback"><code>MetadataCallback</code></a></span> <span class="idlParamName">successCallback</span></span>,<br /> <span class="idlParam">in <span class="idlParamType"><a>ErrorCallback</a></span> <span class="idlParamName">errorCallback</span></span>);</span>
};</span></pre>
<div class="section" id="methods-1">
<h4><span class="secno">4.2.1 </span>Methods</h4>
<dl class="methods">
<dt
id="widl-AsyncMediaResource-getMediaProperty-void-DOMStringArray-propertyNames-PropertyCallback-successCallback-ErrorCallback-errorCallback-DOMString-fragment-DOMString-sourceFormat-DOMString-language"><code>getMediaProperty</code></dt>
<dd>This operation allows retrieval of the value of a specific property,
several or all properties in an asynchronous manner. The specific
property is passed as an argument and a list of objects is returned that
hold the values according to the requested property. These objects
implement the <code>MediaAnnotation</code> interface, described in <a
href="#maobject-interface">Section 4.4</a>. Depending on the requested
property, the returned objects implement a different subtypes (inheriting
from the <code>MediaAnnotation</code> interface). Requesting "title"
gives back an array of objects implementing the <code>Title</code>
interface, requesting "creator" results in objects implementing the
<code>Creator</code> interface and so on. These interfaces are described
in <a href="#Properties">Section 4.5</a>. An example can be found <a
href="#example-getMediaProperty-async">here</a>.
<table class="parameters">
<tbody>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Nullable</th>
<th>Optional</th>
<th>Description</th>
</tr>
<tr>
<td class="prmName">propertyNames</td>
<td class="prmType"><code><a>DOMString</a>[]</code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptFalse">✘</td>
<td class="prmDesc">This argument identifies an array containing
the properties for which the values need to be retrieved. For an
empty array all properties carrying values will be retrieved.
Optional arguments allow refining the request. </td>
</tr>
<tr>
<td class="prmName">successCallback</td>
<td class="prmType"><code><a class="idlType"
href="#idl-def-PropertyCallback"><code>PropertyCallback</code></a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptFalse">✘</td>
<td class="prmDesc">This argument holds a callback object for
asynchronous requests to the property. The
<code>successCallback</code> object implements the
<code>PropertyCallback</code> interface and holds a
<code>handleEvent</code> operation that needs to be called once
all data for the requested property is gathered. This
<code>handleEvent</code> operation needs to be called with a new
MediaAnnotation array. </td>
</tr>
<tr>
<td class="prmName">errorCallback</td>
<td class="prmType"><code><a>ErrorCallback</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptFalse">✘</td>
<td class="prmDesc">This argument holds a callback object for
failure of asynchronous requests to the property. The
<code>errorCallback</code> object implements the
<code>ErrorCallback</code> interface and holds a
<code>handleEvent</code> operation that needs to be called if an
attempt fails. This <code>handleEvent</code> operation needs to
be called with a new DOMString representing the status code of
the error (see <a href="#api-status-codes">Section 4.7</a> for
details). </td>
</tr>
<tr>
<td class="prmName">fragment</td>
<td class="prmType"><code><a>DOMString</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptTrue">✔</td>
<td class="prmDesc">This argument contains a URI identifying the
specific media fragment for which the metadata is requested. The
URI <em title="must" class="rfc2119">must</em> conform to the URI
for Media Fragment [<cite><a href="#bib-MEDIA-FRAGMENTS"
rel="biblioentry" class="bibref">MEDIA-FRAGMENTS</a></cite>]
specification. This parameter is optional.</td>
</tr>
<tr>
<td class="prmName">sourceFormat</td>
<td class="prmType"><code><a>DOMString</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptTrue">✔</td>
<td class="prmDesc">This argument identifies a specific metadata
format. It <em title="should" class="rfc2119">should</em> use the
<i><a
href="http://www.w3.org/TR/mediaont-10/#metadata-formats-in-scope">metadata
format identifiers</a></i> defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media
Resources 1.0</a> specification. If a metadata format is defined,
only the metadata available in the corresponding metadata format
are retrieved. This parameter is optional.</td>
</tr>
<tr>
<td class="prmName">language</td>
<td class="prmType"><code><a>DOMString</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptTrue">✔</td>
<td class="prmDesc">This argument allows to identify the language
of the metadata. Values for the metadata will only be returned if
it is available in the specified language. Recommended best
practice is to use BCP 47 [<cite><a href="#bib-BCP47"
rel="biblioentry" class="bibref">BCP47</a></cite>]. This
parameter is optional.</td>
</tr>
</tbody>
</table>
<div>
<em>No exceptions.</em></div>
<div>
<em>Return type: </em><code><a>void</a></code></div>
</dd>
<dt
id="widl-AsyncMediaResource-getOriginalMetadata-void-DOMString-sourceFormat-MetadataCallback-successCallback-ErrorCallback-errorCallback"><code>getOriginalMetadata</code></dt>
<dd>This operation allows retrieval of the original metadata according to
the specified source format in an asynchronous manner. An example can be
found <a href="#example-getOriginalMetadata-async">here</a>.
<table class="parameters">
<tbody>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Nullable</th>
<th>Optional</th>
<th>Description</th>
</tr>
<tr>
<td class="prmName">sourceFormat</td>
<td class="prmType"><code><a>DOMString</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptFalse">✘</td>
<td class="prmDesc">This argument identifies a specific metadata
format. It <em title="should" class="rfc2119">should</em> use the
<i><a
href="http://www.w3.org/TR/mediaont-10/#metadata-formats-in-scope">metadata
format identifiers</a></i> defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media
Resources 1.0</a> specification. If a metadata format is defined,
only the metadata available in the corresponding metadata format
are retrieved.</td>
</tr>
<tr>
<td class="prmName">successCallback</td>
<td class="prmType"><code><a class="idlType"
href="#idl-def-MetadataCallback"><code>MetadataCallback</code></a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptFalse">✘</td>
<td class="prmDesc">This argument holds a callback object for
asynchronous requests for the original metadata. The
<code>successCallback</code> object implements the
<code>MetadataCallback</code> interface and holds a
<code>handleEvent</code> operation that needs to be called once
all properties having values are listed. This
<code>handleEvent</code> operation needs to be called with a new
DOMString array holding the original metadata. </td>
</tr>
<tr>
<td class="prmName">errorCallback</td>
<td class="prmType"><code><a>ErrorCallback</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptFalse">✘</td>
<td class="prmDesc">This argument holds a callback object for
failure of asynchronous requests for the original metadata. The
<code>errorCallback</code> object implements the
<code>ErrorCallback</code> interface and holds a
<code>handleEvent</code> operation that needs to be called if an
attempt fails. This <code>handleEvent</code> operation needs to
be called with a new DOMString representing the status code of
the error (see <a href="#api-status-codes">Section 4.7</a> for
details). </td>
</tr>
</tbody>
</table>
<div>
<em>No exceptions.</em></div>
<div>
<em>Return type: </em><code><a>void</a></code></div>
</dd>
</dl>
</div>
<div class="section" id="Callback-interfaces">
<h4><span class="secno">4.2.2 </span>Callback interfaces</h4>
<div class="section" id="propertycallback--interface">
<h5><span class="secno">4.2.2.1 </span><code>PropertyCallback </code>
interface</h5>
<p>The <code>PropertyCallback </code> interface holds a
<code>handleEvent</code> operation that needs to be called once all data for
the requested property has been gathered. </p>
<pre class="idl"><span class="idlInterface" id="idl-def-PropertyCallback">interface <span class="idlInterfaceID">PropertyCallback</span> {
<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-PropertyCallback-handleEvent-void-MediaAnnotationArray-mediaAnnotations">handleEvent</a></span> (<span class="idlParam">in <span class="idlParamType"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a>[]</span> <span class="idlParamName">mediaAnnotations</span></span>);</span>
};</span></pre>
<div class="section" id="methods-2">
<h6><span class="secno">4.2.2.1.1 </span>Methods</h6>
<dl class="methods">
<dt
id="widl-PropertyCallback-handleEvent-void-MediaAnnotationArray-mediaAnnotations"><code>handleEvent</code></dt>
<dd>This operation is called when all data is gathered corresponding to a
request for values of one or more properties.
<table class="parameters">
<tbody>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Nullable</th>
<th>Optional</th>
<th>Description</th>
</tr>
<tr>
<td class="prmName">mediaAnnotations</td>
<td class="prmType"><code><a class="idlType"
href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a>[]</code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptFalse">✘</td>
<td class="prmDesc">This argument holds a list of objects with
values according to the requested property. These objects
implement the <code>MediaAnnotation</code> interface, described
in <a href="#maobject-interface">Section 4.4</a>. Depending on
the requested property, the returned objects implement a
different subtypes (inheriting from the
<code>MediaAnnotation</code> interface). </td>
</tr>
</tbody>
</table>
<div>
<em>No exceptions.</em></div>
<div>
<em>Return type: </em><code><a>void</a></code></div>
</dd>
</dl>
</div>
</div>
<div class="section" id="metadatacallback--interface">
<h5><span class="secno">4.2.2.2 </span><code>MetadataCallback </code>
interface</h5>
<p>The <code>MetadataCallback </code> interface holds a
<code>handleEvent</code> operation that needs to be called once the requested
metadata has been gathered. </p>
<pre class="idl"><span class="idlInterface" id="idl-def-MetadataCallback">interface <span class="idlInterfaceID">MetadataCallback</span> {
<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-MetadataCallback-handleEvent-void-DOMStringArray-metadata">handleEvent</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a>[]</span> <span class="idlParamName">metadata</span></span>);</span>
};</span></pre>
<div class="section" id="methods-3">
<h6><span class="secno">4.2.2.2.1 </span>Methods</h6>
<dl class="methods">
<dt
id="widl-MetadataCallback-handleEvent-void-DOMStringArray-metadata"><code>handleEvent</code></dt>
<dd>This operation is called when all data is gathered corresponding to a
request for the original metadata.
<table class="parameters">
<tbody>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Nullable</th>
<th>Optional</th>
<th>Description</th>
</tr>
<tr>
<td class="prmName">metadata</td>
<td class="prmType"><code><a>DOMString</a>[]</code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptFalse">✘</td>
<td class="prmDesc">This argument holds a list of DOMStrings
representing the original metadata. Note that, multiple metadata
instances can exist (e.g., one Dublin core and one MPEG-7
document). </td>
</tr>
</tbody>
</table>
<div>
<em>No exceptions.</em></div>
<div>
<em>Return type: </em><code><a>void</a></code></div>
</dd>
</dl>
</div>
</div>
</div>
<div class="section" id="sync-api-examples-2">
<h4><span class="secno">4.2.3 </span>Examples in Javascript</h4>
<p id="example-getMediaProperty-async">Example for asynchronous
<code>getMediaProperty</code>:</p>
<pre class="example sh_javascript sh_sourceCode">aSyncMediaResource <span class="sh_symbol">=</span> mediaResource<span class="sh_symbol">.</span><span class="sh_function">createMediaResource</span><span class="sh_symbol">(</span><span class="sh_string">"http://www.imdb.com/title/tt0133152/"</span><span class="sh_symbol">,</span> <span class="sh_keyword">new</span> <span class="sh_predef_func">Array</span><span class="sh_symbol">(),</span> <span class="sh_number">1</span><span class="sh_symbol">);</span>
aSyncMediaResource<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"title"</span><span class="sh_symbol">],</span> successCallback<span class="sh_symbol">,</span> errorCallback<span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">);</span>
<span class="sh_keyword">function</span> <span class="sh_function">successCallback</span><span class="sh_symbol">(</span>MediaAnnotation<span class="sh_symbol">[]</span> mediaAnnotations<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
<span class="sh_symbol">...</span>
<span class="sh_cbracket">}</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Title" : {</span>
<span class="sh_comment"> * "propertyName" : "title",</span>
<span class="sh_comment"> * "value" : "Planet of the apes",</span>
<span class="sh_comment"> * "language" : en-us",</span>
<span class="sh_comment"> * ...</span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * },</span>
<span class="sh_comment"> * { "Title" : {</span>
<span class="sh_comment"> * "propertyName" : "title",</span>
<span class="sh_comment"> * "value" : "Monkey Planet",</span>
<span class="sh_comment"> * "language" : en-us",</span>
<span class="sh_comment"> * ...,</span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * },</span>
<span class="sh_comment"> * { ...</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span>
<span class="sh_keyword">function</span> <span class="sh_function">errorCallback</span><span class="sh_symbol">(</span>DOMString error<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
<span class="sh_symbol">...</span>
<span class="sh_cbracket">}</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * { error: { "statusCode" : 415 } }</span>
<span class="sh_comment"> */</span></pre>
<p id="example-getOriginalMetadata-async">Example for asynchronous
<code>getOriginalMetadata</code> :</p>
<pre class="example sh_javascript sh_sourceCode">aSyncMediaResource <span class="sh_symbol">=</span> mediaResource<span class="sh_symbol">.</span><span class="sh_function">createMediaResource</span><span class="sh_symbol">(</span>
<span class="sh_string">"http://www.w3.org/2008/WebVideo/Annotations/wiki/images/9/93/MAWG-Stockholm-20090626.JPG"</span><span class="sh_symbol">,</span>
<span class="sh_keyword">new</span> <span class="sh_predef_func">Array</span><span class="sh_symbol">(),</span> <span class="sh_number">1</span><span class="sh_symbol">);</span>
aSyncMediaResource<span class="sh_symbol">.</span><span class="sh_function">getOriginalMetadata</span><span class="sh_symbol">(</span><span class="sh_string">"dc"</span><span class="sh_symbol">,</span> successCallback<span class="sh_symbol">,</span> errorCallback<span class="sh_symbol">);</span>
<span class="sh_keyword">function</span> <span class="sh_function">successCallback</span><span class="sh_symbol">(</span>DOMString<span class="sh_symbol">[]</span> metadata<span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
<span class="sh_symbol">...</span>
<span class="sh_cbracket">}</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "statusCode" : 200</span>
<span class="sh_comment"> * },</span>
<span class="sh_comment"> * {"originalMetadata" : "</span><span class="sh_keyword"><metadata</span> <span class="sh_type">xmlns</span><span class="sh_symbol">=</span><span class="sh_type">\</span><span class="sh_string">"http://example.org/myapp/\"</span>
<span class="sh_string"> * xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance \"</span>
<span class="sh_string"> * xsi:schemaLocation=\"http://example.org/myapp/ http://example.org/myapp/schema.xsd\"</span>
<span class="sh_string"> * xmlns:dc=\"http://purl.org/dc/elements/1.1/\"></span>
<span class="sh_string"> * <dc:title>DC title</dc:title></span>
<span class="sh_string"> * </metadata>"</span>
<span class="sh_type">*</span><span class="sh_normal"> </span><span class="sh_type">}</span><span class="sh_normal"> </span><span class="sh_type">]</span>
<span class="sh_type">*/</span>
<span class="sh_type">function</span><span class="sh_normal"> </span><span class="sh_type">errorCallback(DOMString</span><span class="sh_normal"> </span><span class="sh_type">error)</span><span class="sh_normal"> </span><span class="sh_type">{</span>
<span class="sh_type">...</span>
<span class="sh_type">}</span>
<span class="sh_type">/**</span><span class="sh_normal"> </span><span class="sh_type">Resulting</span><span class="sh_normal"> </span><span class="sh_type">in:</span>
<span class="sh_type">*</span><span class="sh_normal"> </span><span class="sh_type">{</span><span class="sh_normal"> </span><span class="sh_type">error:</span><span class="sh_normal"> </span><span class="sh_type">{</span><span class="sh_normal"> </span><span class="sh_string">"statusCode"</span> <span class="sh_type">:</span><span class="sh_normal"> </span><span class="sh_type">415</span><span class="sh_normal"> </span><span class="sh_type">}</span><span class="sh_normal"> </span><span class="sh_type">}</span>
<span class="sh_type">*/</span></pre>
</div>
</div>
<div class="section" id="sync-api">
<h3><span class="secno">4.3 </span><code>SyncMediaResource</code> interface</h3>
<p>The <code>SyncMediaResource</code> interface provides a number of operations
to access the metadata of a media resource. Next, we give the Web IDL
description of the <code>SyncMediaResource</code> interface for synchronous
requests and describe the different operations that are part of it. The
<code>MediaResource</code> defines a constructor that can be called to
construct the object based on an identifier of the media resource and
optionally some metadata sources. The mediaResource argument identifies the
media resource, for which the implementation of this API should try to find
relevant metadata sources. Optionally, references to metadata sources can be
passed using an array of objects, each implementing the
<code>MetadataSource</code> interface. This interface holds two attributes,
namely an URI identifying the metadata source (<code>metadataSource</code>) and
the name of the actual metadata format (<code>sourceFormat</code>). An example,
how to create this object can be found <a
href="#example-sync-construct">here</a>.</p>
<pre class="idl"><span class="idlInterface" id="idl-def-SyncMediaResource">interface <span class="idlInterfaceID">SyncMediaResource</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaResource"><code>MediaResource</code></a></span> {
<span class="idlMethod"> <span class="idlMethType"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a>[]</span> <span class="idlMethName"><a href="#widl-SyncMediaResource-getMediaProperty-MediaAnnotation-DOMStringArray-propertyNames-DOMString-fragment-DOMString-sourceFormat-DOMString-language">getMediaProperty</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a>[]</span> <span class="idlParamName">propertyNames</span></span>,<br /> <span class="idlParam">in optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">fragment</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">sourceFormat</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">language</span></span>);</span>
<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a>[]</span> <span class="idlMethName"><a href="#widl-SyncMediaResource-getOriginalMetadata-DOMString-DOMString-sourceFormat">getOriginalMetadata</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">sourceFormat</span></span>);</span>
};</span></pre>
<div class="section" id="methods-4">
<h4><span class="secno">4.3.1 </span>Methods</h4>
<dl class="methods">
<dt
id="widl-SyncMediaResource-getMediaProperty-MediaAnnotation-DOMStringArray-propertyNames-DOMString-fragment-DOMString-sourceFormat-DOMString-language"><code>getMediaProperty</code></dt>
<dd>This operation allows retrieval of the metadata of a specific property,
several or all properties in a synchronous manner. The passed array holds
the requested properties and a array of objects is returned. If the array
is empty, every property holding values will be requested and returned.
The returned objects implement the <code>MediaAnnotation</code> interface
(see <a href="#maobject-interface">Section 4.3</a><a>). Depending on the
requested property, the returned objects implement a different subtypes
(inheriting from the <code>MediaAnnotation</code> interface). Requesting
"title" gives back an array of objects implementing the
<code>Title</code> interface, requesting "creator" results in objects
implementing the <code>Creator</code> interface and so on. These subtypes
are described in </a><a href="#Properties">Section 4.4</a>. The operation
returns a <code>MediaAnnotation</code> array holding the requested
properties. If an error occurs during retrieval, a
<code>MediaAnnotation</code> object with the corresponding status code
(e.g., 400, 404 or 415) will be generated and inserted at the first
position of the array. An example can be found <a
href="#example-getMediaProperty-sync">here</a>.
<p class="note">In this section the <code>MediaAnnotations</code>
interface is used in the interface definitions. It serves as a container
to hold general values about properties enabling an iteration over a set
of different properties. Its explanation can be found in <a
href="#maobject-interface">Section 4.4</a></p>
<table class="parameters">
<tbody>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Nullable</th>
<th>Optional</th>
<th>Description</th>
</tr>
<tr>
<td class="prmName">propertyNames</td>
<td class="prmType"><code><a>DOMString</a>[]</code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptFalse">✘</td>
<td class="prmDesc">This argument holds the requested properties as
an array. If the array is empty, each property holding values
will be returned.</td>
</tr>
<tr>
<td class="prmName">fragment</td>
<td class="prmType"><code><a>DOMString</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptTrue">✔</td>
<td class="prmDesc">This argument contains a URI identifying the
specific media fragment for which the metadata is requested. The
URI <em title="must" class="rfc2119">must</em> conform to the URI
for Media Fragment[<cite><a href="#bib-MEDIA-FRAGMENTS"
rel="biblioentry" class="bibref">MEDIA-FRAGMENTS</a></cite>]
specification. This parameter is optional.</td>
</tr>
<tr>
<td class="prmName">sourceFormat</td>
<td class="prmType"><code><a>DOMString</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptTrue">✔</td>
<td class="prmDesc">This argument identifies a specific metadata
format. It <em title="should" class="rfc2119">should</em> use the
<a
href="http://www.w3.org/TR/mediaont-10/#formats-in-scope">metadata
format identifiers</a> defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media
Resources 1.0</a> specification. If a metadata format is defined,
only the metadata available in the corresponding metadata format
is retrieved. This parameter is optional.</td>
</tr>
<tr>
<td class="prmName">language</td>
<td class="prmType"><code><a>DOMString</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptTrue">✔</td>
<td class="prmDesc">This argument allows to identify the language
of the metadata. Values for the metadata will only be returned if
it is available in the specified language. Recommended best
practice is to use BCP 47 [<cite><a href="#bib-BCP47"
rel="biblioentry" class="bibref">BCP47</a></cite>]. This
parameter is optional.</td>
</tr>
</tbody>
</table>
<div>
<em>No exceptions.</em></div>
<div>
<em>Return type: </em><code><a class="idlType"
href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a>[]</code></div>
</dd>
<dt
id="widl-SyncMediaResource-getOriginalMetadata-DOMString-DOMString-sourceFormat"><code>getOriginalMetadata</code></dt>
<dd>This operation allows retrieval of the original metadata according to
the specified source format in a synchronous manner. The operation
returns a <code>DOMString</code> array holding the status code of the
request at the first and the original metadata at the second position. An
example can be found <a
href="#example-getOriginalMetadata-sync">here</a>.
<table class="parameters">
<tbody>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Nullable</th>
<th>Optional</th>
<th>Description</th>
</tr>
<tr>
<td class="prmName">sourceFormat</td>
<td class="prmType"><code><a>DOMString</a></code></td>
<td class="prmNullFalse">✘</td>
<td class="prmOptFalse">✘</td>
<td class="prmDesc">This argument identifies a specific metadata
format. It <em title="should" class="rfc2119">should</em> use the
<i><a
href="http://www.w3.org/TR/mediaont-10/#metadata-formats-in-scope">metadata
format identifiers</a></i> defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media
Resources 1.0</a> specification. If a metadata format is defined,
only the metadata available in the corresponding metadata format
is retrieved.</td>
</tr>
</tbody>
</table>
<div>
<em>No exceptions.</em></div>
<div>
<em>Return type: </em><code><a>DOMString</a>[]</code></div>
</dd>
</dl>
</div>
<div class="section" id="sync-api-examples-3">
<h4><span class="secno">4.3.2 </span>Examples in Javascript</h4>
<p class="note">The examples in this section use
<code>getMediaProperty()</code> to get an object implementing the
<code>MediaAnnotation</code> interface. The <code>noErrorStatus</code> function
ensures that no error is present and the requested properties carry values.</p>
<p>We give some JavaScript examples on how to use the synchronous
<code>MediaResource</code> interface and it's operations.</p>
<p id="example-getMediaProperty-sync">Example for synchronous
<code>getMediaProperty</code>:</p>
<pre class="example sh_javascript sh_sourceCode">syncMediaResource <span class="sh_symbol">=</span> mediaResource<span class="sh_symbol">.</span><span class="sh_function">createMediaResource</span><span class="sh_symbol">(</span><span class="sh_string">"http://www.imdb.com/title/tt0133152/"</span><span class="sh_symbol">,</span><br /> <span class="sh_keyword">new</span> <span class="sh_predef_func">Array</span><span class="sh_symbol">(),</span> <span class="sh_number">2</span><span class="sh_symbol">);</span>
title <span class="sh_symbol">=</span> syncMediaResource<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"title"</span><span class="sh_symbol">],</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">);</span>
<span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_function">noErrorStatus</span><span class="sh_symbol">(</span>title<span class="sh_symbol">[</span><span class="sh_number">0</span><span class="sh_symbol">].</span>statusCode<span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_keyword">true</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
<span class="sh_symbol">...</span>
<span class="sh_cbracket">}</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Title" : {</span>
<span class="sh_comment"> * "propertyName" : "title",</span>
<span class="sh_comment"> * "value" : "Planet of the apes",</span>
<span class="sh_comment"> * "language" : en-us",</span>
<span class="sh_comment"> * ...,</span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * },</span>
<span class="sh_comment"> * { "Title" : {</span>
<span class="sh_comment"> * "propertyName" : "title",</span>
<span class="sh_comment"> * "value" : "Planet der Affen",</span>
<span class="sh_comment"> * "language" : "de-de",</span>
<span class="sh_comment"> * ...,</span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * },</span>
<span class="sh_comment"> * { ...</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span>
</pre>
<p id="example-getOriginalMetadata-sync">Example for synchronous
<code>getOriginalMetadata</code>:</p>
<pre class="example sh_javascript sh_sourceCode">syncMediaResource <span class="sh_symbol">=</span> mediaResource<span class="sh_symbol">.</span><span class="sh_function">createMediaResource</span><span class="sh_symbol">(</span>
<span class="sh_string">"http://www.w3.org/2008/WebVideo/Annotations/wiki/images/9/93/MAWG-Stockholm-20090626.JPG"</span><span class="sh_symbol">,</span><br /> <span class="sh_keyword">new</span> <span class="sh_predef_func">Array</span><span class="sh_symbol">(),</span> <span class="sh_number">2</span><span class="sh_symbol">);</span>
dcMetadata <span class="sh_symbol">=</span> syncMediaResource<span class="sh_symbol">.</span><span class="sh_function">getOriginalMetadata</span><span class="sh_symbol">(</span><span class="sh_string">"DC"</span><span class="sh_symbol">);</span>
<span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_function">noErrorStatus</span><span class="sh_symbol">(</span>dcMetadata<span class="sh_symbol">[</span><span class="sh_number">0</span><span class="sh_symbol">].</span>statusCode<span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_keyword">true</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
<span class="sh_symbol">...</span>
<span class="sh_cbracket">}</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "statusCode" : 200</span>
<span class="sh_comment"> * },</span>
<span class="sh_comment"> * {"originalMetadata" : "</span><span class="sh_keyword"><metadata</span> <span class="sh_type">xmlns</span><span class="sh_symbol">=</span><span class="sh_type">\</span><span class="sh_string">"http://example.org/myapp/\"</span>
<span class="sh_string"> * xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance \"</span>
<span class="sh_string"> * xsi:schemaLocation=\"http://example.org/myapp/ http://example.org/myapp/schema.xsd\"</span>
<span class="sh_string"> * xmlns:dc=\"http://purl.org/dc/elements/1.1/\"></span>
<span class="sh_string"> * <dc:title>DC title</dc:title></span>
<span class="sh_string"> * </metadata>"</span>
<span class="sh_type">*</span><span class="sh_normal"> </span><span class="sh_type">}</span><span class="sh_normal"> </span><span class="sh_type">]</span>
<span class="sh_type">*/</span></pre>
</div>
</div>
<div class="section" id="maobject-interface">
<h3><span class="secno">4.4 </span><code>MediaAnnotation</code> interface</h3>
<p><code>MediaAnnotation</code> interface is used as the return type of
<code>MediaResource.getMediaProperty</code> operation. It is a container to
hold general values about properties enabling an iteration over a set of
different properties. Depending on the requested property, this interface will
be enlarged by more specific attributes.</p>
<p>As several properties are complex types, specific derived types of
<code>MediaAnnotation</code> have been defined, added these properties with the
appropriate types. However, <code>MediaAnnotation</code> can be used as a
generic return type to access a printable string representation of the property
(in the <code>value</code> attribute). It also includes a status code. In case
of general errors, the first element of the returned
<code>MediaAnnotation</code> array contains the global error code, otherwise
the status can be given for each of the returned properties.</p>
<p>The following design considerations have been used for specifying the
derived types for each of the properties:</p>
<p></p>
<ul>
<li>For all properties, an interface is derived from
<code>MediaAnnotation</code>, adding typed attributes according to the
specification in the ontology document.</li>
<li>This API <em title="must" class="rfc2119">must</em> fill
<code>value</code> with a printable string representation, it is
recommended to follow these steps:
<ul>
<li>use a name/label if present</li>
<li>for a URI
<ul>
<li>if a URI identifies a value known by this API, use the
appropriate label</li>
<li>dereference a URI to obtain a label, if possible</li>
<li>return the URI</li>
</ul>
</li>
<li>create a string from the values of the set of attributes (e.g.
numeric values)</li>
</ul>
</li>
<li>This approach possibly duplicates in <code>value</code> a string that is
found in another attribute. This is considered an acceptable amount of
redundancy for the benefit of having a generic value field for all
properties that can be used regardless of the specific property and data
type of the attributes.</li>
<li>If an attribute has type <code>URI|string</code>, the interface shall
have two attributes, one with "Link" and one with "Label" appended to the
attribute name, representing the URI and string respectively</li>
<li>For consistency, this approach is also followed if the property has only
a single attribute.</li>
<li>This approach allows for user extensions by deriving from
<code>MediaAnnotation</code> or one of the derived interfaces for one of
the properties.</li>
</ul>
<pre class="idl"><span class="idlInterface" id="idl-def-MediaAnnotation">interface <span class="idlInterfaceID">MediaAnnotation</span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MediaAnnotation-propertyName">propertyName</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MediaAnnotation-value">value</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MediaAnnotation-language">language</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MediaAnnotation-sourceFormat">sourceFormat</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MediaAnnotation-fragmentIdentifier">fragmentIdentifier</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MediaAnnotation-mappingType">mappingType</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>short</a></span> <span class="idlAttrName"><a href="#widl-MediaAnnotation-statusCode">statusCode</a></span>;</span>
};</span></pre>
<div class="section" id="attributes">
<h4><span class="secno">4.4.1 </span>Attributes</h4>
<dl class="attributes">
<dt
id="widl-MediaAnnotation-fragmentIdentifier"><code>fragmentIdentifier</code>
of type <span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute <em title="should" class="rfc2119">should</em> be an URI
determining the fragment for which the metadata is relevant.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-MediaAnnotation-language"><code>language</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute <em title="should" class="rfc2119">should</em> hold the
language of the metadata. The attribute is empty if language is not
applicable for a specific property. Recommended best practice is to use
BCP 47 [<cite><a href="#bib-BCP47" rel="biblioentry"
class="bibref">BCP47</a></cite>].
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-MediaAnnotation-mappingType"><code>mappingType</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This 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>. The value of this attribute <em
title="should" class="rfc2119">should</em> be one of the mapping
characteristics.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-MediaAnnotation-propertyName"><code>propertyName</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>The name of the property <em title="must" class="rfc2119">must</em> be
specified and <em title="should" class="rfc2119">should</em> correspond
to the property names defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources
1.0</a> specification.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-MediaAnnotation-sourceFormat"><code>sourceFormat</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute allows to specify the metadata source from which the
metadata was retrieved. It <em title="should" class="rfc2119">should</em>
use the <i><a
href="http://www.w3.org/TR/mediaont-10/#formats-in-scope">metadata format
identifiers</a></i> defined in the<a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources
1.0</a> specification.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-MediaAnnotation-statusCode"><code>statusCode</code> of type
<span class="idlAttrType"><a>short</a></span></dt>
<dd>This attribute <em title="must" class="rfc2119">must</em> specify the
<a href="#api-status-codes">status code</a> for the associated property
(e.g., 264 indicating a structured return value).
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-MediaAnnotation-value"><code>value</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute <em title="must" class="rfc2119">must</em> be filled
with an printable string representation.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript">
<h4><span class="secno">4.4.2 </span>Example in JavaScript</h4>
<p class="note">The <code>noErrorStatus</code> function ensures that no error
is present and the requested properties carry values. The
<code>MediaAnnotation</code> interface will be never instantiated - only the
implementing subtypes will be created. These <em title="must"
class="rfc2119">must</em> be filled at least with the parameters specified in
the <code>MediaAnnotation</code> interface and <em title="may"
class="rfc2119">may</em> be filled with the specific attributes.</p>
<pre class="example sh_javascript sh_sourceCode">mediaAnnotation <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"title"</span><span class="sh_symbol">],</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">);</span>
<span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_function">noErrorStatus</span><span class="sh_symbol">(</span>mediaAnnotation<span class="sh_symbol">[</span><span class="sh_number">0</span><span class="sh_symbol">].</span>statusCode<span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_keyword">true</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
<span class="sh_symbol">...</span>
<span class="sh_cbracket">}</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Title" : {</span>
<span class="sh_comment"> * "propertyName" : "title",</span>
<span class="sh_comment"> * "value" : "Gone with the Wind",</span>
<span class="sh_comment"> * "language" : "en-us",</span>
<span class="sh_comment"> * "sourceFormat" : "mpeg7",</span>
<span class="sh_comment"> * "fragmentIdentifier" : "</span><span class="sh_url">http://www.example.com/video.ogv#t=10,20</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "mappingType" : "Exact match",</span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span></pre>
</div>
</div>
<div class="section" id="Properties">
<h3><span class="secno">4.5 </span>Properties</h3>
<p>This section describes the different properties that can be requested
through the <code>MediaResource.getMediaProperty()</code> operation. When
invoking this operation, objects implementing the <code>MediaAnnotation</code>
interface are returned that represent the specified property. All properties
are represented with an interface inherited from the
<code>MediaAnnotation</code> interface (following the design guidelines
described above).</p>
<p>Several of the following return type interfaces can hold the value of the
property as both URI (i.e., a pointer to a controlled vocabulary) or as free
text. The URI is preferred, and the respective attribute of the return value
shall be filled whenever possible (i.e., when the information is included in or
can be constructed from the source metadata).</p>
<p class="note">In the following, for each property, a (synchronous) JavaScript
example illustrates the usage of the property specific attributes. In any case,
the genereal attributes of the <code>MediaAnnotation</code> interface could be
also requested.</p>
<div class="section" id="identification-interface">
<h4><span class="secno">4.5.1 </span>Identification Properties</h4>
<!-- ########## IDENTIFIER ########## -->
<div class="section" id="identifier">
<h5><span class="secno">4.5.1.1 </span>Identifier</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "identifier" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Identifier</code> interface is returned
representing the <i>identifier</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Identifier">interface <span class="idlInterfaceID">Identifier</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Identifier-identifierLink">identifierLink</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-1">
<h6><span class="secno">4.5.1.1.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Identifier-identifierLink"><code>identifierLink</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute holds a URI identifying the media resource.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-1">
<h6><span class="secno">4.5.1.1.2 </span>Example in JavaScript</h6>
<pre class="example sh_javascript sh_sourceCode">id <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"identifier"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Identifier" : {</span>
<span class="sh_comment"> * "propertyName" : "identifier",</span>
<span class="sh_comment"> * "identifierLink" : "urn:uuid:36a87260-1102-11df-8a39-0800200c9a66", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="title-1">
<h5><span class="secno">4.5.1.2 </span>Title</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "title" as a value of the <code>propertyName</code> parameter, an object
implementing the <code>Title</code> interface is returned representing the
<i>title</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Title">interface <span class="idlInterfaceID">Title</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Title-titleLabel">titleLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Title-typeLink">typeLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Title-typeLabel">typeLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-2">
<h6><span class="secno">4.5.1.2.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Title-titleLabel"><code>titleLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute hold the title as a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Title-typeLabel"><code>typeLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute holds the type of the title as a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Title-typeLink"><code>typeLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute holds the type of the title as a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-2">
<h6><span class="secno">4.5.1.2.2 </span>Example in JavaScript</h6>
<pre class="example sh_javascript sh_sourceCode">title <span class="sh_symbol">=</span> song<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"title"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Title" : {</span>
<span class="sh_comment"> * "propertyName" : "title",</span>
<span class="sh_comment"> * "titleLabel" : "Artificial Horizon" ,</span>
<span class="sh_comment"> * "typeLink" : "</span><span class="sh_url">http://www.ebu.ch/metadata/cs/ebu_ObjectTypeCodeCS.xml#21</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "typeLabel" : "Album title",</span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="language">
<h5><span class="secno">4.5.1.3 </span>Language</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "language" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Language</code> interface is returned
representing the <i>language</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Language">interface <span class="idlInterfaceID">Language</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Language-languageLink">languageLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Language-languageLabel">languageLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-3">
<h6><span class="secno">4.5.1.3.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Language-languageLabel"><code>languageLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the language of the media resource as a plain
string, which can be filtered on in the <code>getMediaProperty</code>
operation. Recommended best practice is to use BCP 47 [<cite><a
href="#bib-BCP47" rel="biblioentry" class="bibref">BCP47</a></cite>].
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Language-languageLink"><code>languageLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the language of the media resource as a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-3">
<h6><span class="secno">4.5.1.3.2 </span>Example in JavaScript</h6>
<pre class="example sh_javascript sh_sourceCode">language <span class="sh_symbol">=</span> video<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"language"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Language" : {</span>
<span class="sh_comment"> * "propertyName" : "language",</span>
<span class="sh_comment"> * "languageLabel" : "en-us", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="locator">
<h5><span class="secno">4.5.1.4 </span>Locator</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "locator" as a value of the <code>propertyName</code> parameter, an object
implementing the <code>Locator</code> interface is returned representing the
<i>locator</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Locator">interface <span class="idlInterfaceID">Locator</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Locator-locatorLink">locatorLink</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-4">
<h6><span class="secno">4.5.1.4.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Locator-locatorLink"><code>locatorLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute specifies the location of the media resource by a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-4">
<h6><span class="secno">4.5.1.4.2 </span>Example in JavaScript</h6>
<pre class="example sh_javascript sh_sourceCode">locator <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"locator"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Locator" : {</span>
<span class="sh_comment"> * "propertyName" : "locator",</span>
<span class="sh_comment"> * "locatorLink" : "</span><span class="sh_url">http://www.w3.org/2008/WebVideo/Annotations/wiki/images/9/93/MAWG-Stockholm-20090626.JPG</span><span class="sh_comment">", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
</div>
<div class="section" id="creation-properties">
<h4><span class="secno">4.5.2 </span>Creation Properties</h4>
<div class="section" id="contributor">
<h5><span class="secno">4.5.2.1 </span>Contributor</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "contributor" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Contributor</code> interface is returned
representing the <i>contributor</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Contributor">interface <span class="idlInterfaceID">Contributor</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Contributor-contributorLink">contributorLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Contributor-contributorLabel">contributorLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Contributor-roleLink">roleLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Contributor-roleLabel">roleLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-5">
<h6><span class="secno">4.5.2.1.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Contributor-contributorLabel"><code>contributorLabel</code> of
type <span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the contributor (i.e., the agent making the
contribution) as a plain string
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Contributor-contributorLink"><code>contributorLink</code> of
type <span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the contributor (i.e., the agent making the
contribution) as a URI.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Contributor-roleLabel"><code>roleLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the role of the contributor as a plain
string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Contributor-roleLink"><code>roleLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the role of the contributor as URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-5">
<h6><span class="secno">4.5.2.1.2 </span>Example in JavaScript</h6>
<pre class="example sh_javascript sh_sourceCode">contributor <span class="sh_symbol">=</span> video<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"contributor"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Contributor" : {</span>
<span class="sh_comment"> * "propertyName" : "contributor",</span>
<span class="sh_comment"> * "contributorLink" : "</span><span class="sh_url">http://en.wikipedia.org/wiki/Tim_Burton</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "contributorLabel" : "Tim Burton",</span>
<span class="sh_comment"> * "roleLink" : "</span><span class="sh_url">http://www.imdb.com/name/nm0000318/</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "roleLabel" : "director", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="creator">
<h5><span class="secno">4.5.2.2 </span>Creator</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "creator" as a value of the <code>propertyName</code> parameter, an object
implementing the <code>Creator</code> interface is returned representing the
<i>creator</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Creator">interface <span class="idlInterfaceID">Creator</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Creator-creatorLink">creatorLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Creator-creatorLabel">creatorLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Creator-roleLink">roleLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Creator-roleLabel">roleLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-6">
<h6><span class="secno">4.5.2.2.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Creator-creatorLabel"><code>creatorLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the creator (i.e., the agent participating in
the creation of the media resource) as a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Creator-creatorLink"><code>creatorLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the creator (i.e., the agent participating in
the creation of the media resource) as a URI.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Creator-roleLabel"><code>roleLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the role of the creator as a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Creator-roleLink"><code>roleLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the role of the creator as URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-6">
<h6><span class="secno">4.5.2.2.2 </span>Example in JavaScript</h6>
<pre class="example sh_javascript sh_sourceCode">creator <span class="sh_symbol">=</span> video<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"creator"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Creator" : {</span>
<span class="sh_comment"> * "propertyName" : "creator",</span>
<span class="sh_comment"> * "creatorLink" : "</span><span class="sh_url">http://dbpedia.org/resource/William_Shakespeare</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "creatorLabel" : "William Shakespeare",</span>
<span class="sh_comment"> * "roleLink" : "</span><span class="sh_url">http://www.ebu.ch/metadata/cs/ebu_RoleCodeCS.xml#22.5</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "roleLabel" : "playwright", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="madate">
<h5><span class="secno">4.5.2.3 </span>MADate</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "date" as a value of the <code>propertyName</code> parameter, an object
implementing the <code>Date</code> interface is returned representing the
<i>date</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification). This property has been renamed from "Date" into "MADate" since
the appearance of naming conflicts is possible in web applications.</p>
<pre class="idl"><span class="idlInterface" id="idl-def-MADate">interface <span class="idlInterfaceID">MADate</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MADate-date">date</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MADate-typeLink">typeLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MADate-typeLabel">typeLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-7">
<h6><span class="secno">4.5.2.3.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-MADate-date"><code>date</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents date related to the media resource. A date
value <em title="must" class="rfc2119">must</em> be represented using one
of the specific date/time data types of XML Schema, depending on the
available precision: gYear gYearMonth, date, dateTime, or dateTimeStamp.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-MADate-typeLabel"><code>typeLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute defines the category of date (e.g. creation date,
broadcast date, release date, date recorded and date edited) as a plain
string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-MADate-typeLink"><code>typeLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute defines the category of date (e.g. creation date,
broadcast date, release date, date recorded and date edited) as a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-7">
<h6><span class="secno">4.5.2.3.2 </span>Example in JavaScript</h6>
<pre class="example sh_javascript sh_sourceCode">maDate <span class="sh_symbol">=</span> video<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"date"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "MADate" : {</span>
<span class="sh_comment"> * "propertyName" : "date",</span>
<span class="sh_comment"> * "date": "2009-06-26T15:30:00",</span>
<span class="sh_comment"> * "typeLink" : "urn:smpte:ul:06.0E.2B.34.01.01.01.02.07.02.01.10.02.03.00.00",</span>
<span class="sh_comment"> * "typeLabel" : "modification date",</span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="location">
<h5><span class="secno">4.5.2.4 </span>Location </h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "location" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Location</code> interface is returned
representing the <i>location</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Location">interface <span class="idlInterfaceID">Location</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Location-locationLink">locationLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Location-locationLabel">locationLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-Location-longitude">longitude</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-Location-latitude">latitude</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-Location-altitude">altitude</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Location-coordinateSystemLabel">coordinateSystemLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Location-coordinateSystemLink">coordinateSystemLink</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-8">
<h6><span class="secno">4.5.2.4.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Location-altitude"><code>altitude</code> of type <span
class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute holds the altitude of the location, w.r.t. the
coordinate system specified by the <code>coordiateSystem</code> attribute
(default is WGS84).
<div>
<em>No exceptions.</em></div>
</dd>
<dt
id="widl-Location-coordinateSystemLabel"><code>coordinateSystemLabel</code>
of type <span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identified the coordinate system used by its name.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Location-coordinateSystemLink"><code>coordinateSystemLink</code>
of type <span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identified the coordinate system used by a URI.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Location-latitude"><code>latitude</code> of type <span
class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute holds the latitude of the location, w.r.t. the
coordinate system specified by the <code>coordiateSystem</code> attribute
(default is WGS84).
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Location-locationLabel"><code>locationLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the location by its name as a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Location-locationLink"><code>locationLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the location as a URI.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Location-longitude"><code>longitude</code> of type <span
class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute holds the longitude of the location, w.r.t. the
coordinate system specified by the <code>coordiateSystem</code> attribute
(default is WGS84).
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-8">
<h6><span class="secno">4.5.2.4.2 </span>Example in JavaScript</h6>
<pre class="example sh_javascript sh_sourceCode">location <span class="sh_symbol">=</span> video<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"location"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Location" : {</span>
<span class="sh_comment"> * "propertyName" : "location",</span>
<span class="sh_comment"> * "locationLink" : "</span><span class="sh_url">http://en.wikipedia.org/wiki/San_Jose,_California</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "locationLabel" : "San Jose",</span>
<span class="sh_comment"> * "longitude" : 37.33986481118008,</span>
<span class="sh_comment"> * "latitude" : -121.88507080078125,</span>
<span class="sh_comment"> * "altitude" : 0,</span>
<span class="sh_comment"> * "coordinateSystemLabel" : "WGS84",</span>
<span class="sh_comment"> * "coordinateSystemLink" : "</span><span class="sh_url">http://www.w3.org/2003/01/geo/wgs84_pos#Point</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
</div>
<div class="section" id="content-properties">
<h4><span class="secno">4.5.3 </span>Content Properties</h4>
<div class="section" id="description">
<h5><span class="secno">4.5.3.1 </span>Description</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "description" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Description</code> interface is returned
representing the <i>description</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Description">interface <span class="idlInterfaceID">Description</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Description-descriptionLabel">descriptionLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-9">
<h6><span class="secno">4.5.3.1.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Description-descriptionLabel"><code>descriptionLabel</code> of
type <span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute contains a description of the content of the media
resource.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-9">
<h6><span class="secno">4.5.3.1.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">description <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"description"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Description" : {</span>
<span class="sh_comment"> * "propertyName" : "description",</span>
<span class="sh_comment"> * "descriptionLabel" : "Group picture of the W3C MAWG at the F2F meeting in Stockholm.",</span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="keyword">
<h5><span class="secno">4.5.3.2 </span>Keyword </h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "keyword" as a value of the <code>propertyName</code> parameter, an object
implementing the <code>Keyword</code> interface is returned representing the
<i>keyword</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Keyword">interface <span class="idlInterfaceID">Keyword</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Keyword-keywordLabel">keywordLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Keyword-keywordLink">keywordLink</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-10">
<h6><span class="secno">4.5.3.2.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Keyword-keywordLabel"><code>keywordLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute contains a keyword describing the content as a plain
string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Keyword-keywordLink"><code>keywordLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute contains a URI representing a keyword describing the
content.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-10">
<h6><span class="secno">4.5.3.2.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">keyword <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"keyword"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Keyword" : {</span>
<span class="sh_comment"> * "propertyName" : "keyword",</span>
<span class="sh_comment"> * "keywordLabel" : "meeting with people from outside the organisation",</span>
<span class="sh_comment"> * "keywordLink" : "</span><span class="sh_url">http://sw.opencyc.org/2008/06/10/concept/en/MeetingWithOrganizationalOutsiders</span><span class="sh_comment">", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * }, </span>
<span class="sh_comment"> * { "Keyword" : {</span>
<span class="sh_comment"> * "propertyName" : "keyword",</span>
<span class="sh_comment"> * "keywordLabel" : "standardisation",</span>
<span class="sh_comment"> * "keywordLink" : "</span><span class="sh_url">http://purl.org/vocabularies/princeton/wn30/synset-standardization-noun-1</span><span class="sh_comment">", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="genre">
<h5><span class="secno">4.5.3.3 </span>Genre</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "genre" as a value of the <code>propertyName</code> parameter, an object
implementing the <code>Genre</code> interface is returned representing the
<i>genre</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Genre">interface <span class="idlInterfaceID">Genre</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Genre-genreLabel">genreLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Genre-genreLink">genreLink</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-11">
<h6><span class="secno">4.5.3.3.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Genre-genreLabel"><code>genreLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the genre of the media resource as a plain
string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Genre-genreLink"><code>genreLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the genre of the media resource as a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-11">
<h6><span class="secno">4.5.3.3.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">genre <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"genre"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Genre" : {</span>
<span class="sh_comment"> * "propertyName" : "genre",</span>
<span class="sh_comment"> * "genreLabel" : "Sports",</span>
<span class="sh_comment"> * "genreLink" : "</span><span class="sh_url">http://www.ebu.ch/metadata/cs/ebu_ContentGenreCS.xml#3.1.1.9</span><span class="sh_comment">" </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="rating">
<h5><span class="secno">4.5.3.4 </span>Rating</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "rating" as a value of the <code>propertyName</code> parameter, an object
implementing the <code>Rating</code> interface is returned representing the
<i>rating</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Rating">interface <span class="idlInterfaceID">Rating</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-Rating-ratingValue">ratingValue</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Rating-ratingSystemLabel">ratingSystemLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Rating-ratingSystemLink">ratingSystemLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-Rating-minimum">minimum</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-Rating-maximum">maximum</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-12">
<h6><span class="secno">4.5.3.4.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Rating-maximum"><code>maximum</code> of type <span
class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute specifies the maximum rating value in the rating system.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Rating-minimum"><code>minimum</code> of type <span
class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute specifies the minimum rating value in the rating system.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Rating-ratingSystemLabel"><code>ratingSystemLabel</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the rating system by a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Rating-ratingSystemLink"><code>ratingSystemLink</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the rating system as a URI.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Rating-ratingValue"><code>ratingValue</code> of type <span
class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute contains the value of the rating.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-12">
<h6><span class="secno">4.5.3.4.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">rating <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"rating"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Rating" : {</span>
<span class="sh_comment"> * "propertyName" : "rating",</span>
<span class="sh_comment"> * "ratingValue" : 10.0,</span>
<span class="sh_comment"> * "ratingSystemLabel" : "John Doe",</span>
<span class="sh_comment"> * "ratingSystemLink" : "</span><span class="sh_url">http://individuals.example.com/JohnDoe</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "minimum" : 0,</span>
<span class="sh_comment"> * "maximum" : 10.0, </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
</div>
<div class="section" id="relational-properties">
<h4><span class="secno">4.5.4 </span>Relational Properties</h4>
<div class="section" id="relation">
<h5><span class="secno">4.5.4.1 </span>Relation</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "relation" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Relation</code> interface is returned
representing the <i>relation</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Relation">interface <span class="idlInterfaceID">Relation</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Relation-targetLink">targetLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Relation-targetLabel">targetLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Relation-typeLink">typeLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Relation-typeLabel">typeLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-13">
<h6><span class="secno">4.5.4.1.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Relation-targetLabel"><code>targetLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the related resource by a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Relation-targetLink"><code>targetLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the related resource by a URI.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Relation-typeLabel"><code>typeLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute specifies the type of relationship by a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Relation-typeLink"><code>typeLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute specifies the type of relationship by a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-13">
<h6><span class="secno">4.5.4.1.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">relation <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"relation"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Relation" : {</span>
<span class="sh_comment"> * "propertyName" : "relation",</span>
<span class="sh_comment"> * "targetLink" : "</span><span class="sh_url">http://www.w3.org/2008/WebVideo/Annotations/wiki/Image:MAWG-Stockholm-20090626_thumb.JPG</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "targetLabel" : "Group picture of MAWG in Stockholm",</span>
<span class="sh_comment"> * "typeLink" : "</span><span class="sh_url">http://www.ebu.ch/metadata/cs/ebu_HowRelatedCS.xml#19</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "typeLabel" : "thumbnail", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="collection">
<h5><span class="secno">4.5.4.2 </span>Collection</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "collection" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Collection</code> interface is returned
representing the <i>collection</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Collection">interface <span class="idlInterfaceID">Collection</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Collection-collectionLink">collectionLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Collection-collectionLabel">collectionLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-14">
<h6><span class="secno">4.5.4.2.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Collection-collectionLabel"><code>collectionLabel</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute holds the name of the collection from which the media
resource originates as a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Collection-collectionLink"><code>collectionLink</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute holds the name of the collection from which the media
resource originates as URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-14">
<h6><span class="secno">4.5.4.2.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">collection <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"collection"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Collection" : {</span>
<span class="sh_comment"> * "propertyName" : "collection",</span>
<span class="sh_comment"> * "collectionLink" : "</span><span class="sh_url">http://individuals.example.com/JohnDoe/myWorkPictures/</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "collectionLabel" : "My Work Pictures", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
</div>
<div class="section" id="rights-properties">
<h4><span class="secno">4.5.5 </span>Rights Properties</h4>
<div class="section" id="copyright">
<h5><span class="secno">4.5.5.1 </span>Copyright</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "copyright" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Copyright</code> interface is returned
representing the <i>copyright</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Copyright">interface <span class="idlInterfaceID">Copyright</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Copyright-copyrightLabel">copyrightLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Copyright-holderLabel">holderLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Copyright-holderLink">holderLink</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-15">
<h6><span class="secno">4.5.5.1.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Copyright-copyrightLabel"><code>copyrightLabel</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute contains the copyright statement as a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Copyright-holderLabel"><code>holderLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the copyright holder by a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Copyright-holderLink"><code>holderLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identified the copyright holder by a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-15">
<h6><span class="secno">4.5.5.1.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">copyright <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"copyright"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Copyright" : {</span>
<span class="sh_comment"> * "propertyName" : "copyright",</span>
<span class="sh_comment"> * "copyrightLabel" : "All images in the collection are copyrighted by John Doe.",</span>
<span class="sh_comment"> * "holderLabel" : "John Doe",</span>
<span class="sh_comment"> * "holderLink" : "</span><span class="sh_url">http://individuals.example.com/JohnDoe</span><span class="sh_comment">", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="policy">
<h5><span class="secno">4.5.5.2 </span>Policy</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "policy" as a value of the <code>propertyName</code> parameter, an object
implementing the <code>Policy</code> interface is returned representing the
<i>policy</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Policy">interface <span class="idlInterfaceID">Policy</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Policy-statementLink">statementLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Policy-statementLabel">statementLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Policy-typeLink">typeLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Policy-typeLabel">typeLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-16">
<h6><span class="secno">4.5.5.2.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Policy-statementLabel"><code>statementLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute contains a plain string of the policy statement.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Policy-statementLink"><code>statementLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute contains a URI of the policy statement.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Policy-typeLabel"><code>typeLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the type of the policy as a URI as a plain
string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Policy-typeLink"><code>typeLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the type of the policy as a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-16">
<h6><span class="secno">4.5.5.2.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">policy <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"policy"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Policy" : {</span>
<span class="sh_comment"> * "propertyName" : "policy",</span>
<span class="sh_comment"> * "statementLink" : "</span><span class="sh_url">http://creativecommons.org/licenses/by/2.5/</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "statementLabel" : "Attribution 2.5 Generic (CC BY 2.5)",</span>
<span class="sh_comment"> * "typeLabel" : "license", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
</div>
<div class="section" id="distribution-properties">
<h4><span class="secno">4.5.6 </span>Distribution Properties</h4>
<div class="section" id="publisher">
<h5><span class="secno">4.5.6.1 </span>Publisher</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "publisher" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Publisher</code> interface is returned
representing the <i>publisher</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Publisher">interface <span class="idlInterfaceID">Publisher</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Publisher-publisherLink">publisherLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Publisher-publisherLabel">publisherLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-17">
<h6><span class="secno">4.5.6.1.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Publisher-publisherLabel"><code>publisherLabel</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the publisher as a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Publisher-publisherLink"><code>publisherLink</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the publisher as a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-17">
<h6><span class="secno">4.5.6.1.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">publisher <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"publisher"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Publisher" : {</span>
<span class="sh_comment"> * "propertyName" : "publisher",</span>
<span class="sh_comment"> * "publisherLabel" : "ACME",</span>
<span class="sh_comment"> * "publisherLink" : "</span><span class="sh_url">http://company.example.com/ACME</span><span class="sh_comment">", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="targetaudience">
<h5><span class="secno">4.5.6.2 </span>TargetAudience</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "targetAudience" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>TargetAudience</code> interface is returned
representing the <i>targetAudience</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-TargetAudience">interface <span class="idlInterfaceID">TargetAudience</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-TargetAudience-audienceLink">audienceLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-TargetAudience-audienceLabel">audienceLabel</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-TargetAudience-classificationSystemLink">classificationSystemLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-TargetAudience-classificationSystemLabel">classificationSystemLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-18">
<h6><span class="secno">4.5.6.2.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-TargetAudience-audienceLabel"><code>audienceLabel</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the target audience by a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-TargetAudience-audienceLink"><code>audienceLink</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the target audience by a URI.
<div>
<em>No exceptions.</em></div>
</dd>
<dt
id="widl-TargetAudience-classificationSystemLabel"><code>classificationSystemLabel</code>
of type <span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute specifies the classification system by a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt
id="widl-TargetAudience-classificationSystemLink"><code>classificationSystemLink</code>
of type <span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute specifies the classification system by a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-18">
<h6><span class="secno">4.5.6.2.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">targetAudience <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"targetAudience"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "TargetAudience" : {</span>
<span class="sh_comment"> * "propertyName" : "targetAudience",</span>
<span class="sh_comment"> * "audienceLink" : "</span><span class="sh_url">http://www.mpaa.org/ratings/what-each-rating-means#NC-17</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "audienceLabel" : "No One 17 and Under Admitted",</span>
<span class="sh_comment"> * "classificationSystemLink" : "</span><span class="sh_url">http://www.mpaa.org/ratings</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "classificationSystemLabel" : "MPAA", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
</div>
<div class="section" id="fragments-properties">
<h4><span class="secno">4.5.7 </span>Fragments Properties</h4>
<div class="section" id="fragment">
<h5><span class="secno">4.5.7.1 </span>Fragment</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "fragment" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Fragment</code> interface is returned
representing the <i>fragment</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Fragment">interface <span class="idlInterfaceID">Fragment</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Fragment-identifier">identifier</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Fragment-roleLink">roleLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Fragment-roleLabel">roleLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-19">
<h6><span class="secno">4.5.7.1.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Fragment-identifier"><code>identifier</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the fragment as Media Fragment URI (temporal,
spatial or track).
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Fragment-roleLabel"><code>roleLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the role of the fragment as a plain string,
which can be filtered on in the <code>getMediaProperty</code> operation.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Fragment-roleLink"><code>roleLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the role of the fragment as a URI, which can
be filtered on in the <code>getMediaProperty</code> operation.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-19">
<h6><span class="secno">4.5.7.1.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">fragment <span class="sh_symbol">=</span> movie<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"fragment"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Fragment" : {</span>
<span class="sh_comment"> * "propertyName" : "fragment",</span>
<span class="sh_comment"> * "identifier" : "</span><span class="sh_url">http://www.example.com/video.ogv#t=10,20</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "roleLabel" : "chapter", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="namedfragment">
<h5><span class="secno">4.5.7.2 </span>NamedFragment</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "namedFragment" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>NamedFragment</code> interface is returned
representing the <i>namedFragment</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-NamedFragment">interface <span class="idlInterfaceID">NamedFragment</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-NamedFragment-identifier">identifier</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-NamedFragment-label">label</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-20">
<h6><span class="secno">4.5.7.2.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-NamedFragment-identifier"><code>identifier</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies a named fragment by a Media Fragment URI.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-NamedFragment-label"><code>label</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute contains a plain text label of a named media fragment,
which can be used to contruct a Media Fragment URI fro a named fragment.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-20">
<h6><span class="secno">4.5.7.2.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">namedFragment <span class="sh_symbol">=</span> movie<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"namedFragment"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "NamedFragment" : {</span>
<span class="sh_comment"> * "propertyName" : "namedFragment",</span>
<span class="sh_comment"> * "identifier" : "</span><span class="sh_url">http://www.example.com/video.ogv#t=30,35</span><span class="sh_comment">",</span>
<span class="sh_comment"> * "label" : "kissScene",</span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
</div>
<div class="section" id="technical-interface">
<h4><span class="secno">4.5.8 </span>Technical Properties</h4>
<div class="section" id="framesize">
<h5><span class="secno">4.5.8.1 </span>FrameSize</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "frameSize" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>FrameSize</code> interface is returned
representing the <i>frameSize</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-FrameSize">interface <span class="idlInterfaceID">FrameSize</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-FrameSize-width">width</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-FrameSize-height">height</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-FrameSize-unit">unit</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-21">
<h6><span class="secno">4.5.8.1.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-FrameSize-height"><code>height</code> of type <span
class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute represents the height of the frame.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-FrameSize-unit"><code>unit</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute represents the unit of the frame width/height. The
default value is pixels.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-FrameSize-width"><code>width</code> of type <span
class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute represents the width of the frame.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-21">
<h6><span class="secno">4.5.8.1.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">frameSize <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"frameSize"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "FrameSize" : {</span>
<span class="sh_comment"> * "propertyName" : "framesize",</span>
<span class="sh_comment"> * "width" : 3072,</span>
<span class="sh_comment"> * "height" : 2304,</span>
<span class="sh_comment"> * "unit" : "pixels", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="compression">
<h5><span class="secno">4.5.8.2 </span>Compression</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "compression" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Compression</code> interface is returned
representing the <i>compression</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-FrameSize-2">interface <span class="idlInterfaceID">FrameSize</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-FrameSize-compressionLink">compressionLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-FrameSize-compressionLabel">compressionLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-22">
<h6><span class="secno">4.5.8.2.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-FrameSize-compressionLabel"><code>compressionLabel</code> of
type <span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute specifies the compression type of the media resource as
a plain string.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-FrameSize-compressionLink"><code>compressionLink</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute specifies the compression type of the media resource by
a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-22">
<h6><span class="secno">4.5.8.2.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">compression <span class="sh_symbol">=</span> video<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"compression"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Compression" : {</span>
<span class="sh_comment"> * "propertyName" : "compression",</span>
<span class="sh_comment"> * "compressionLabel" : "H.264/AVC",</span>
<span class="sh_comment"> * "compressionLink" : "urn:example-org:codingnames2010#ITU-H264", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="duration">
<h5><span class="secno">4.5.8.3 </span>Duration</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "duration" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>Duration</code> interface is returned
representing the <i>duration</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Duration">interface <span class="idlInterfaceID">Duration</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-Duration-duration">duration</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-23">
<h6><span class="secno">4.5.8.3.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Duration-duration"><code>duration</code> of type <span
class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute represents the duration of the media resource (in
seconds) as an double value.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-23">
<h6><span class="secno">4.5.8.3.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">duration <span class="sh_symbol">=</span> video<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"duration"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Duration" : {</span>
<span class="sh_comment"> * "propertyName" : "duration",</span>
<span class="sh_comment"> * "duration" : 3600, </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="format">
<h5><span class="secno">4.5.8.4 </span>Format</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "format" as a value of the <code>propertyName</code> parameter, an object
implementing the <code>Format</code> interface is returned representing the
<i>format</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Format">interface <span class="idlInterfaceID">Format</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Format-formatLink">formatLink</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Format-formatLabel">formatLabel</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-24">
<h6><span class="secno">4.5.8.4.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-Format-formatLabel"><code>formatLabel</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute specifies the MIME type of the media resource.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-Format-formatLink"><code>formatLink</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute identifies the MIME type of the media resource by a URI.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-24">
<h6><span class="secno">4.5.8.4.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">format <span class="sh_symbol">=</span> image<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"format"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Format" : {</span>
<span class="sh_comment"> * "propertyName" : "format",</span>
<span class="sh_comment"> * "formatLabel" : "image/jpeg",</span>
<span class="sh_comment"> * "formatLink" : "</span><span class="sh_url">http://dbpedia.org/resource/JPEG</span><span class="sh_comment">", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="samplingrate">
<h5><span class="secno">4.5.8.5 </span>SamplingRate</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "samplingRate" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>SamplingRate</code> interface is returned
representing the <i>samplingRate</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-SamplingRate">interface <span class="idlInterfaceID">SamplingRate</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-SamplingRate-samplingRate">samplingRate</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-25">
<h6><span class="secno">4.5.8.5.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-SamplingRate-samplingRate"><code>samplingRate</code> of type
<span class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute specifies the samplingrate (in Hz) as a double.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-25">
<h6><span class="secno">4.5.8.5.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">samplingrate <span class="sh_symbol">=</span> audio<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"samplingRate"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "SamplingRate" : {</span>
<span class="sh_comment"> * "propertyName" : "samplingRate",</span>
<span class="sh_comment"> * "samplingRate" : 44100, </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="framerate">
<h5><span class="secno">4.5.8.6 </span>FrameRate</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "frameRate" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>FrameRate</code> interface is returned
representing the <i>frameRate</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-FrameRate">interface <span class="idlInterfaceID">FrameRate</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-FrameRate-frameRate">frameRate</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-26">
<h6><span class="secno">4.5.8.6.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-FrameRate-frameRate"><code>frameRate</code> of type <span
class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute specifies the framerate (in fps) as a double value.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-26">
<h6><span class="secno">4.5.8.6.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">framerate <span class="sh_symbol">=</span> video<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"frameRate"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "FrameRate" : {</span>
<span class="sh_comment"> * "propertyName" : "frameRate",</span>
<span class="sh_comment"> * "frameRate" : 30, </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="averagebitrate">
<h5><span class="secno">4.5.8.7 </span>AverageBitRate</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "averageBitRate" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>AverageBitRate</code> interface is returned
representing the <i>averageBitRate</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-AverageBitRate">interface <span class="idlInterfaceID">AverageBitRate</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>double</a></span> <span class="idlAttrName"><a href="#widl-AverageBitRate-averageBitRate">averageBitRate</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-27">
<h6><span class="secno">4.5.8.7.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-AverageBitRate-averageBitRate"><code>averageBitRate</code> of
type <span class="idlAttrType"><a>double</a></span></dt>
<dd>This attribute specifies the average bitrate (in kbps) as a double
value.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-27">
<h6><span class="secno">4.5.8.7.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">bitrate <span class="sh_symbol">=</span> video<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"averageBitRate"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "AverageBitRate" : {</span>
<span class="sh_comment"> * "propertyName" : "averageBitRate",</span>
<span class="sh_comment"> * "averageBitRate" : 45.06, </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<div class="section" id="numtracks">
<h5><span class="secno">4.5.8.8 </span>NumTracks</h5>
<p>When the <code>MediaResource.getMediaProperty</code> operation is invoked
with "numTracks" as a value of the <code>propertyName</code> parameter, an
object implementing the <code>NumTracks</code> interface is returned
representing the <i>numTracks</i> property (defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources 1.0</a>
specification).</p>
<pre class="idl"><span class="idlInterface" id="idl-def-NumTracks">interface <span class="idlInterfaceID">NumTracks</span> : <span class="idlSuperclass"><a class="idlType" href="#idl-def-MediaAnnotation"><code>MediaAnnotation</code></a></span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>short</a></span> <span class="idlAttrName"><a href="#widl-NumTracks-number">number</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-NumTracks-typeString">typeString</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-28">
<h6><span class="secno">4.5.8.8.1 </span>Attributes</h6>
<dl class="attributes">
<dt id="widl-NumTracks-number"><code>number</code> of type <span
class="idlAttrType"><a>short</a></span></dt>
<dd>This attribute specifies the number of tracks as an integer value.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-NumTracks-typeString"><code>typeString</code> of type <span
class="idlAttrType"><a>DOMString</a></span></dt>
<dd>This attribute specifies the type of the tracks that are counted as a
plain string (e.g., audio, subtitle).
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="example-in-javascript-28">
<h6><span class="secno">4.5.8.8.2 </span>Example in Javascript</h6>
<pre class="example sh_javascript sh_sourceCode">numTracks <span class="sh_symbol">=</span> video<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"numTracks"</span><span class="sh_symbol">]);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "NumTracks" : {</span>
<span class="sh_comment"> * "propertyName" : "numTracks",</span>
<span class="sh_comment"> * "number" : 2,</span>
<span class="sh_comment"> * "typeString" : "audio", </span>
<span class="sh_comment"> * "statusCode" : 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
</div>
</div>
<div class="section" id="masource-interface">
<h3><span class="secno">4.6 </span><code>MetadataSource</code> interface</h3>
<p><code>MetadataSource</code> interface is used to identify other metadata
sources.</p>
<pre class="idl"><span class="idlInterface" id="idl-def-MetadataSource">interface <span class="idlInterfaceID">MetadataSource</span> {
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MetadataSource-metadataSource">metadataSource</a></span>;</span>
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-MetadataSource-sourceFormat">sourceFormat</a></span>;</span>
};</span></pre>
<div class="section" id="attributes-29">
<h4><span class="secno">4.6.1 </span>Attributes</h4>
<dl class="attributes">
<dt id="widl-MetadataSource-metadataSource"><code>metadataSource</code> of
type <span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>An URI identifying the metadata source.
<div>
<em>No exceptions.</em></div>
</dd>
<dt id="widl-MetadataSource-sourceFormat"><code>sourceFormat</code> of type
<span class="idlAttrType"><a>DOMString</a></span></dt>
<dd>The name of the actual metadata format. It <em title="should"
class="rfc2119">should</em> use the <i><a
href="http://www.w3.org/TR/mediaont-10/#metadata-formats-in-scope">metadata
format identifiers</a></i> defined in the <a
href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources
1.0</a> specification.
<div>
<em>No exceptions.</em></div>
</dd>
</dl>
</div>
<div class="section" id="sync-api-examples-4">
<h4><span class="secno">4.6.2 </span>Examples in Javascript</h4>
<pre class="example sh_javascript sh_sourceCode">metadataSources <span class="sh_symbol">=</span> <span class="sh_keyword">new</span> <span class="sh_function">MetadataSource</span><span class="sh_symbol">(</span><span class="sh_string">"http://www.w3.org/2008/WebVideo/Annotations/drafts/metadata_formats/DC_example1.xml"</span><span class="sh_symbol">,</span><span class="sh_string">"dc"</span><span class="sh_symbol">);</span></pre>
</div>
</div>
<div class="section" id="api-status-codes">
<h3><span class="secno">4.7 </span>API Status Codes</h3>
<p>This section introduces a set of status codes for the defined API to
indicate the system behavior. It uses a subset of the <cite>HTML/1.1 [<cite><a
href="#bib-HTTP11" rel="biblioentry" class="bibref">HTTP11</a></cite>] status
codes</cite> for general information (e.g., bad request), but also system
specific information (e.g., property not defined in source format). This choice
was made because developers are familiar with these status codes and it does
not imply any specific link with HTTP. The specific status codes have been
arranged in the <cite>HTML/1.1 [<cite><a href="#bib-HTTP11" rel="biblioentry"
class="bibref">HTTP11</a></cite>] status codes</cite> categories.</p>
<p class="note">Later versions of this document may include additional status
codes or other changes. The numerical code range for the system specific status
codes start with x62 (x = number of <cite>HTML/1.1 [<cite><a href="#bib-HTTP11"
rel="biblioentry" class="bibref">HTTP11</a></cite>] status codes</cite>
category and 62 = MA).</p>
<table border="1" width="100%">
<tbody>
<tr class="ro-header">
<th class="col-mawg" align="center">Numerical Code</th>
<th class="col-mawg" align="center">Textual Description</th>
<th class="col-mawg" align="center">Example</th>
</tr>
<tr class="ro-even">
<td>200</td>
<td>OK</td>
<td>property delivered correctly</td>
</tr>
<tr class="ro-odd">
<td>204</td>
<td>No Content</td>
<td>property retrieved without content</td>
</tr>
<tr class="ro-even">
<td>206</td>
<td>Partial Content</td>
<td>only a subset of the available data stored in the result set</td>
</tr>
<tr class="ro-odd">
<td>400</td>
<td>Bad Request</td>
<td>syntactical error with respect to the GET method used</td>
</tr>
<tr class="ro-even">
<td>404</td>
<td>Not Found</td>
<td>the queries resource is not found</td>
</tr>
<tr class="ro-odd">
<td>415</td>
<td>Unsupported Media Type</td>
<td>get duration call on an image data store</td>
</tr>
<tr class="ro-even">
<td>462</td>
<td>Property not defined in Source Format</td>
<td>location is not defined in MediaRSS</td>
</tr>
<tr class="ro-odd">
<td>500</td>
<td>Internal Server Error</td>
<td>internal library (e.g., extractor) crashes</td>
</tr>
<tr class="ro-even">
<td>501</td>
<td>Not Implemented</td>
<td>only a subset of GET methods for properties implemented</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="usage-examples">
<h2><span class="secno">5. </span>Usage examples</h2>
<div class="section" id="usage-js">
<h3><span class="secno">5.1 </span>Usage as JavaScript API</h3>
<p>This part illustrates some examples how to use this API using JavaScript in
actual implementations. Moreover, in these examples it is assumed that the
implementation of this API knows where to find the metadata that corresponds to
a specific media resource (if necessary the location of the metadata can be
configured by the use of the <code>MetadataSource</code> interface). The
implementation should provide the <a
href="http://www.w3.org/TR/mediaont-10/#property-mapping-table">mappings of
different metadata formats</a> to the <a
href="http://www.w3.org/TR/mediaont-10/#core-property-lists">core
properties</a> of the <a href="http://www.w3.org/TR/mediaont-10/">Ontology for
Media Resources 1.0</a> specification.</p>
<dl>
<dt>Example 1: Return the name of the director of the movie "Apocalypse now".
</dt>
<dd><pre class="example sh_javascript sh_sourceCode"><span class="sh_comment">//search the video array for the one with title "Apocalypse now" </span>
<span class="sh_keyword">for</span> <span class="sh_symbol">(</span><span class="sh_keyword">var</span> i <span class="sh_symbol">=</span> <span class="sh_number">0</span><span class="sh_symbol">;</span> i <span class="sh_symbol"><</span> mediaResourceVideoArray<span class="sh_symbol">.</span>length<span class="sh_symbol">;</span> i<span class="sh_symbol">++)</span> <span class="sh_cbracket">{</span>
<span class="sh_comment">//request for the titles of the video, the variable "titles"</span>
<span class="sh_comment">//will be filled with an array of MediaAnnotation objects. </span>
titles <span class="sh_symbol">=</span> mediaResourceVideoArray<span class="sh_symbol">[</span>i<span class="sh_symbol">].</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"title"</span><span class="sh_symbol">],</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">);</span>
<span class="sh_comment">//check if the request is finished correctly</span>
<span class="sh_keyword">if</span> <span class="sh_symbol">(</span><span class="sh_function">noErrorStatus</span><span class="sh_symbol">(</span>titles<span class="sh_symbol">[</span><span class="sh_number">0</span><span class="sh_symbol">].</span>statusCode<span class="sh_symbol">)</span> <span class="sh_symbol">==</span> <span class="sh_keyword">true</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
<span class="sh_keyword">for</span> <span class="sh_symbol">(</span><span class="sh_keyword">var</span> j <span class="sh_symbol">=</span> <span class="sh_number">0</span><span class="sh_symbol">;</span> j <span class="sh_symbol"><</span> titles<span class="sh_symbol">.</span>length<span class="sh_symbol">;</span> j<span class="sh_symbol">++)</span> <span class="sh_cbracket">{</span>
<span class="sh_comment">//check if the title matches </span>
<span class="sh_keyword">if</span> <span class="sh_symbol">(</span>titles<span class="sh_symbol">[</span>j<span class="sh_symbol">].</span>titleLabel <span class="sh_symbol">==</span> <span class="sh_string">"Apocalypse Now"</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
<span class="sh_comment">//request for the director of the video, the variable "results" </span>
<span class="sh_comment">//will be filled with an array of MediaAnnotation objects. </span>
tempResults <span class="sh_symbol">=</span> mediaResourceVideoArray<span class="sh_symbol">[</span>i<span class="sh_symbol">].</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"contributor"</span><span class="sh_symbol">],</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">);</span>
<span class="sh_keyword">for</span> <span class="sh_symbol">(</span><span class="sh_keyword">var</span> k <span class="sh_symbol">=</span> <span class="sh_number">0</span><span class="sh_symbol">;</span> k <span class="sh_symbol"><</span> tempResults<span class="sh_symbol">.</span>length<span class="sh_symbol">;</span> k<span class="sh_symbol">++)</span> <span class="sh_cbracket">{</span>
<span class="sh_keyword">if</span> <span class="sh_symbol">(</span>tempResults<span class="sh_symbol">[</span>i<span class="sh_symbol">].</span>roleLabel <span class="sh_symbol">==</span> <span class="sh_string">"director"</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
result <span class="sh_symbol">=</span> tempResults<span class="sh_symbol">[</span>i<span class="sh_symbol">];</span>
<span class="sh_keyword">break</span><span class="sh_symbol">;</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Contributor" : {</span>
<span class="sh_comment"> * "propertyName" : "contributor",</span>
<span class="sh_comment"> * "value" : "Francis Ford Coppola",</span>
<span class="sh_comment"> * ..., </span>
<span class="sh_comment"> * "statusCode" = 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span> </pre>
</dd>
<dt>Example 2: Retrieve the title of the second song from the album "Joshua
Tree" by U2. </dt>
<dd><pre class="example sh_javascript sh_sourceCode"><span class="sh_comment">//get the id of the second song using the fragments property </span>
tracks <span class="sh_symbol">=</span> albumMediaResource<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"fragment"</span><span class="sh_symbol">],</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">);</span>
trackIdentifier <span class="sh_symbol">=</span> tracks<span class="sh_symbol">[</span><span class="sh_number">1</span><span class="sh_symbol">].</span>identifier<span class="sh_symbol">;</span>
<span class="sh_comment">//use this identifier to get the mediaResource object that represents the track </span>
mediaResource <span class="sh_symbol">=</span> <span class="sh_keyword">new</span> <span class="sh_function">MediaResource</span><span class="sh_symbol">();</span>
<span class="sh_keyword">if</span> <span class="sh_symbol">(</span>mediaResource<span class="sh_symbol">.</span><span class="sh_function">getSupportedModes</span><span class="sh_symbol">()</span> <span class="sh_symbol">==</span> <span class="sh_number">2</span> <span class="sh_symbol">||</span> mediaResource<span class="sh_symbol">.</span><span class="sh_function">getSupportedModes</span><span class="sh_symbol">()</span> <span class="sh_symbol">==</span> <span class="sh_number">3</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span>
syncMediaResource <span class="sh_symbol">=</span> mediaResource<span class="sh_symbol">.</span><span class="sh_function">createMediaResource</span><span class="sh_symbol">(</span>trackIdentifier<span class="sh_symbol">,</span> <span class="sh_keyword">new</span> <span class="sh_predef_func">Array</span><span class="sh_symbol">(),</span> <span class="sh_number">2</span><span class="sh_symbol">);</span>
<span class="sh_cbracket">}</span>
<span class="sh_comment">//get the title of the track </span>
title <span class="sh_symbol">=</span> syncMediaResource<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"title"</span><span class="sh_symbol">],</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">);</span>
<span class="sh_comment">/** Resulting in:</span>
<span class="sh_comment"> * [ { "Title" : {</span>
<span class="sh_comment"> * "propertyName" : "title",</span>
<span class="sh_comment"> * "value" : "I Still Haven't Found What I'm Looking For",</span>
<span class="sh_comment"> * ..., </span>
<span class="sh_comment"> * "statusCode" = 200 </span>
<span class="sh_comment"> * } </span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</dd>
<dt>Example 3: Return the genre of the movie "Apocalypse Now".</dt>
<dd><pre class="example sh_javascript sh_sourceCode">genre <span class="sh_symbol">=</span> movie<span class="sh_symbol">.</span><span class="sh_function">getMediaProperty</span><span class="sh_symbol">([</span><span class="sh_string">"genre"</span><span class="sh_symbol">],</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">""</span><span class="sh_symbol">,</span> <span class="sh_string">"en-us"</span><span class="sh_symbol">);</span>
<span class="sh_comment">/** Resulting in: </span>
<span class="sh_comment"> * [ { "Genre" : {</span>
<span class="sh_comment"> * "propertyName" : "genre",</span>
<span class="sh_comment"> * "value" : "Action",</span>
<span class="sh_comment"> * ..., </span>
<span class="sh_comment"> * "statusCode" = 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * },</span>
<span class="sh_comment"> * { "Genre" : {</span>
<span class="sh_comment"> * "propertyName" : "genre",</span>
<span class="sh_comment"> * "value" : "Drama",</span>
<span class="sh_comment"> * ..., </span>
<span class="sh_comment"> * "statusCode" = 200</span>
<span class="sh_comment"> * }</span>
<span class="sh_comment"> * },</span>
<span class="sh_comment"> * { ...</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</dd>
</dl>
</div>
<div class="section" id="usage-examples-web-service">
<h3><span class="secno">5.2 </span>Usage as Web Service</h3>
<p>This part illustrates how this API could be implemented using web services.
Note that, Web IDL currently does not provide bindings for web services. The
given examples correspond to the examples given in <a
href="#Properties">Section 4.5</a> for each property.</p>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?getOriginalMetadata=DC</p>
</li>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_string">"200"</span> <span class="sh_cbracket">}</span><span class="sh_symbol">,</span>
<span class="sh_cbracket">{</span><span class="sh_string">"originalMetadata"</span> <span class="sh_symbol">:</span> <span class="sh_string">"<?xml version=</span><span class="sh_specialchar">\"</span><span class="sh_string">1.0</span><span class="sh_specialchar">\"</span><span class="sh_string">?><metadata</span>
<span class="sh_string"> xmlns=</span><span class="sh_specialchar">\"</span><span class="sh_string">http://example.org/myapp/</span><span class="sh_specialchar">\"</span><span class="sh_string"> xmlns:xsi=</span><span class="sh_specialchar">\"</span><span class="sh_string">http://www.w3.org/2001/XMLSchema-instance </span><span class="sh_specialchar">\"</span>
<span class="sh_string"> xsi:schemaLocation=</span><span class="sh_specialchar">\"</span><span class="sh_string">http://example.org/myapp/ http://example.org/myapp/schema.xsd</span><span class="sh_specialchar">\"</span>
<span class="sh_string"> xmlns:dc=</span><span class="sh_specialchar">\"</span><span class="sh_string">http://purl.org/dc/elements/1.1/</span><span class="sh_specialchar">\"</span><span class="sh_string">><dc:title>DC title</dc:title></metadata>"</span><span class="sh_cbracket">}</span>
<span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<p>The following examples illustrate how to request values for the different
properties.</p>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=identifier</p>
</li>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Identifier"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"identifier"</span><span class="sh_symbol">,</span>
<span class="sh_string">"identifierLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"urn:uuid:36a87260-1102-11df-8a39-0800200c9a66"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=title</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Title"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"title"</span><span class="sh_symbol">,</span>
<span class="sh_string">"value"</span> <span class="sh_symbol">:</span> <span class="sh_string">"Artificial Horizon"</span><span class="sh_symbol">,</span>
<span class="sh_string">"typeLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.ebu.ch/metadata/cs/ebu_ObjectTypeCodeCS.xml#21"</span><span class="sh_symbol">,</span>
<span class="sh_string">"typeLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"Album title"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=language</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Language"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"language"</span><span class="sh_symbol">,</span>
<span class="sh_string">"languageLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"en-us"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=locator</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Locator"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"locator"</span><span class="sh_symbol">,</span>
<span class="sh_string">"locatorLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.w3.org/2008/WebVideo/Annotations/wiki/images/9/93/MAWG-Stockholm-20090626.JPG"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=contributor</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Contributor"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"contributor"</span><span class="sh_symbol">,</span>
<span class="sh_string">"contributorLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://en.wikipedia.org/wiki/Tim_Burton"</span><span class="sh_symbol">,</span>
<span class="sh_string">"contributorLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"Tim Burton"</span><span class="sh_symbol">,</span>
<span class="sh_string">"roleLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.imdb.com/name/nm0000318/"</span><span class="sh_symbol">,</span>
<span class="sh_string">"roleLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"director"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=creator</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Creator"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"creator"</span><span class="sh_symbol">,</span>
<span class="sh_string">"creatorLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://dbpedia.org/resource/William_Shakespeare"</span><span class="sh_symbol">,</span>
<span class="sh_string">"creatorLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"William Shakespeare"</span><span class="sh_symbol">,</span>
<span class="sh_string">"roleLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.ebu.ch/metadata/cs/ebu_RoleCodeCS.xml#22.5"</span><span class="sh_symbol">,</span>
<span class="sh_string">"roleLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"playwright"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=date</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"MADate"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"date"</span><span class="sh_symbol">,</span>
<span class="sh_string">"date"</span><span class="sh_symbol">:</span> <span class="sh_string">"2009-06-26T15:30:00"</span><span class="sh_symbol">,</span>
<span class="sh_string">"typeLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"urn:smpte:ul:06.0E.2B.34.01.01.01.02.07.02.01.10.02.03.00.00"</span><span class="sh_symbol">,</span>
<span class="sh_string">"typeLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"modification date"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=location</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Location"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"location"</span><span class="sh_symbol">,</span>
<span class="sh_string">"locationLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://en.wikipedia.org/wiki/San_Jose,_California"</span><span class="sh_symbol">,</span>
<span class="sh_string">"locationLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"San Jose"</span><span class="sh_symbol">,</span>
<span class="sh_string">"longitude"</span> <span class="sh_symbol">:</span> <span class="sh_number">37.33986481118008</span><span class="sh_symbol">,</span>
<span class="sh_string">"latitude"</span> <span class="sh_symbol">:</span> <span class="sh_symbol">-</span><span class="sh_number">121.88507080078125</span><span class="sh_symbol">,</span>
<span class="sh_string">"altitude"</span> <span class="sh_symbol">:</span> <span class="sh_number">0</span><span class="sh_symbol">,</span>
<span class="sh_string">"coordinateSystemLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"WGS84"</span><span class="sh_symbol">,</span>
<span class="sh_string">"coordinateSystemLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.w3.org/2003/01/geo/wgs84_pos#Point"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=description</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Description"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"description"</span><span class="sh_symbol">,</span>
<span class="sh_string">"descriptionLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"Group picture of the W3C MAWG at the F2F meeting in Stockholm."</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=keyword</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Keyword"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"keyword"</span><span class="sh_symbol">,</span>
<span class="sh_string">"keywordLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"meeting with people from outside the organisation"</span><span class="sh_symbol">,</span>
<span class="sh_string">"keywordLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://sw.opencyc.org/2008/06/10/concept/en/MeetingWithOrganizationalOutsiders"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span><span class="sh_symbol">,</span>
<span class="sh_cbracket">{</span> <span class="sh_string">"Keyword"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"keyword"</span><span class="sh_symbol">,</span>
<span class="sh_string">"keywordLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"standardisation"</span><span class="sh_symbol">,</span>
<span class="sh_string">"keywordLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://purl.org/vocabularies/princeton/wn30/synset-standardization-noun-1
"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=genre</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Genre"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"genre"</span><span class="sh_symbol">,</span>
<span class="sh_string">"genreLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"Sports"</span><span class="sh_symbol">,</span>
<span class="sh_string">"genreLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.ebu.ch/metadata/cs/ebu_ContentGenreCS.xml#3.1.1.9"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=rating</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Rating"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"rating"</span><span class="sh_symbol">,</span>
<span class="sh_string">"ratingValue"</span> <span class="sh_symbol">:</span> <span class="sh_number">10.0</span><span class="sh_symbol">,</span>
<span class="sh_string">"ratingSystemLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"John Doe"</span><span class="sh_symbol">,</span>
<span class="sh_string">"ratingSystemLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://individuals.example.com/JohnDoe"</span><span class="sh_symbol">,</span>
<span class="sh_string">"minimum"</span> <span class="sh_symbol">:</span> <span class="sh_number">0</span><span class="sh_symbol">,</span>
<span class="sh_string">"maximum"</span> <span class="sh_symbol">:</span> <span class="sh_number">10.0</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=relation</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Relation"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"relation"</span><span class="sh_symbol">,</span>
<span class="sh_string">"targetLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.w3.org/2008/WebVideo/Annotations/wiki/Image:MAWG-Stockholm-20090626_thumb.JPG"</span><span class="sh_symbol">,</span>
<span class="sh_string">"targetLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"Group picture of MAWG in Stockholm"</span><span class="sh_symbol">,</span>
<span class="sh_string">"typeLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.ebu.ch/metadata/cs/ebu_HowRelatedCS.xml#19"</span><span class="sh_symbol">,</span>
<span class="sh_string">"typeLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"thumbnail"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=collection</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Collection"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"collection"</span><span class="sh_symbol">,</span>
<span class="sh_string">"collectionLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://individuals.example.com/JohnDoe/myWorkPictures/"</span><span class="sh_symbol">,</span>
<span class="sh_string">"collectionLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"My Work Pictures"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=copyright</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Copyright"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"copyright"</span><span class="sh_symbol">,</span>
<span class="sh_string">"copyrightLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"All images in the collection are copyrighted by John Doe."</span><span class="sh_symbol">,</span>
<span class="sh_string">"holderLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"John Doe"</span><span class="sh_symbol">,</span>
<span class="sh_string">"holderLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://individuals.example.com/JohnDoe"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=policy</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Policy"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"policy"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statementLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://creativecommons.org/licenses/by/2.5/"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statementLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"Attribution 2.5 Generic (CC BY 2.5)"</span><span class="sh_symbol">,</span>
<span class="sh_string">"typeLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"license"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=publisher</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Publisher"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"publisher"</span><span class="sh_symbol">,</span>
<span class="sh_string">"publisherLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"ACME"</span><span class="sh_symbol">,</span>
<span class="sh_string">"publisherLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://company.example.com/ACME"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=targetAudience</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"TargetAudience"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"targetAudience"</span><span class="sh_symbol">,</span>
<span class="sh_string">"audienceLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.mpaa.org/ratings/what-each-rating-means#NC-17"</span><span class="sh_symbol">,</span>
<span class="sh_string">"audienceLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"No One 17 and Under Admitted"</span><span class="sh_symbol">,</span>
<span class="sh_string">"classificationSystemLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.mpaa.org/ratings"</span><span class="sh_symbol">,</span>
<span class="sh_string">"classificationSystemLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"MPAA"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=fragment</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Fragment"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"fragment"</span><span class="sh_symbol">,</span>
<span class="sh_string">"identifier"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.example.com/video.ogv#t=10,20"</span><span class="sh_symbol">,</span>
<span class="sh_string">"roleLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"chapter"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=namedFragment</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"NamedFragment"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"namedFragment"</span><span class="sh_symbol">,</span>
<span class="sh_string">"label"</span> <span class="sh_symbol">:</span> <span class="sh_string">"kissScene"</span><span class="sh_symbol">,</span>
<span class="sh_string">"identifier"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://www.example.com/video.ogv#t=30,35"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=frameSize</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"FrameSize"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"framesize"</span><span class="sh_symbol">,</span>
<span class="sh_string">"width"</span> <span class="sh_symbol">:</span> <span class="sh_number">3072</span><span class="sh_symbol">,</span>
<span class="sh_string">"height"</span> <span class="sh_symbol">:</span> <span class="sh_number">2304</span><span class="sh_symbol">,</span>
<span class="sh_string">"unit"</span> <span class="sh_symbol">:</span> <span class="sh_string">"pixels"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=compression</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Compression"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"compression"</span><span class="sh_symbol">,</span>
<span class="sh_string">"compressionLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"H.264/AVC"</span><span class="sh_symbol">,</span>
<span class="sh_string">"urn:example-org:codingnames2010#ITU-H264"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=duration</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Duration"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"duration"</span><span class="sh_symbol">,</span>
<span class="sh_string">"duration"</span> <span class="sh_symbol">:</span> <span class="sh_number">3600</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=format</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"Format"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"format"</span><span class="sh_symbol">,</span>
<span class="sh_string">"formatLabel"</span> <span class="sh_symbol">:</span> <span class="sh_string">"image/jpeg"</span><span class="sh_symbol">,</span>
<span class="sh_string">"formatLink"</span> <span class="sh_symbol">:</span> <span class="sh_string">"http://dbpedia.org/resource/JPEG"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=samplingRate</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"SamplingRate"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"samplingRate"</span><span class="sh_symbol">,</span>
<span class="sh_string">"samplingRate"</span> <span class="sh_symbol">:</span> <span class="sh_number">44100</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=frameRate</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"FrameRate"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"frameRate"</span><span class="sh_symbol">,</span>
<span class="sh_string">"frameRate"</span> <span class="sh_symbol">:</span> <span class="sh_number">30</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=averageBitRate</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"AverageBitRate"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"averageBitRate"</span><span class="sh_symbol">,</span>
<span class="sh_string">"averageBitRate"</span> <span class="sh_symbol">:</span> <span class="sh_number">45.06</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
<ul>
<li><p>Request: http://example.com/my-media-resource/?ma-query=numTracks</p>
</li>
</ul>
<ul>
<li><p>Response (JSON format): </p>
<pre class="example sh_javascript sh_sourceCode"><span class="sh_symbol">[</span> <span class="sh_cbracket">{</span> <span class="sh_string">"NumTracks"</span> <span class="sh_symbol">:</span> <span class="sh_cbracket">{</span>
<span class="sh_string">"propertyName"</span> <span class="sh_symbol">:</span> <span class="sh_string">"numTracks"</span><span class="sh_symbol">,</span>
<span class="sh_string">"number"</span> <span class="sh_symbol">:</span> <span class="sh_number">2</span><span class="sh_symbol">,</span>
<span class="sh_string">"typeString"</span> <span class="sh_symbol">:</span> <span class="sh_string">"audio"</span><span class="sh_symbol">,</span>
<span class="sh_string">"statusCode"</span> <span class="sh_symbol">:</span> <span class="sh_number">200</span>
<span class="sh_cbracket">}</span>
<span class="sh_cbracket">}</span> <span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
</div>
</div>
<!-- ##########################################################
###############################################################
Section: SECURITY CONSIDERATIONS
###############################################################
########################################################### -->
<div class="section" id="security-considerations">
<!-- class="informative"-->
<!--OddPage-->
<h2><span class="secno">6. </span>Security Considerations</h2>
<!--p class="note">It is required to be considered in the perspectives of developer, user and content’s provider. This will be revised with more security issues.</p-->
<p>This specification defines a API to access metadata information related to
media resources on the Web. These APIs will provide means for requesting
metadata information, which can already be accessed in one or different
formats, either as separate document or embedded in media resources. As such,
this API introduces no additional security issue.</p>
<p>One should nevertheless note that some metadata could be used to access
personal information about someone without declaration of agreement. For
example, temporal and geographic information about a media resource could
indirectly provide information about its creator.</p>
<p>There are related activities and technical documents in W3C working on this
topics, such as Policy Requirements [<cite><a href="#bib-POLICY-REQS"
rel="biblioentry" class="bibref">POLICY-REQS</a></cite>] in DAP WG, ODRL 1.1
[<cite><a href="#bib-ODRL11" rel="biblioentry"
class="bibref">ODRL11</a></cite>], P3P 1.1 [<cite><a href="#bib-P3P11"
rel="biblioentry" class="bibref">P3P11</a></cite>] and PLING Wiki [<cite><a
href="#bib-PLING-WIKI" rel="biblioentry"
class="bibref">PLING-WIKI</a></cite>].</p>
</div>
<div class="appendix section" id="webidl-for-api">
<h2><span class="secno">A. </span>Web IDL description</h2>
<p>Follow <a
href="http://dev.w3.org/2008/video/mediaann/mediaont-api-1.0/mawg.idl">this
link</a> to download the WebIDL description as IDL file.</p>
<pre>module mawg {
interface MediaResource {
short getSupportedModes();
MediaResource createMediaResource(in DOMString mediaResource,
in optional MetadataSource[] metadataSources, in optional short mode);
};
interface AsyncMediaResource : MediaResource {
void getMediaProperty(in DOMString[] propertyNames, in PropertyCallback successCallback,
in ErrorCallback errorCallback, in optional DOMString fragment,
in optional DOMString sourceFormat, in optional DOMString language );
void getOriginalMetadata (in DOMString sourceFormat, in MetadataCallback successCallback,
in ErrorCallback errorCallback);
};
interface PropertyCallback {
void handleEvent (in MediaAnnotation[] mediaAnnotations);
};
interface MetadataCallback {
void handleEvent (in DOMString[] metadata);
};
interface ErrorCallback {
void handleEvent (in DOMString errorStatus);
};
interface SyncMediaResource : MediaResource {
MediaAnnotation[] getMediaProperty(in DOMString[] propertyNames,
in optional DOMString fragment, in optional DOMString sourceFormat,
in optional DOMString language);
DOMString[] getOriginalMetadata (in DOMString sourceFormat);
};
interface MetadataSource {
attribute DOMString metadataSource;
attribute DOMString sourceFormat;
};
interface MediaAnnotation {
attribute DOMString propertyName;
attribute DOMString value;
attribute DOMString language;
attribute DOMString sourceFormat;
attribute DOMString fragmentIdentifier;
attribute DOMString mappingType;
attribute short statusCode;
};
interface Identifier : MediaAnnotation {
attribute DOMString identifierLink;
};
interface Title : MediaAnnotation {
attribute DOMString titleLabel;
attribute DOMString typeLink;
attribute DOMString typeLabel;
};
interface Language : MediaAnnotation {
attribute DOMString languageLink;
attribute DOMString languageLabel;
};
interface Locator : MediaAnnotation {
attribute DOMString locatorLink;
};
interface Contributor : MediaAnnotation {
attribute DOMString contributorLink;
attribute DOMString contributorLabel;
attribute DOMString roleLink;
attribute DOMString roleLabel;
};
interface Creator : MediaAnnotation {
attribute DOMString creatorLink;
attribute DOMString creatorLabel;
attribute DOMString roleLink;
attribute DOMString roleLabel;
};
interface MADate : MediaAnnotation {
attribute DOMString date;
attribute DOMString typeLink;
attribute DOMString typeLabel;
};
interface Location : MediaAnnotation {
attribute DOMString locationLink;
attribute DOMString locationLabel;
attribute double longitude;
attribute double latitude;
attribute double altitude;
attribute DOMString coordinateSystemLabel;
attribute DOMString coordinateSystemLink;
};
interface Description : MediaAnnotation {
attribute DOMString descriptionLabel;
};
interface Keyword : MediaAnnotation {
attribute DOMString keywordLink;
attribute DOMString keywordLabel;
};
interface Genre : MediaAnnotation {
attribute DOMString genreLink;
attribute DOMString genreLabel;
};
interface Rating : MediaAnnotation {
attribute double ratingValue;
attribute DOMString ratingSystemLink;
attribute DOMString ratingSystemLabel;
attribute double min;
attribute double max;
};
interface Relation : MediaAnnotation {
attribute DOMString targetLink;
attribute DOMString targetLabel;
attribute DOMString typeLink;
attribute DOMString typeLabel;
};
interface Collection : MediaAnnotation {
attribute DOMString collectionLink;
attribute DOMString collectionLabel;
};
interface Copyright : MediaAnnotation {
attribute DOMString copyrightLabel;
attribute DOMString holderLink;
attribute DOMString holderLabel;
};
interface Policy : MediaAnnotation {
attribute DOMString statementLink;
attribute DOMString statementLabel;
attribute DOMString typeLink;
attribute DOMString typeLabel;
};
interface Publisher : MediaAnnotation {
attribute DOMString publisherLink;
attribute DOMString publisherLabel;
};
interface TargetAudience : MediaAnnotation {
attribute DOMString audienceLink;
attribute DOMString audienceLabel;
attribute DOMString classificationSystemLink;
attribute DOMString classificationSystemLabel;
};
interface Fragment : MediaAnnotation {
attribute DOMString identifier;
attribute DOMString roleLink;
attribute DOMString roleLabel;
};
interface NamedFragment : MediaAnnotation {
attribute DOMString identifier;
attribute DOMString label;
};
interface FrameSize : MediaAnnotation {
attribute double width;
attribute double height;
attribute DOMString unit;
};
interface Compression : MediaAnnotation {
attribute DOMString compressionLink;
attribute DOMString compressionLabel;
};
interface Duration : MediaAnnotation {
attribute double duration;
};
interface Format : MediaAnnotation {
attribute DOMString formatLink;
attribute DOMString formatLabel;
};
interface SamplingRate : MediaAnnotation {
attribute double samplingRate;
};
interface FrameRate : MediaAnnotation {
attribute double frameRate;
};
interface AverageBitRate : MediaAnnotation {
attribute double averageBitRate;
};
interface NumTracks : MediaAnnotation {
attribute short number;
attribute DOMString typeString;
};
};
</pre>
</div>
<div id="acknowledgements" class="appendix section">
<!--OddPage-->
<h2><span class="secno">C. </span>Acknowledgements</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 (JOANNEUM RESEARCH), Tobias Bürger
(University of Innsbruck), Eric Carlson (Apple, Inc.), Pierre-Antoine Champin
((public) Invited expert), Ashish Chawla ((public) Invited expert), Jaime
Delgado (Universitat Politècnica de Catalunya), Jean-Pierre Evain ((public)
Invited expert), Martin Höffernig (JOANNEUM RESEARCH), Philip Jägenstedt
(Opera Software), Ralf Klamma ((public) Invited expert), WonSuk Lee (Samsung
Electronics Co., Ltd.), 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), Victor
Rodríguez (Universitat Politècnica de Catalunya), Felix Sasaki (Potsdam
University of Applied Sciences), David Singer (Apple, Inc.), Florian Stegmaier
((public) Invited expert), John Strassner ((public) Invited expert), Joakim
Söderberg (ERICSSON), Mari Carmen Suárez-Figueroa ((public) Invited expert)
Thai Wey Then (Apple, Inc.), Ruben Tous (Universitat Politècnica de
Catalunya), Raphaël Troncy (EURECOM), 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 class="appendix section" id="references">
<!--OddPage-->
<h2><span class="secno">D. </span>References</h2>
<div class="section" id="normative-references">
<h3><span class="secno">D.1 </span>Normative references</h3>
<dl class="bibliography">
<dt id="bib-MEDIA-ANNOT-REQS">[MEDIA-ANNOT-REQS]</dt>
<dd>WonSuk Lee; Felix Sasaki; Tobias Bürger; Véronique Malaisé. <a
href="http://www.w3.org/TR/2010/WD-media-annot-reqs-20100121/"><cite>Use
Cases and Requirements for Ontology and API for Media Object
1.0.</cite></a>W3C Working Draft 21 January 2010. URL: <a
href="http://www.w3.org/TR/2010/WD-media-annot-reqs-20100121/">http://www.w3.org/TR/2010/WD-media-annot-reqs-20100121/</a>
</dd>
<dt id="bib-MEDIA-FRAGMENTS">[MEDIA-FRAGMENTS]</dt>
<dd>Raphael Troncy; Erik Mannens; Silvia Pfeiffer and Davy Van Deursen. <a
href="http://www.w3.org/TR/2011/WD-media-frags-20110317/"><cite>Media
Fragments URI 1.0</cite></a>. W3C Working Draft 17 March 2011. URL: <a
href="http://www.w3.org/TR/2011/WD-media-frags-20110317/">http://www.w3.org/TR/2011/WD-media-frags-20110317/</a>
</dd>
<dt id="bib-RFC2119">[RFC2119]</dt>
<dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
words for use in RFCs to Indicate Requirement Levels.</cite></a> March
1997. Internet RFC 2119. URL: <a
href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
</dd>
<dt id="bib-WEBIDL">[WEBIDL]</dt>
<dd>Cameron McCormack. <a
href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite>Web
IDL.</cite></a> 19 December 2008. W3C Working Draft. (Work in progress.)
URL: <a
href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">http://www.w3.org/TR/2008/WD-WebIDL-20081219</a>
</dd>
</dl>
</div>
<div class="section" id="informative-references">
<h3><span class="secno">D.2 </span>Informative references</h3>
<dl class="bibliography">
<dt id="bib-BCP47">[BCP47]</dt>
<dd>A. Phillips; M. Davis. <a
href="http://tools.ietf.org/html/bcp47"><cite>Tags for Identifying
Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a
href="http://tools.ietf.org/html/bcp47">http://tools.ietf.org/html/bcp47</a>
</dd>
<dt id="bib-HTTP11">[HTTP11]</dt>
<dd>R. Fielding; et al. <a
href="http://www.ietf.org/rfc/rfc2616.txt"><cite>Hypertext Transfer
Protocol - HTTP/1.1.</cite></a> June 1999. Internet RFC 2616. URL: <a
href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a>
</dd>
<dt id="bib-ODRL11">[ODRL11]</dt>
<dd>Renato Iannella. <a href="http://www.w3.org/TR/odrl"><cite>Open Digital
Rights Language (ODRL) Version 1.1.</cite></a> W3C Note. 19 September
2002. URL: <a
href="http://www.w3.org/TR/odrl">http://www.w3.org/TR/odrl</a> </dd>
<dt id="bib-P3P11">[P3P11]</dt>
<dd>Matthias Schunter; Rigo Wenning. <a
href="http://www.w3.org/TR/2006/NOTE-P3P11-20061113"><cite>The Platform
for Privacy Preferences 1.1 (P3P1.1) Specification.</cite></a> 13
November 2006. W3C Note. URL: <a
href="http://www.w3.org/TR/2006/NOTE-P3P11-20061113">http://www.w3.org/TR/2006/NOTE-P3P11-20061113</a>
</dd>
<dt id="bib-PLING-WIKI">[PLING-WIKI]</dt>
<dd>Policy Languages Interest Group (PLING). <a
href="http://www.w3.org/Policy/pling/"><cite>PLING Wiki.</cite></a> URL:
<a
href="http://www.w3.org/Policy/pling/">http://www.w3.org/Policy/pling/</a>
</dd>
<dt id="bib-POLICY-REQS">[POLICY-REQS]</dt>
<dd>Laura Arribas; Paddy Byers; Marcin Hanclik; Frederick Hirsch; David
Rogers. <a href="http://dev.w3.org/2009/dap/policy-reqs"><cite>Device API
Policy Requirements.</cite></a> 13 April 2010. W3C Editor's Draft. (Work
in progress.) URL: <a
href="http://dev.w3.org/2009/dap/policy-reqs/">http://dev.w3.org/2009/dap/policy-reqs/</a></dd>
</dl>
</div>
</div>
</body>
</html>