[ome-devel] Best way to store key/value pairs using StructuredAnnotations

Curtis Rueden ctrueden at wisc.edu
Mon Sep 20 22:24:46 BST 2010


Hi everyone,

With Bio-Formats, we store all the "original metadata" as key/value pairs of
strings, regardless of whether each pair can be standardized into OME-XML
proper. We used to use semantic types to do this, but wanted to switch to
using structured annotations instead. Hence, the way we are doing it now
looks like this:

      <ListAnnotation ID="Annotation:0" Namespace="
http://www.openmicroscopy.org/Schemas/SA/2010-06">
         <AnnotationRef ID="Annotation:1"/>
         <AnnotationRef ID="Annotation:2"/>
      </ListAnnotation>
      <CommentAnnotation ID="Annotation:1" Namespace="
http://www.openmicroscopy.org/Schemas/SA/2010-06">
         <Value>File Date</Value>
      </CommentAnnotation>
      <CommentAnnotation ID="Annotation:2" Namespace="
http://www.openmicroscopy.org/Schemas/SA/2010-06">
         <Value>4675473831286180171</Value>
      </CommentAnnotation>

Where each key/value pair is stored as a ListAnnotation with two elements.
Unfortunately, this notation is exceedingly verbose. Is there a better way
we could structure things so that we don't need so much XML for each pair?
Maybe using XMLAnnotations? For comparison, the old notation looked like
this:

         <OriginalMetadata ID="OriginalMetadata:29" Name="Scale Factor for
X" Value="1.0"/>

(with a small amount of boilerplate at the end defining the
"OriginalMetadata" semantic type)

Thanks,
Curtis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20100920/59d502f2/attachment.html>


More information about the ome-devel mailing list