[Midas] saving metadata
Mona Wong
mona at sdsc.edu
Thu Jul 12 20:58:22 EDT 2012
> You can store metadata at the time of creating an item by passing a param starting with underscore.
That great!
FYI, the web api doc seems to say that you can only store metadata when you update an existing item, not when you create a new item:
midas.item.create ?
Create an item or update an existing one if one exists by the uuid passed. Note: In the case of an already existing item, any parameters passed whose name begins with an underscore are assumed to be metadata fields to set on the item.
Parameters
token - Authentication token
parentid - The id of the parent folder. Only required for creating a new item.
name - The name of the item to create
description - (Optional) The description of the item
uuid - (Optional) Uuid of the item. If none is passed, will generate one.
privacy - (Optional) Default 'Public', possible values [Public|Private].
Return - The item object that was created
> We use a triple (Element, Qualifier, Value) for our metadata, and this method will set the Element and Value, but leave a blank string as the Qualifier.
>
>
> So if you are creating an item, and pass _SeriesId=6 as a parameter to the midas.item.create method, that item will have metadata of
>
> (SeriesId, '', 6)
>
>
> You can always use the midas.item.setmetadata api call to add further metadata to an item, or to record an Element, Qualifier and Value.
Can you have multiple values for a single element? In our case, we have multiple ontology terms that we've like to store in the metadata for that item. These ontology terms are just strings like "foot, fat embolish,..."
if I add an element/value pair like, x=y during midas.item.create and then use midas.item.setmetadata to set element value pair x=z; will x=y, z or just z?
Mona
*********************************************
Mona Wong
Web & iPad Application Developer
San Diego Supercomputer Center
You are the light you wish to see.
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/midas/attachments/20120712/1c01d1b2/attachment.html>
More information about the Midas
mailing list