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.
Line | |
---|
1 | class dummy(object): |
---|
2 | def __init__(self): |
---|
3 | self.val = None |
---|
4 | |
---|
5 | def 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 | |
---|
20 | up = client.sf.getUpdateService() |
---|
21 | q = client.sf.getQueryService() |
---|
22 | |
---|
23 | tag = omero.model.TagAnnotationI() |
---|
24 | pt(tag) |
---|
25 | |
---|
26 | tag = up.saveAndReturnObject(tag) |
---|
27 | pt(tag) |
---|
28 | |
---|
29 | tag = up.saveAndReturnObject(tag) |
---|
30 | pt(tag) |
---|
31 | |
---|
32 | tag.textValue = omero.rtypes.rstring('') |
---|
33 | tag = up.saveAndReturnObject(tag) |
---|
34 | pt(tag) |
---|
35 | |
---|
36 | tag.ns = omero.rtypes.rstring('') |
---|
37 | tag = up.saveAndReturnObject(tag) |
---|
38 | pt(tag) |
---|
39 | |
---|
40 | tag.ns = omero.rtypes.rstring('x') |
---|
41 | tag = up.saveAndReturnObject(tag) |
---|
42 | pt(tag) |
---|
43 | |
---|
44 | |
---|
45 | print q.projection("select t.details.updateEvent.id from TagAnnotation t where t.id = " + str(tag.id.val), None)[0][0] |
---|
Download in other formats:
1.3.13-PRO © 2008-2011
Agilo Software all
rights reserved
(this page was served in: 0.31062 sec.)