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.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #4844 (closed)

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

ObjectWrapper.listAnnotations() should use getAnnotationLinks()

Reported by: wmoore Owned by: wmoore
Priority: major Milestone: OMERO-Beta4.3
Component: OmeroPy Version: n.a.
Keywords: n.a. Cc: python-team@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-04-07 (9)

Description

Best not to have iQuery annotation queries in more than one place.

Maybe have a 'private' gateway method that returns the result of the getAnnotationLink() query

def _getAnnotationLinks (self, parent_type, parent_ids=None, ann_ids=None, ns=None, params=None)

and then a method that wraps the objects

def getAnnotationLinks (self, parent_type, parent_ids=None, ann_ids=None, ns=None, params=None):
    r = self._getAnnotationLinks(parent_type, parent_ids, ann_ids, ns, params
    for ann in r:
        yield AnnotationLinkWrapper(self, r)

Change History (5)

comment:1 Changed 13 years ago by wmoore

On second thoughts...

The work ticketed above is not ideal because:

  • getAnnotationLinks() loads the parent of the link, unnecessarily in this case.
  • quite a lot of reworking (getAnnotationLinks() with un-wrapped vv wrapped results etc) with only a single use case so far

For now, I will simply add load the creationEvent details we need under def _loadAnnotationLinks() which fixes the original problem.

Also load creationEvent in the getAnnotationLinks() method, since this was also missing here.

comment:2 Changed 13 years ago by wmoore

  • Remaining Time changed from 1 to 0
  • Resolution set to fixed
  • Status changed from new to closed

Committed to python-gateway

69e11bb Blitz _loadAnnotations() and getAnnotationLinks() loads creationEvent for links and anns. See #4844

comment:3 Changed 13 years ago by Chris Allan <callan@…>

(In [16ab815de1eb51d4736aebf3c2c9d881d15eecf6/ome.git] on branch develop) Blitz _loadAnnotations() and getAnnotationLinks() loads creationEvent for links and anns. See #4844

comment:4 Changed 13 years ago by Chris Allan <callan@…>

(In [7c08220c9cc7724738b2ff4096cb4f9c0db08733/ome.git] on branch develop) Merge branch 'python-gateway' into develop (Closes #4773, #4815 and #4681)

  • python-gateway: (67 commits) Removing use of conn.simpleSearch() from webgateway. See #4773 Removing simpleSearch() from blitz gateway. See #4773 Removing use of conn.simpleSearch() from gatewaytest. See #4773 Removing use of conn.searchPlates() and conn.searchScreens() from blitz gateway. See #4773 Removing searchScreens() and searchPlates() from blitz gateway. See #4773 Removing use of conn.searchProjects() and conn.searchDatasets() from webclient. See #4773 Removing use of conn.searchProjects() from gatewaytest. See #4773 Removing searchDatasets() and searchProjects() from blitz gateway. See #4773 Removing use of conn.searchImages() from webgateway. See #4773 Removing use of conn.searchImages() from webclient. See #4773 Removing searchImages() from blitz. Improving searchObjects() err msg. See #4773 Blitz _loadAnnotations() and getAnnotationLinks() loads creationEvent for links and anns. See #4844 Removing lookupTagAnnotation(name) from blitz gateway. See #4815 Removing use of getAnnotation(id) and getExperimenterGroups() from gatewaytest. See #4815 Removing use of conn.findProject(name) from webemdb. See #4815 Removing findProject() from blitz gateway. See #4815 Turn on testTopLevelObjects gatewaytest, removing use of conn.listImages(ns). See #4815 Removing listImages() method from blitz gateway. See #4815 Default param oid=None for blitz getObject() method. See #4815 Sorting of project, datasets etc uses getName().lower(). See #4815 ...

comment:5 Changed 13 years ago by Carlos Neves <carlos@…>

(In [7216bfccd249f2571a2a9695eb09017ad6684a60/ome.git] on branch dev_4_1_custom) Blitz _loadAnnotations() and getAnnotationLinks() loads creationEvent for links and anns. See #4844

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

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

We're Hiring!