Package omeroweb :: Package webclient :: Package controller :: Module container :: Class BaseContainer
[hide private]
[frames] | no frames]

Class BaseContainer

source code


Instance Methods [hide private]
 
__init__(self, conn, project=None, dataset=None, image=None, screen=None, plate=None, acquisition=None, well=None, tag=None, tagset=None, file=None, comment=None, annotation=None, index=None, orphaned=None, **kw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
assertNotNone(self, obj, obj_id, obj_name) source code
 
_get_object(self)
Since the container is often used to wrap a single Project, Dataset etc, several methods need access to the underlying object.
source code
 
obj_type(self) source code
 
obj_id(self) source code
 
canAnnotate(self) source code
 
canEdit(self) source code
 
getPermsCss(self)
Shortcut to get permissions flags, E.g.
source code
 
getNumberOfFields(self)
Applies to Plates (all fields) or PlateAcquisitions
source code
 
getPlateId(self)
Used by templates that display Plates or PlateAcquisitions
source code
 
listFigureScripts(self, objDict=None)
This configures all the Figure Scripts, setting their enabled status given the currently selected object (self.image etc) or batch objects (uses objDict).
source code
 
openAstexViewerCompatible(self)
Is the image suitable to be viewed with the Volume viewer 'Open Astex Viewer' applet? Image must be a 'volume' of suitable dimensions and not too big.
source code
 
formatMetadataLine(self, l) source code
 
originalMetadata(self) source code
 
channelMetadata(self) source code
 
loadTags(self, eid=None) source code
 
loadDataByTag(self) source code
 
listImagesInDataset(self, did, eid=None, page=None, load_pixels=False) source code
 
listContainerHierarchy(self, eid=None) source code
 
listOrphanedImages(self, eid=None, page=None) source code
 
annotationList(self) source code
 
canUseOthersAnns(self)
Test to see whether other user's Tags, Files etc should be provided for annotating.
source code
 
loadBatchAnnotations(self, objDict, ann_ids=None, addedByMe=False)
Look up the Tags, Files, Comments, Ratings etc that are on one or more of the objects in objDect.
source code
 
getTagsByObject(self, parent_type=None, parent_ids=None) source code
 
getFilesByObject(self, parent_type=None, parent_ids=None) source code
 
createDataset(self, name, description=None, img_ids=None) source code
 
createProject(self, name, description=None) source code
 
createScreen(self, name, description=None) source code
 
checkMimetype(self, file_type) source code
 
createCommentAnnotations(self, content, oids, well_index=0) source code
 
createTagAnnotations(self, tag, desc, oids, well_index=0)
Creates a new tag (with description) OR uses existing tag with the specified name if found.
source code
 
createFileAnnotations(self, newFile, oids, well_index=0) source code
 
createAnnotationsLinks(self, atype, tids, oids, well_index=0)
Links existing annotations to 1 or more objects
source code
 
updateDescription(self, o_type, description=None) source code
 
updateName(self, o_type, name) source code
 
updateImage(self, name, description=None) source code
 
updateDataset(self, name, description=None) source code
 
updatePlate(self, name, description=None) source code
 
updateProject(self, name, description=None) source code
 
updateScreen(self, name, description=None) source code
 
move(self, parent, destination) source code
 
remove(self, parents, index)
Removes the current object (file, tag, comment, dataset, plate, image) from it's parents by manually deleting the link.
source code
 
removemany(self, images) source code
 
paste(self, destination) source code
 
copyImageToDataset(self, source, destination=None) source code
 
copyImagesToDataset(self, images, dataset) source code
 
copyDatasetToProject(self, source, destination=None) source code
 
copyDatasetsToProject(self, datasets, project) source code
 
copyPlateToScreen(self, source, destination=None) source code
 
copyPlatesToScreen(self, plates, screen) source code
 
deleteItem(self, child=False, anns=False) source code
 
deleteObjects(self, otype, ids, child=False, anns=False) source code

Inherited from BaseController: doPaging, getShareId

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  project = None
hash(x)
  screen = None
hash(x)
  dataset = None
hash(x)
  plate = None
hash(x)
  acquisition = None
hash(x)
  well = None
hash(x)
  image = None
hash(x)
  tag = None
hash(x)
  file = None
hash(x)
  comment = None
hash(x)
  tags = None
hash(x)
  index = None
hash(x)
  containers = None
hash(x)
  experimenter = None
hash(x)
  c_size = 0
  text_annotations = None
hash(x)
  txannSize = 0
  long_annotations = None
hash(x)
  file_annotations = None
hash(x)
  orphaned = False
hash(x)

Inherited from BaseController: conn

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, conn, project=None, dataset=None, image=None, screen=None, plate=None, acquisition=None, well=None, tag=None, tagset=None, file=None, comment=None, annotation=None, index=None, orphaned=None, **kw)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

_get_object(self)

source code 

Since the container is often used to wrap a single Project, Dataset etc, several methods need access to the underlying object. E.g. obj_type(), obj_id(), canAnnotate(), canEdit(). This removes many if statements from the metadata_general.html template for places that are displaying data for a single Object. E.g. Edit Name etc.

getPermsCss(self)

source code 

Shortcut to get permissions flags, E.g. for css

canUseOthersAnns(self)

source code 

Test to see whether other user's Tags, Files etc should be provided for annotating. Used to ensure that E.g. Group Admins / Owners don't try to link other user's Annotations when in a private group (even though they could retrieve those annotations)

createTagAnnotations(self, tag, desc, oids, well_index=0)

source code 

Creates a new tag (with description) OR uses existing tag with the specified name if found. Links the tag to the specified objects.

Parameters:
  • tag - Tag text/name
  • desc - Tag description
  • oids - Dict of Objects and IDs. E.g. {"Image": [1,2,3], "Dataset", [6]}

createAnnotationsLinks(self, atype, tids, oids, well_index=0)

source code 

Links existing annotations to 1 or more objects

Parameters:
  • atype - Annotation type E.g. "tag", "file"
  • tids - Annotation IDs
  • oids - Dict of Objects and IDs. E.g. {"Image": [1,2,3], "Dataset", [6]}

remove(self, parents, index)

source code 

Removes the current object (file, tag, comment, dataset, plate, image) from it's parents by manually deleting the link. For Comments, we check whether it becomes an orphan & delete if true

Parameters:
  • parents - List of parent IDs, E.g. ['image-123']