Another abandoned server code base... this is kind of an ancestor of taskrambler.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

4964 lines
276 KiB

<?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-CR.css" />
</head>
<body style="display: inherit;">
<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 class="title" id="title">API for Media Resources 1.0</h1>
<h2>W3C Candidate Recommendation 22 November 2011</h2>
<dl>
<dt>This version:</dt>
<dd><a
href="http://www.w3.org/TR/2011/CR-mediaont-api-1.0-20111122/">http://www.w3.org/TR/2011/CR-mediaont-api-1.0-20111122/</a></dd>
<dt>Latest published 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/2011/WD-mediaont-api-1.0-20110712/">http://www.w3.org/TR/2011/WD-mediaont-api-1.0-20110712/</a></dd>
<dt>Editors:</dt>
<dd><span>Florian Stegmaier</span>, University of Passau</dd>
<dd><span>이원석(Wonsuk Lee)</span>, Samsung Electronics, Ltd.</dd>
<dd><span>Chris Poppe</span>, Ghent University</dd>
<dd><span>Werner Bailer</span>, 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.eu/"><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>
<hr />
</div>
<!-- ##########################################################
###############################################################
Section: Abtract
###############################################################
########################################################### -->
<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 Candidate Recommendation of the API for Media Resources 1.0
specification. </p>
<p>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>. The Working Group expects to advance this
specification to <a
href="http://www.w3.org/2004/02/Process-20040205/tr.html#RecsW3C">Recommendation</a>
Status.</p>
<p>Please send review comments about this Candidate Recommendation to the
public mailing list <a
href="mailto:public-media-annotation@w3.org?subject=[CR Comment API]">public-media-annotation@w3.org</a>
mailing list (<a
href="http://lists.w3.org/Archives/Public/public-media-annotation/">public
archive</a>). Use "[CR Comment API]" in the subject line of your email. We
expect that sufficient feedback to determine its future will have been received
by 31 December 2011. This specification will remain a Candidate Recommendation
until at least 31 December 2011.</p>
<p>The Media Annotation Working Group will advance this specification to
Proposed Recommendation when the following exit criteria have been met: </p>
<p>1. Sufficient reports of implementation experience have been gathered to
demonstrate that the API features are implementable and are interpreted in a
consistent manner. To do so, the Working Group will insure that all features in
the API for Media Resources 1.0 specification have been implemented at least
twice in an interoperable way. The following elements are considered features
of the API and must be tested by the test suite:</p>
<ul>
<li>construction of MediaResource with one or more metadata sources and
querying of the supported modes</li>
<li>read access to the list of properties (single properties and sets of
properties, applying filters)</li>
<li>reading source metadata</li>
</ul>
<p>The API is designed for both client- and server side implementations.
Depending on whether the API is implemented in a user agent or plugin, or as a
web service, different communication patterns are more appropriate. In the
client side case, asynchronous access is typically preferred, while synchronous
access is more appropriate for a web service. Thus the two version of the
interface are not considered distinct features but different modes of access
for the different use cases.</p>
<p>2. The implementations have been developed independently.</p>
<p>3. The Working Group has adopted a <a
href="http://www.w3.org/2008/WebVideo/Annotations/drafts/API/testsuite.html">public
test suite</a> and has produced an <a
href="http://www.w3.org/2008/WebVideo/Annotations/drafts/API/implementation-report.html">implementation
report</a> for this API for Media Resources 1.0.</p>
<p></p>
<p>The Implementation results are publicly released and are intended solely to
be used as proof of Media API 1.0 implementability. It is only a snap shot of
the actual implementation behaviors at one moment of time, as these
implementations may not be immediately available to the public. The
interoperability data is not intended to be used for assessing or grading the
performance of any individual implementation. Any feedback on implementation
and use of this specification would be very welcome. To the extent possible,
please provide a separate email message for each distinct comment.</p>
<p>For convenience, the differences between this CR version and the <a
href="http://www.w3.org/TR/2011/WD-mediaont-api-1.0-20110712/">Second Last Call
Working Draft</a> are highlighted in the <a
href="http://www.w3.org/2008/WebVideo/Annotations/drafts/API10/CR/LC-diff-CR.html">CR
Diff file</a> and listed in the <a href="#change-log">change log in Annexe
B</a>.</p>
<p>This W3C Working Draft version of the API for Media Resources 1.0
specification incorporates requests for changes from comments sent during the
first and second Last Call Review, as agreed with the commenters (see <a
href="http://www.w3.org/2006/02/lc-comments-tracker/42786/WD-mediaont-api-1.0-20100608/doc/">Disposition
of Last Call comments for Ontology for Media Resources 1.0</a>) and changes
following implementation experiences from the Working Group.</p>
<p>Publication as a Candidate Recommendation 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 rel="disclosure"
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-examples1"><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-examples2"><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-examples3"><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-examples6"><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="#change-log"><span
class="secno">B. </span><span class="formerLink" id="changelog1">Change
log</span></a></li>
<li class="tocline"><a class="tocxref" href="#acknowledgements"><span
class="secno">C. </span>Acknowledgements</a></li>
<li class="tocline"><a class="tocxref" href="#references"><span
class="secno">D. </span>References</a>
<ul class="toc">
<li class="tocline"><a class="tocxref" href="#normative-references"><span
class="secno">D.1 </span>Normative references</a></li>
<li class="tocline"><a class="tocxref"
href="#informative-references"><span class="secno">D.2
</span>Informative references</a></li>
</ul>
</li>
</ul>
</div>
<!-- ##########################################################
###############################################################
Section: Introduction
###############################################################
########################################################### -->
<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>
<!-- ##########################################################
###############################################################
Section: Formats in scope ...
###############################################################
########################################################### -->
<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>
<!-- ##########################################################
###############################################################
Section: CONFORMANCE
###############################################################
########################################################### -->
<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>
<!-- ##########################################################
###############################################################
Section: DESIGN CONSIDERATION
###############################################################
########################################################### -->
<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 where calls return
without waiting for the request to finish its execution: a call-back function
is provided to be invoked when the request terminates. 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"
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>
<!-- ##########################################################
###############################################################
Section: API DESCRIPTION
###############################################################
########################################################### -->
<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>
<!-- ##########################################################
###############################################################
Section: MEDIA RESOURCE
###############################################################
########################################################### -->
<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"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">mediaResource</span></span>, <span class="idlParam">optional <span class="idlParamType"><a class="idlType" href="#idl-def-MetadataSource"><code>MetadataSource</code></a>[]</span> <span class="idlParamName">metadataSources</span></span>, <span class="idlParam">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-examples1">
<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>
<!-- ##########################################################
###############################################################
Section: ASYNCHRONOUS API
###############################################################
########################################################### -->
<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"><span class="idlParamType"><a>DOMString</a>[]</span> <span class="idlParamName">propertyNames</span></span>, <span class="idlParam"><span class="idlParamType"><a class="idlType" href="#idl-def-PropertyCallback"><code>PropertyCallback</code></a></span> <span class="idlParamName">successCallback</span></span>, <span class="idlParam"><span class="idlParamType"><a>ErrorCallback</a></span> <span class="idlParamName">errorCallback</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">fragment</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">sourceFormat</span></span>, <span class="idlParam">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"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">sourceFormat</span></span>, <span class="idlParam"><span class="idlParamType"><a class="idlType" href="#idl-def-MetadataCallback"><code>MetadataCallback</code></a></span> <span class="idlParamName">successCallback</span></span>, <span class="idlParam"><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"><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"><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-examples2">
<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">&lt;metadata</span> <span class="sh_type">xmlns</span><span class="sh_symbol">=</span><span class="sh_type">'http://example.org/myapp/'</span>
<span class="sh_type">*</span><span class="sh_normal"> </span><span class="sh_type">xmlns:xsi</span><span class="sh_symbol">=</span><span class="sh_type">'http://www.w3.org/2001/XMLSchema-instance'</span>
<span class="sh_type">*</span><span class="sh_normal"> </span><span class="sh_type">xsi:schemaLocation</span><span class="sh_symbol">=</span><span class="sh_type">'http://example.org/myapp/</span><span class="sh_normal"> </span><span class="sh_type">http://example.org/myapp/schema.xsd'</span>
<span class="sh_type">*</span><span class="sh_normal"> </span><span class="sh_type">xmlns:dc</span><span class="sh_symbol">=</span><span class="sh_type">'http://purl.org/dc/elements/1.1/'</span><span class="sh_keyword">&gt;</span>
<span class="sh_comment"> * </span><span class="sh_keyword">&lt;dc:title&gt;</span><span class="sh_comment">DC title</span><span class="sh_keyword">&lt;/dc:title&gt;</span>
<span class="sh_comment"> * </span><span class="sh_keyword">&lt;/metadata&gt;</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>
</div>
</div>
<!-- ##########################################################
###############################################################
Section: SYNCHRONOUS API
###############################################################
########################################################### -->
<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"><span class="idlParamType"><a>DOMString</a>[]</span> <span class="idlParamName">propertyNames</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">fragment</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">sourceFormat</span></span>, <span class="idlParam">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"><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-examples3">
<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>
<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>
<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">&lt;metadata</span> <span class="sh_type">xmlns</span><span class="sh_symbol">=</span><span class="sh_type">'http://example.org/myapp/'</span>
<span class="sh_type">*</span><span class="sh_normal"> </span><span class="sh_type">xmlns:xsi</span><span class="sh_symbol">=</span><span class="sh_type">'http://www.w3.org/2001/XMLSchema-instance'</span>
<span class="sh_type">*</span><span class="sh_normal"> </span><span class="sh_type">xsi:schemaLocation</span><span class="sh_symbol">=</span><span class="sh_type">'http://example.org/myapp/</span><span class="sh_normal"> </span><span class="sh_type">http://example.org/myapp/schema.xsd'</span>
<span class="sh_type">*</span><span class="sh_normal"> </span><span class="sh_type">xmlns:dc</span><span class="sh_symbol">=</span><span class="sh_type">'http://purl.org/dc/elements/1.1/'</span><span class="sh_keyword">&gt;</span>
<span class="sh_comment"> * </span><span class="sh_keyword">&lt;dc:title&gt;</span><span class="sh_comment">DC title</span><span class="sh_keyword">&lt;/dc:title&gt;</span>
<span class="sh_comment"> * </span><span class="sh_keyword">&lt;/metadata&gt;</span><span class="sh_comment">"</span>
<span class="sh_comment"> * } ]</span>
<span class="sh_comment"> */</span></pre>
</div>
</div>
<!-- ##########################################################
###############################################################
Section: MediaAnnotation inferface
###############################################################
########################################################### -->
<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>
<!-- ##########################################################
###############################################################
Section: Properties
###############################################################
########################################################### -->
<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>
<!-- ##########################################################
###############################################################
Section: Identification Properties
###############################################################
########################################################### -->
<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>
<!-- ########## TITLE ########## -->
<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>
<!-- ########## LANGUAGE ########## -->
<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>
<!-- ########## LOCATOR ########## -->
<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>
<!-- ##########################################################
###############################################################
Section: Creation Properties
###############################################################
########################################################### -->
<div class="section" id="creation-properties">
<h4><span class="secno">4.5.2 </span>Creation Properties</h4>
<!-- ########## CONTRIBUTOR ########## -->
<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>
<!-- ########## CREATOR ########## -->
<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>
<!-- ########## MADATE ########## -->
<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>
<!-- ########## LOCATION ########## -->
<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>
<!-- ##########################################################
###############################################################
Section: Content Properties
###############################################################
########################################################### -->
<div class="section" id="content-properties">
<h4><span class="secno">4.5.3 </span>Content Properties</h4>
<!-- ########## DESCRIPTION ########## -->
<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>
<!-- ########## KEYWORD ########## -->
<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>
<!-- ########## GENRE ########## -->
<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>
<!-- ########## RATING ########## -->
<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>
<!-- ##########################################################
###############################################################
Section: Relational Properties
###############################################################
########################################################### -->
<div class="section" id="relational-properties">
<h4><span class="secno">4.5.4 </span>Relational Properties</h4>
<!-- ########## RELATION ########## -->
<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>
<!-- ########## COLLECTION ########## -->
<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>
<!-- ##########################################################
###############################################################
Section: Rights Properties
###############################################################
########################################################### -->
<div class="section" id="rights-properties">
<h4><span class="secno">4.5.5 </span>Rights Properties</h4>
<!-- ########## COPYRIGHT ########## -->
<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>
<!-- ########## POLICY ########## -->
<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>
<!-- ##########################################################
###############################################################
Section: Distribution Properties
###############################################################
########################################################### -->
<div class="section" id="distribution-properties">
<h4><span class="secno">4.5.6 </span>Distribution Properties</h4>
<!-- ########## PUBLISHER ########## -->
<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>
<!-- ########## TARGET AUDIENCE ########## -->
<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>
<!-- ##########################################################
###############################################################
Section: Fragments Properties
###############################################################
########################################################### -->
<div class="section" id="fragments-properties">
<h4><span class="secno">4.5.7 </span>Fragments Properties</h4>
<!-- ########## FRAGMENT ########## -->
<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>
<!-- ########## NAMED FRAGMENTS ########## -->
<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>
<!-- ##########################################################
###############################################################
Section: Technical Properties
###############################################################
########################################################### -->
<div class="section" id="technical-interface">
<h4><span class="secno">4.5.8 </span>Technical Properties</h4>
<!-- ########## FRAMESIZE ########## -->
<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>
<!-- ########## COMPRESSION ########## -->
<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-FrameSize2">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>
<!-- ########## DURATION ########## -->
<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>
<!-- ########## FORMAT ########## -->
<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>
<!-- ########## SAMPLING RATE ########## -->
<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>
<!-- ########## FRAME RATE ########## -->
<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>
<!-- ########## AVERAGE BITRATE ########## -->
<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>
<!-- ########## NUM TRACKS ########## -->
<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>
<!-- ##########################################################
###############################################################
Section: MetadataSource interface
###############################################################
########################################################### -->
<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-examples6">
<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>
<!-- ##########################################################
###############################################################
Section: API STATUS CODES
###############################################################
########################################################### -->
<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. As described in <a
href="#maobject-interface">section 4.4</a>, the status code is returned as one
of the attributes of the MediaAnnotation object returned by a method call to
the API. These status codes are used on the API level, and applied to either
client side or server side implementations.</p>
<p class="note">Later versions of this document may include additional status
codes.</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</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>562</td>
<td>Property not supported</td>
<td>a subset of properties implemented</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- ##########################################################
###############################################################
Section: USAGE EXAMPLES OF THE API
###############################################################
########################################################### -->
<div class="section" id="usage-examples">
<!--OddPage-->
<h2><span class="secno">5. </span>Usage examples</h2>
<!-- ##########################################################
###############################################################
Section: USAGE AS JAVASCRIPT LIBRARY
###############################################################
########################################################### -->
<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">&lt;</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">&lt;</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">&lt;</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>
<!-- ##########################################################
###############################################################
Section: USAGE AS WEB SERVICE
###############################################################
########################################################### -->
<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>
<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">"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">"&lt;?xml version='1.0'?&gt;&lt;metadata</span>
<span class="sh_string"> xmlns='http://example.org/myapp/' 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/'&gt;&lt;dc:title&gt;DC title&lt;/dc:title&gt;&lt;/metadata&gt;"</span><span class="sh_cbracket">}</span>
<span class="sh_symbol">]</span></pre>
<p></p>
</li>
</ul>
</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>
<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">"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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=title</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=language</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=locator</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=contributor</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=creator</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=date</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=location</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=description</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=keyword</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=genre</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=rating</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=relation</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=collection</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=copyright</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=policy</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=publisher</p>
<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>
</li>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=targetAudience</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=fragment</p>
<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>
</li>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=namedFragment</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=frameSize</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=compression</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=duration</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=format</p>
<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>
</li>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=samplingRate</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=frameRate</p>
<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>
</li>
<li><p>Request:
http://example.com/my-media-resource/?ma-query=averageBitRate</p>
<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>
</li>
<li><p>Request: http://example.com/my-media-resource/?ma-query=numTracks</p>
<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>
</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>
<!-- ##########################################################
###############################################################
Section: ASYNC WEBIDL
###############################################################
########################################################### -->
<div class="appendix section" id="webidl-for-api">
<!--OddPage-->
<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="change-log" class="appendix section">
<!--OddPage-->
<h2><span class="secno">B. </span><a id="changelog" name="changelog">Change
log</a></h2>
<p><em>Note: The following subsections lists all significant changes applied to
the API for Media Resources 1.0 specification received in LC. </em></p>
<p class="note">-- General changes ---</p>
<ul>
<li>Added example of broadcast date to the createDate interface. </li>
<li>Removed type from the Identifier interface </li>
<li>Removed unused interfaces from the Web-IDL version of the API.</li>
<li>Added examples of the usage of the MediaResource interface.</li>
<li>Added asynchronous versions of all methods.</li>
</ul>
<p class="note">---[LC 2406] 2001-09-10 ---</p>
<ul>
<li>Chris to add design consideration in section 2.</li>
</ul>
<p class="note">---[LC 2410] 2001-09-10 ---</p>
<ul>
<li>Updated description of getOriginalData.</li>
</ul>
<p class="note">---[LC 2419] 2001-09-10 ---</p>
<ul>
<li>Changed Media Resource to Media Resources.</li>
<li>Removed "Thereby".</li>
<li>Changed "are stored in the Media Ontology" to "are documented in the
Ontology for Media Resources specification".</li>
<li>Changed "The JavaScript examples in this document will only work if the
API is implemented by the browser.".</li>
<li>Changed "The API exists of a number of interfaces" to "The API has a
number of interfaces".</li>
<li>Changed "Implementations of the API should provide objects implementing
the different interfaces." to "Implementations of the API <em title="must"
class="rfc2119">must</em> implement the different interfaces.".</li>
<li>Corrected the link to Section 5.</li>
<li>Changed "<em title="optional" class="rfc2119">optional</em>" to
"optional" for denoting the optional parameters </li>
<li>Added asynchronous versions of the getMediaProperty operation </li>
<li>Changed the name "getPropertyNamesWithValues" to
"getPropertyNamesHavingValues".</li>
<li>Changed MAObject to MediaAnnotation.</li>
<li>Dropped method getSourceFormatsWithValues and removed references or
descriptions of this.</li>
<li>Dropped method selectMediaResource and introduced a constructor.</li>
<li>Changed Language interface to MediaAnnotationLanguage, and added more
information on the usage of it.</li>
<li>Removed "uri" from MAObject interface.</li>
<li>Removed the "suggested terms" since these are listed in the Ontology for
Media Resources specification.</li>
<li>Changed the "Date" interface to "CreationDate" interface.</li>
<li>Changed "createdate" to "creationDate" in the example of the CreationDate
interface.</li>
<li>Changed floats to doubles for the location property.</li>
<li>Corrected use of capitals for the properties.</li>
<li>Added references from the interfaces in this document to the core
properties in the Ontology for Media Resources 1.0 specification.</li>
<li>Removed dots in example of FrameSize.</li>
<li>Added warning about access of geographical content.</li>
</ul>
<p class="note">---[LC 2394] 2001-09-10 ---</p>
<ul>
<li>Changed "the API" to "this API".</li>
<li>Updated information on the Media Ontology Core Properties.</li>
<li>Mentioning of the Media Ontology was replaced by information on the
Ontology for Media Resources 1.0 specification.</li>
<li>Changed "lies on" to "is".</li>
<li>Dropped "underlying".</li>
<li>Changed "to support" to "supporting".</li>
<li>Dropped the sentence "This document is being published with the
aspiration to gather wide feedback on the yet available API design."</li>
<li>Added referenc to the figure.</li>
<li>Dropped "the" and added "and".</li>
<li>Changed "acces (establish connection, retrieval) of" to "acces (establish
connection, retrieval) to".</li>
<li>Changed "by" to "with".</li>
<li>Changed "back-end of the web service" to "In the implementation of the
web service".</li>
<li>Changed and split up the sentence " allows supporting a media repository
(e.g. content provider's archive database, movie store) from which the user
agent could directly retrieve metadata sources and which might have a
custom metadata format not supported by a user agent.".</li>
<li>Replaced "as" with "than".</li>
<li>Updated the figure and the alt text.</li>
<li>Dropped the first "the".</li>
<li>Changed "the media ontology" to "the Media Ontology".</li>
<li>Changed "on" to "with" and "working" to "applied".</li>
<li>Changed "it is assumed" to "one needs at least".</li>
<li>Changed "The API exists of a number of interfaces" to "The API has a
number of interfaces".</li>
<li>Added a colon in "specific operation getProperty".</li>
<li>Changed "to iterate" to "iteration".</li>
<li>Removed "Lastly".</li>
<li>Changed "offers a number of operations" to "provides a number of
operations".</li>
<li>Changed "on" to "of".</li>
<li>Changed "getProperty" to "getMediaProperty".</li>
<li>Changed "getPropertyNamesWithValues" to
"getPropertyNamesHavingValues".</li>
<li>Changed "getOriginalData" to "getOriginalMetadata".</li>
<li>Change "to retrieve" to "retrieval of".</li>
<li>Added space between "code(".</li>
<li>Changed "Requesting for the title" to "Requesting "title"". </li>
<li>Replaced "to refine" with "refining" and added a period.</li>
<li>Changed the order of the sentence: "Only if the metadata is available in
the specified language, the values are returned".</li>
<li>The "type" attribute was removed from the "Identifier" interface.</li>
<li>Changed "Title" to "title".</li>
<li>Changed the description of the "link" attribute of the "CopyRight"
interface to: "This attribute holds a URI, identifying the license if it is
externally available.".</li>
<li>Removed "organization" from the "Policy" interface.</li>
<li>Changed "behaviour" to "behavior".</li>
<li>Changed "The set of status codes ..." to "Later versions of this document
may include additional status codes or other changes.".</li>
<li>Changed "Ok" to "OK".</li>
<li>Removed random indentations.</li>
<li>Removed trailing whitespaces.</li>
<li>Removed redundant "Members of the Working Group are...".</li>
</ul>
<p class="note">The following subsection lists all significant changes applied
to the API for Media Resources 1.0 specification. These have been decided
during the 10th Face-to-face meeting hosted by Apple in Silicon Valley, Ca,
USA.</p>
<ul>
<li>Added description of iteration possibility (over various properties) to
MediaAnnotation interface.</li>
<li>Added statusCode to WebIDL specification of MediaAnnotation
interface.</li>
<li>Added BCP47 recommendation to language attribute of MediaAnnotation
interface.</li>
<li>Changed description of value attribute.</li>
<li>Fixed broken link in sourceFormat description.</li>
<li>For all properties added return values, WebIDL description, deleted links
and changed examples</li>
<li>Added recommendation for XML dateTime datatype</li>
<li>Merged Javascript Usage section with Web Service section</li>
<li>Added API Status Code section to API Description section</li>
<li>Conformance Section now in the beginning of the document (accordingly to
Ontology for Media Resources 1.0)</li>
<li>Added note to Properties section</li>
<li>Deleted client-side in abstract / introduction</li>
<li>Rephrased last paragraph of introduction</li>
<li>Aligned terminology section (accordingly to Ontology for Media Resources
1.0)</li>
<li>Changed position and added caption of Figure 1</li>
<li>Added synchronous and asynchronous description to design consideration
section</li>
<li>Changed synchronous specification of MediaResource (including
examples)</li>
<li>Updated WebIDL specification of synchronous API</li>
<li>Changed "them agreeing to it" to "declaration of agreement" in Security
Consideration</li>
<li>Inserted ontology CSS file to format Status Code Table</li>
<li>Updated usage examples for JavaScript</li>
<li>Updated usage examples for WebService</li>
<li>Changes in intro text of section 4</li>
<li>Added argument list to the definition of the methods of MediaResource
IF</li>
<li>Updated parameter descriptions of getMediaProperty</li>
<li>Corrected text in sync examples</li>
<li>Dropped getPropertyNamesHavingValues from asynchronous interface</li>
<li>Updated asynchronous example (remove assumption about HTML5 video element
exposing MediaResource Interface)</li>
<li>Dropped type and unstructuredValue from MediaAnnotation interface (as
agreed at F2F)</li>
<li>Added introduction to MediaAnnotation definition section (text on design
considerations drafted at F2F)</li>
<li>Revised intro to specific properties interfaces section</li>
<li>Dropped all references to getElementsByTagName in the examples</li>
<li>Changed description of attributes of interfaces derived from
MediaAnnotation (can't enforce anything here, depends what is in the source
file)</li>
<li>Added missing languageLink attribute of language</li>
<li>Changed ratingValue to double (according to ontology document)</li>
<li>Dropped type attribute of rating (does not exist in ontology
document)</li>
<li>Updated examples for property return values</li>
<li>Deleted property named callback from async webidl</li>
<li>Updated MediaAnnotation and derived interface definitions in both sync
and async WebIDL</li>
<li>Changed ordering of asynchronous interface section</li>
<li>Merged/Changed WebIDL specifications of Appendix</li>
<li>Added statusCode to all examples</li>
<li>Changed sub-interfaces to subtypes</li>
<li>Changed getMediaProperty description (not just requesting a specific
property)</li>
<li>Minor change in MetadataCallback description</li>
<li>Simplified asynchronous getMediaProperty example (removed filtered
callback)</li>
<li>Minor corrections to MediaAnnotation examples</li>
<li>Removed ECMAScript-specific extended attributes</li>
<li>Included official WebIDL reference</li>
<li>Changed WebIDL specification (constructor to createMediaResource) and
corresponding sections</li>
<li>Added reference to Media Fragment specification</li>
<li>Fixed character issues in Acknowledgments section</li>
<li>Integrated direct use of ReSpec.js in dev space</li>
<li>Added text on preference of URIs to introduction text of Properties
section (ACTION-405)</li>
<li>Integrated resolution on subtype filter and JSON responses (see <a
href="http://www.w3.org/2011/03/22-mediaann-minutes.html">meeting minutes
(22.03.2011)</a> for details)</li>
<li>Removed filter comment in property descriptions</li>
<li>Changed Date property description</li>
<li>Updated WebIDL description</li>
</ul>
<p class="note">The following subsection lists all significant changes applied
to the API for Media Resources 1.0 specification. These have been decided
during the 12th Face-to-face meeting hosted by JOANNEUM, Graz, Austria.</p>
<ul>
<li>Changed definition of async mode.</li>
<li>Renamed status code 501 into 562 and changed textual description.</li>
<li>Removed HTTP references for the status code statement.</li>
</ul>
</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
((public) Invited expert), Eric Carlson (Apple, Inc.), Pierre-Antoine Champin
(Université de Lyon), 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 (DFKI GmbH),
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-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-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-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>