[Midas] saving metadata
Michael Grauer
michael.grauer at kitware.com
Fri Jul 13 09:35:38 EDT 2012
Sorry about this, I steered you wrong.
The documentation is correct for the api call, you can only store metadata
when updating an existing item.
You can only have one Metadata Value for an ItemRevision and for an
(Element, Qualifier) pair. The metadata stored with the create.item call
will use a blank string for the Qualifier, and so will the setmetadata call
if you don't provide a Qualifier. So if you set x=y, then x=z, your
metadata will be (X, '', Z). You could always add qualifiers via
setmetadata and so have (X, Q1, Y) and (X, Q2, Z).
On Thu, Jul 12, 2012 at 8:58 PM, Mona Wong <mona at sdsc.edu> wrote:
>
> 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.
> *********************************************
>
>
>
>
> _______________________________________________
> Midas mailing list
> Midas at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/midas
>
>
--
Thanks,
Michael Grauer
R & D Engineer
Kitware, Inc.
919 969 6990 x322
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/midas/attachments/20120713/b650fe3d/attachment.html>
More information about the Midas
mailing list