[ome-devel] Annotation fields

josh.moore at gmx.de josh.moore at gmx.de
Tue Feb 17 14:09:57 GMT 2009


Bernhard Voigt writes:
 > Dear developers!

Greetings Bernhard,

 > I once asked about annotations that should hold a text value valid at
 > a certain date. For example an analysis result. As far as I understand
 > I'd create a TextAnnotation with a specifig namespace to identify my
 > result annotation and link a TimestampAnnotation to it. If I want to
 > store a name for the result, I'd also add another TextAnnotation whith
 > the name as text value. In order to identify the name annotation I'd
 > give it a namespace qualifier e.g. bernhards.nameannotation. I have
 > couple of questions to this technique:

 > 1) is this the intentional usage of annotation-annotation-links and
 > the namespace field

Of namespaces, definitely. The AnnotationAnnotationLinks are also
there to talk about annotations, but these should be used
carefully. There's a danger of starting to do full-blown modeling with
these inefficient types. If you realize before hand that you will be
wanting to do this, the better solution is to define some format
yourself -- file, binary, XML, CSV, etc. -- which will represent what
you want to say. This we leave open to you, but will be looking to
provide methods to help consume these in 4.1 and 4.2.

 > 2) for things like names, would it be useful to introduce official
 > omero namespaces, or add a name annotation type

We are working on standardizing our own namespaces now, but there's
nothing wrong with having more. Essentially a namespace is the
definition of a new type with its own contract. For all of our
namespaces, we will document the intended use and how to be
interoperable with them.

 > 3) what about performance when the annotation table becomes large
 > O(10^6) entries? e.g i want to sort result annotations by names, this
 > would be a join doubling the annotation table with a where clause on
 > the name space field which is a text field and not indexed.

Correct. We will certainly do everything we can to keep the table
performant moving forward, including adding indexes, etc. But
nevertheless, the coarser-grained your annotations the better.

 > Thanks for answers! Bernhard

Gladly,
~Josh.

 > ---------- Forwarded message ----------
 > From: Bernhard Voigt <bernhard.voigt at gmail.com>
 > Date: Tue, Jan 13, 2009 at 11:12 PM
 > Subject: date annotations
 > To: ome-devel at lists.openmicroscopy.org.uk
 > 
 > 
 > Hi folks!
 > 
 > I'm looking for a way to add dates to certain annotations. It should
 > be implemented that it is search and sortable on the database level
 > and not only application level. Is there something available for this
 > purpose or would I create for example a struct like this:
 > 
 > result = XMLAnnotationI()
 > result.ns = RString('acapella.result')
 > result.textvalue = RString('<xml><result>...</result></xml>')
 > date = LongAnnotation()
 > date.ns = RString('user.utc_seconds')
 > date.longValue = RLong(1000000) // some utc time expressed in seconds
 > since 1.1.1970 - not the current time
 > result.linkAnnotation(date)
 > 
 > Thanks! Bernhard
 > _______________________________________________
 > ome-devel mailing list
 > ome-devel at lists.openmicroscopy.org.uk
 > http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel


More information about the ome-devel mailing list