Will Moore
buildQuery()
#4950
Project
Project, Dataset, Image, Screen, Plate
project, dataset, image, screen, plate,
plateacquisition, acquisition, well,
experimenter, experimentergroup,
originalfile, fileset, annotations
>>> omero_marshal.ENCODERS
{omero.model.DoubleAnnotationI: ,
omero.model.DetailsI: ,
omero.model.AcquisitionModeI: ,
omero.model.AffineTransformI: ,
omero.model.Annotation: ,
omero.model.BooleanAnnotationI: ,
omero.model.ChannelI: ,
omero.model.TextAnnotation: ,
omero.model.CommentAnnotationI: ,
omero.model.ContrastMethodI: ,
omero.model.DatasetI: ,
omero.model.DimensionOrderI: ,
omero.model.Shape: ,
omero.model.EllipseI: ,
omero.model.ExperimenterI: ,
omero.model.ExperimenterGroupI: ,
omero.model.ExternalInfoI: ,
omero.model.FormatI: ,
omero.model.IlluminationI: ,
omero.model.ImageI: ,
omero.model.LabelI: ,
omero.model.LineI: ,
omero.model.LongAnnotationI: ,
omero.model.MapAnnotationI: ,
omero.model.PhotometricInterpretationI: ,
omero.model.PixelsI: ,
omero.model.PixelsTypeI: ,
omero.model.PlateI: ,
omero.model.PointI: ,
omero.model.PolygonI: ,
omero.model.PolylineI: ,
omero.model.ProjectI: ,
omero.model.RectangleI: ,
omero.model.RoiI: ,
omero.model.ScreenI: ,
omero.model.TagAnnotationI: ,
omero.model.TermAnnotationI: ,
omero.model.TimestampAnnotationI: ,
omero.model.XmlAnnotationI: ,
omero.model.PermissionsI: }
/v1.0/
or /v1/
api/images/1/?embed=Pixels,omero:format.value
{
"omero:details": {
"owner": {
"UserName": "will",
"FirstName": "Will",
"MiddleName": "",
"omero:details": {
"@type": "TBD#Details",
"permissions": {
"canDelete": false,
"perm": "rw----",
"canEdit": false,
"canAnnotate": false,
"canLink": false,
"@type": "TBD#Permissions"
}
},
"Email": "",
"LastName": "Moore",
"@id": 3,
"@type": "http://www.openmicroscopy.org/Schemas/OME/2016-06#Experimenter"
},
"group": {
"omero:details": {
"@type": "TBD#Details",
"permissions": {
"canDelete": false,
"perm": "rwra--",
"canEdit": false,
"canAnnotate": false,
"canLink": false,
"@type": "TBD#Permissions"
}
},
"@id": 5,
"@type": "http://www.openmicroscopy.org/Schemas/OME/2016-06#ExperimenterGroup",
"Name": "read-ann"
},
"@type": "TBD#Details",
"permissions": {
"canDelete": true,
"perm": "rwra--",
"canEdit": true,
"canAnnotate": true,
"canLink": true,
"@type": "TBD#Permissions"
}
},
"Description": "",
"@id": 13578,
"@type": "http://www.openmicroscopy.org/Schemas/OME/2016-06#Project",
"Name": "API TEST foo"
}
{
"Name": "438_01_R3D_D3D.dv",
"omero:details": {},
"Pixels": {
"SizeT": 99,
"Type": {
"omero:details": {},
"@id": 3,
"@type": "TBD#PixelsType",
"value": "int16"
},
"SizeC": 2,
"omero:sha1": "a296bee3c52ab4eb960adfb31442261ad683204f",
"PhysicalSizeY": {
"Symbol": "µm",
"Value": 0.13262000679969788,
"@type": "TBD#LengthI",
"Unit": "MICROMETER"
},
"omero:details": {},
"PhysicalSizeZ": {
"Symbol": "µm",
"Value": 0.4000000059604645,
"@type": "TBD#LengthI",
"Unit": "MICROMETER"
},
"SizeX": 512,
"SizeY": 512,
"SizeZ": 4,
"PhysicalSizeX": {
"Symbol": "µm",
"Value": 0.13262000679969788,
"@type": "TBD#LengthI",
"Unit": "MICROMETER"
},
"@id": 4101,
"@type": "http://www.openmicroscopy.org/Schemas/OME/2016-06#Pixels",
"SignificantBits": 16
},
"omero:series": 0,
"omero:format": {
"omero:details": {},
"@id": 19,
"@type": "TBD#Format",
"value": "Deltavision"
},
"@id": 4401,
"@type": "http://www.openmicroscopy.org/Schemas/OME/2016-06#Image"
}
conn.buildQuery("Dataset", opts={'child_count':True, 'project': 401})
# **NB: need to use queryService.projection() instead of findAllByQuery()
""" select obj, (select count(id) from DatasetImageLink chl where chl.parent=obj.id)
from Dataset obj
join fetch obj.details.owner as owner
join fetch obj.details.creationEvent
join obj.projectLinks plink
where plink.parent.id = :pid"""