Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.

Ticket #3978: hangs_pg.py

File hangs_pg.py, 976 bytes (added by jmoore, 13 years ago)
Line 
1class dummy(object):
2    def __init__(self):
3        self.val = None
4
5def pt(tag):
6    m = dict()
7    for x in ("ns", "textValue"):
8        obj = getattr(tag, x)
9        if obj is None:
10            m[x] = None
11        else:
12            m[x] = obj.val
13    for y in ("updateEvent", "creationEvent"):
14        try:
15            m[y] = getattr(tag.details, y).id.val
16        except:
17            m["event"] = None
18    print m
19
20up = client.sf.getUpdateService()
21q = client.sf.getQueryService()
22
23tag = omero.model.TagAnnotationI()
24pt(tag)
25
26tag = up.saveAndReturnObject(tag)
27pt(tag)
28
29tag = up.saveAndReturnObject(tag)
30pt(tag)
31
32tag.textValue = omero.rtypes.rstring('')
33tag = up.saveAndReturnObject(tag)
34pt(tag)
35
36tag.ns = omero.rtypes.rstring('')
37tag = up.saveAndReturnObject(tag)
38pt(tag)
39
40tag.ns = omero.rtypes.rstring('x')
41tag = up.saveAndReturnObject(tag)
42pt(tag)
43
44
45print q.projection("select t.details.updateEvent.id from TagAnnotation t where t.id = " + str(tag.id.val), None)[0][0]

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.31062 sec.)

We're Hiring!