Dear Kouichi,
First, the bad news: OMERO metadata export is incomplete, very much so in some regards such as with the acquisition-related metadata. You can see in the methods following
https://github.com/openmicroscopy/openm ... .java#L978 what of annotation export has been implemented. Map annotations are a later addition to the model and we did not yet get around to adding the corresponding methods for them in that class. Anything omitted from among that class' methods is omitted from export. Fortunately, there is also miscellaneous good news:
Really, that class could probably be produced by code generation from the XML model mapping files. That's a somewhat large and risky undertaking but probably worth a go: then metadata export would be far more complete. It's not on our current roadmap but may happen someday.
Simply adding similar methods for handling map annotations should get them included in export. Two bits of good news there: (a) We'll get around to this anyway because we want to encourage fetching metadata from IDR in which map annotations are very important. (b) In the meantime before a server PR one can still try this client-side: e.g., see how OMERO.downloader writes XML for annotations starting from
https://github.com/ome/omero-downloader ... .java#L390. That client uses the query service to fetch the OMERO object then implements those same methods from the server to convert the data into an OMEXMLMetadata instance which can provide the XML representation. (It also doesn't yet have the map annotation methods in its AnnotationMetadata class but client-side you can probably more easily experiment with adding them if trying a similar approach.)
In OME-TIFF export there is actually some implicit versioning. When you look at an LSID in the XML then after the UUID one has "..._x:y" at the end where x is the OMERO object ID and y is effectively a version: there may be large non-consecutive gaps but a higher number still means a later version. I do not know that the schema formally requires this but in practice it seems to be how things are.
Cheers,
Mark