def comments_userA(request, userA, groupA):
    """
    Returns new OMERO Comments
    """
    comments = []
    ctx = {'omero.group': str(groupA.id.val)}
    for text in ["Test Comment", "Another comment userA"]:
        comment = CommentAnnotationI()
        comment.textValue = rstring(text)
        comments.append(comment)
    comments = get_update_service(userA).saveAndReturnArray(comments, ctx)
    comments.sort(cmp_id)
    return comments
def comments_userA(request, userA, groupA):
    """
    Returns new OMERO Comments
    """
    comments = []
    ctx = {'omero.group': str(groupA.id.val)}
    for text in ["Test Comment", "Another comment userA"]:
        comment = CommentAnnotationI()
        comment.textValue = rstring(text)
        comments.append(comment)
    comments = get_update_service(userA).saveAndReturnArray(comments, ctx)
    comments.sort(cmp_id)
    return comments
Beispiel #3
0
def fileset_with_images_and_annotations(request, gatewaywrapper):
    gatewaywrapper.loginAsAuthor()
    update_service = gatewaywrapper.gateway.getUpdateService()
    fileset = create_fileset()
    comment_annotation = CommentAnnotationI()
    comment_annotation.ns = rstring("comment_annotation")
    comment_annotation.textValue = rstring("textValue")
    long_annotation = LongAnnotationI()
    long_annotation.ns = rstring("long_annotation")
    long_annotation.longValue = rlong(1L)
    fileset.linkAnnotation(comment_annotation)
    fileset.linkAnnotation(long_annotation)
    fileset = update_service.saveAndReturnObject(fileset)
    return gatewaywrapper.gateway.getObject("Fileset", fileset.id.val)
Beispiel #4
0
def fileset_with_images_and_annotations(request, gatewaywrapper):
    gatewaywrapper.loginAsAuthor()
    update_service = gatewaywrapper.gateway.getUpdateService()
    fileset = create_fileset()
    comment_annotation = CommentAnnotationI()
    comment_annotation.ns = rstring('comment_annotation')
    comment_annotation.textValue = rstring('textValue')
    long_annotation = LongAnnotationI()
    long_annotation.ns = rstring('long_annotation')
    long_annotation.longValue = rlong(1L)
    fileset.linkAnnotation(comment_annotation)
    fileset.linkAnnotation(long_annotation)
    fileset = update_service.saveAndReturnObject(fileset)
    return gatewaywrapper.gateway.getObject('Fileset', fileset.id.val)