[c,s]=loadOmero;
try
imetadata = s.getMetadataService();
ids = java.util.ArrayList();
ids.add(java.lang.Long(51));
anns = imetadata.loadAnnotations('Plate', ids, [],[],[]);
disp(anns);
catch ME
disp(ME);
disp(char(ME.message));
end
c.closeSession();
clear c
clear s
clear imetadata
clear anns
unloadOmero;
[c,s]=loadOmero;
try
iquery = s.getQueryService();
iupdate = s.getUpdateService();
filter = omero.sys.Filter();
filter.limit = omero.rtypes.rint(1);
plate = iquery.findAll('Plate',filter).get(0);
plate.setStatus( omero.rtypes.rstring('first plate I found') );
plate = iupdate.saveAndReturnObject( plate );
disp(plate.getStatus().getValue());
catch ME
disp(ME);
disp(char(ME.message));
end
c.closeSession();
clear c
clear s
clear iquery
clear iupdate
clear filter
clear plate
unloadOmero;
%get comment from an image
query = session.getQueryService();
parameters = omero.sys.Parameters();
parameters.map = {}
parameters.map["id"] = omero.rtypes.rlong( 899878 );
result = query.findAllByQuery( "select comment from CommentAnnotation comment where comment.id=:id", parameters )
select c from ImageAnnotationLink l, CommentAnnotation c join l.child where l.child = c and l.parent.id = :id
params = omero.sys.Parameters()
params.map = {'id': rlong(imageId)}
query = "select c from ImageAnnotationLink l, CommentAnnotation c join l.child where l.child = c and l.parent.id = :id"
queryService = conn.getQueryService()
anns = queryService.findAllByQuery(query, params)
for a in anns:
print a.getTextValue().getValue()
string = "select fileann from FileAnnotation where fileann.file.name=:filename"
Return to Developer Discussion
Users browsing this forum: Bing [Bot] and 1 guest