- From: Chris Poppe <Chris.Poppe@ugent.be>
- Date: Wed, 25 Nov 2009 13:42:15 +0100
- To: <public-media-annotation@w3.org>
- Message-ID: <0b9101ca6dcc$b8285f50$28791df0$@Poppe@ugent.be>
Dear all,
The last days I spent some time on an implementation of the API, basically
the main reason why I did not actively participated in the discussions on
the subproperties.
You can find my "raw" WIP test-implementation (tested with IE 8 and Firefox
3.5.5) at:
http://multimedialab.elis.ugent.be/users/chpoppe/MediaAnnotations.html
This page uses JavaScript (note that currently only JavaScript or Java
bindings are defined for the WebIDL language!).
A javascript library holds the implementation of the method:
getProperty(propertyName, sourceFormat, subType, language, fragment). This
library currently (tries to) parse XML, RDF and EXIF.
To test it, first a mediaresource needs to be selected (there is only one:
the image in the page). Then you can choose getProperty for a specific
property. If a sourceformat is selected it is passed as the optional
parameter 'sourceFormat'.
The result is an array of objects.
Each object holds:
. an unstructured value (string) which is a textual label holding
the values.
. a sourceFormat (to denote from which sourceformat this information
is extracted). Note that this is not part of the API for now but I think it
might be valuable.
. An URI if this is available in the sourceFormat (Currently only
MediaRDF holds URI's but even in this case you cannot be sure that it is
actually an URI .)
. More properties (which could be called sub-properties), depending
on the requested property
o For example if you request for the creator you get back:
sourceFormat: MPEG-7
Unstructured value: John Doe
First Name: John
Family Name: Doe
URI: undefined
The unstructured value gives no information at all! Meaning you can not
assume that John is the firstname. Since many metadata formats allow to
define the first and family name I added these to the returned object of
getProperty("creator")
o For the MediaRDF you get back 2 objects (corresponding to the two
metadata files):
sourceFormat: MEDIARDF
Unstructured value: John Doe
First Name: undefined
Family Name: undefined
URI: undefined
sourceFormat: MEDIARDF
Unstructured value:
http://multimedialab.elis.ugent.be/users/chpoppe/JohnDoeFoaf.rdf
First Name: John
Family Name: Doe
URI: http://multimedialab.elis.ugent.be/users/chpoppe/JohnDoeFoaf.rdf
In this case, my implementation actually parses the Foaf description of the
creator to retrieve the relevant information like first name and family name
o When you request for contributor you get back:
sourceFormat: MPEG-7
Unstructured value: John Doe
First Name: John
Family Name: Doe
role: creator
URI: undefined
sourceFormat: DC
Unstructured value: Doe, Jane
First Name: undefined
Family Name: undefined
role: publisher
URI: undefined
Here you can see that a "role" property is added which denotes what kind of
contributor we are talking about. This is related to the proposition by
Pierre-Antoine, he suggested:
md.getValues("contributor")
returning
[ { "value": "John Doe", "subproperty": "id3:composer" },
{ "value": "Jane Doe", "subproperty": "id3:lyricist" };
]
The terms 'creator' and 'publisher' that I return are currently chosen by
me.
Kind regards,
Chris
Ghent University - IBBT
Faculty of Engineering
Department of Electronics and Information Systems (ELIS)
Multimedia Lab Gaston Crommenlaan 8 bus 201
B-9050 Ledeberg-Ghent
Belgium
t: +32 9 33 14959
f: +32 9 33 14896
t secr: +32 9 33 14911
e: <mailto:chris.poppe@ugent.be> chris.poppe@ugent.be
URL: <http://multimedialab.elis.ugent.be>
http://multimedialab.elis.ugent.be
Received on Wednesday, 25 November 2009 12:42:51 UTC