<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Thomas,
<div class=""><br class="">
</div>
<div class="">there is, it's in the DataManagerFacility (might actually be clearer to move that to the MetadataFacility though):</div>
<div class=""><a href="https://downloads.openmicroscopy.org/omero/5.4.5/api/omero/gateway/facility/DataManagerFacility.html#attachAnnotation-omero.gateway.SecurityContext-T-omero.gateway.model.DataObject-" class="">https://downloads.openmicroscopy.org/omero/5.4.5/api/omero/gateway/facility/DataManagerFacility.html#attachAnnotation-omero.gateway.SecurityContext-T-omero.gateway.model.DataObject-</a></div>
<div class=""><br class="">
</div>
<div class="">In general a lot of functionality a typical client has to deal with is wrapped in one of the Facility classes:</div>
<div class=""><a href="https://downloads.openmicroscopy.org/omero/5.4.5/api/omero/gateway/facility/Facility.html" class="">https://downloads.openmicroscopy.org/omero/5.4.5/api/omero/gateway/facility/Facility.html</a></div>
<div class=""><br class="">
</div>
<div class="">Although there are still two big parts missing which is importing images to the server and rendering. This is so </div>
<div class="">tightly coupled to the OMERO.insight code, I've not managed yet to move that to the Java gateway.</div>
<div class=""><br class="">
</div>
<div class="">Kind Regards,</div>
<div class="">Dominik</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 5 Jun 2018, at 00:36, Thomas Boudier <<a href="mailto:boudier.t@wehi.edu.au" class="">boudier.t@wehi.edu.au</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<p class=""><br class="">
</p>
<div class="moz-forward-container"><br class="">
<br class="">
-------- Forwarded Message --------
<table class="moz-email-headers-table" border="0" cellspacing="0" cellpadding="0">
<tbody class="">
<tr class="">
<th valign="BASELINE" align="RIGHT" nowrap="nowrap" class="">Subject: </th>
<td class="">Re: [ome-devel] get annotations java code</td>
</tr>
<tr class="">
<th valign="BASELINE" align="RIGHT" nowrap="nowrap" class="">Date: </th>
<td class="">Tue, 5 Jun 2018 09:36:06 +1000</td>
</tr>
<tr class="">
<th valign="BASELINE" align="RIGHT" nowrap="nowrap" class="">From: </th>
<td class="">Thomas Boudier <a class="moz-txt-link-rfc2396E" href="mailto:boudier.t@wehi.edu.au">
<boudier.t@wehi.edu.au></a></td>
</tr>
<tr class="">
<th valign="BASELINE" align="RIGHT" nowrap="nowrap" class="">To: </th>
<td class="">Dominik Lindner (Staff) <a class="moz-txt-link-rfc2396E" href="mailto:d.lindner@dundee.ac.uk">
<d.lindner@dundee.ac.uk></a></td>
</tr>
</tbody>
</table>
<br class="">
<br class="">
<p class="">Hi Dominik,</p>
<p class="">Thanks, I was a bit confused I guess between Facility classes. Maybe in the future you may  want to also have some
<i class="">setAnnotations</i> methods ;-) .</p>
<p class="">Here my code for information :</p>
<pre class="">Map<String, String> map = new HashMap<>();
        MetadataFacility metadataFacility = gateway.getFacility(MetadataFacility.class);
        List<AnnotationData> list = metadataFacility.getAnnotations(ctx, image);
        for (AnnotationData annotationData : list) {
            //IJ.log("" + annotationData.getClass().getName() + " " + annotationData.getLastModified());
            if (annotationData instanceof MapAnnotationData) {
                MapAnnotationData mapAnnotationData = (MapAnnotationData) annotationData;
                //IJ.log("FOUND PAIR " + mapAnnotationData.getContentAsString());
                String[] data = mapAnnotationData.getContentAsString().split("=");
                map.put(data[0], data[1]);
            }
        }
</pre>
<p class="">Many thanks.</p>
<p class="">Best,</p>
<p class="">Thomas<br class="">
</p>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>