ome.services.blitz.gateway.services
Interface DataService

All Known Implementing Classes:
DataServiceImpl

public interface DataService

Since:
3.0-Beta4
Version:
3.0 (Internal version: $Revision: $Date: $)
Author:
Jean-Marie Burel      j.burel@dundee.ac.uk, Donald MacDonald      donald@lifesci.dundee.ac.uk

Method Summary
 void attachImageToDataset(omero.model.Dataset dataset, omero.model.Image image)
          Attach an image to a dataset.
 void deleteObject(omero.model.IObject row)
          Delete the object.
 void deleteScript(long id)
          Delete the script with id from the server.
 List<omero.model.IObject> findAllByQuery(String myQuery)
          Run the query against the iQuery interface.
 omero.model.IObject findByQuery(String myQuery)
          Run the query against the iQuery interface.
 List<omero.model.Dataset> getDatasets(List<Long> ids, boolean getLeaves)
          Get the Datasets with id's passed as list in ids.
 List<omero.model.Image> getImageByName(String imageName)
          Get the list of images with name containing imageName.
 List<omero.model.Image> getImageFromDatasetByName(Long datasetId, String imageName)
          Get the images from the dataset with name, this can use wild cards.
 List<omero.model.Image> getImages(omero.api.ContainerClass nodeType, List<Long> nodeIds)
          Retrieves the images contained in containers specified by the node type.
 Map<String,omero.RType> getParams(long id)
          Get the parameters the script takes, this is a map of the parameter name and type.
 List<omero.model.Pixels> getPixelsFromImage(long imageId)
          Get the pixels associated with the image.
 omero.model.PixelsType getPixelType(String type)
          Get the pixelsType with type.
 List<omero.model.PixelsType> getPixelTypes()
          Get the PixelTypes available in the system.
 List<omero.model.Project> getProjects(List<Long> ids, boolean getLeaves)
          Get the projects in the users.
 String getScript(long id)
          Get the script with id, this returns the actual script as a string.
 long getScriptID(String name)
          Get the id of the script with name
 Map<Long,String> getScripts()
          Get the scripts from the iScript Service.
 Map<String,omero.RType> runScript(long id, Map<String,omero.RType> map)
          Run the script and get the results returned as a name , value map.
<T extends omero.model.IObject>
List<T>
saveAndReturnArray(List<omero.model.IObject> graph)
          Save and return the array.
 omero.model.IObject saveAndReturnObject(omero.model.IObject obj)
          Save and return the Object.
 void saveArray(List<omero.model.IObject> graph)
          Save the array.
 void saveObject(omero.model.IObject obj)
          Save the object to the db .
 omero.model.Pixels updatePixels(omero.model.Pixels object)
          Update the pixels object in the server.
 long uploadScript(String script)
          Upload the script to the server.
 

Method Detail

getImages

List<omero.model.Image> getImages(omero.api.ContainerClass nodeType,
                                  List<Long> nodeIds)
                                  throws omero.ServerError
Retrieves the images contained in containers specified by the node type.

Parameters:
nodeType - The type of container. Can either be Project, Dataset, CategoryGroup, Category or Image.
nodeIds - Set of node ids..
Returns:
A Set of retrieved images.
Throws:
DSOutOfServiceException - If the connection is broken, or logged in
omero.ServerError - If an error occurred while trying to retrieve data from OMERO service.

getPixelsFromImage

List<omero.model.Pixels> getPixelsFromImage(long imageId)
                                            throws omero.ServerError
Get the pixels associated with the image.

Parameters:
imageId -
Returns:
the list of pixels.
Throws:
DSOutOfServiceException - If the connection is broken, or logged in
omero.ServerError - If an error occurred while trying to

getDatasets

List<omero.model.Dataset> getDatasets(List<Long> ids,
                                      boolean getLeaves)
                                      throws omero.ServerError
Get the Datasets with id's passed as list in ids.

Parameters:
ids - see above.
getLeaves - should image data be populated.
Returns:
see above.
Throws:
DSOutOfServiceException
omero.ServerError

getProjects

List<omero.model.Project> getProjects(List<Long> ids,
                                      boolean getLeaves)
                                      throws omero.ServerError
Get the projects in the users.

Parameters:
ids - The ids of the users.
getLeaves - see above.
Returns:
see above.
Throws:
DSOutOfServiceException
omero.ServerError

getPixelTypes

List<omero.model.PixelsType> getPixelTypes()
                                           throws omero.ServerError
Get the PixelTypes available in the system.

Returns:
see above.
Throws:
DSOutOfServiceException
omero.ServerError

getPixelType

omero.model.PixelsType getPixelType(String type)
                                    throws omero.ServerError
Get the pixelsType with type.

Parameters:
type - see above.
Returns:
see above.
Throws:
DSOutOfServiceException
omero.ServerError

findAllByQuery

List<omero.model.IObject> findAllByQuery(String myQuery)
                                         throws omero.ServerError
Run the query against the iQuery interface.

Parameters:
myQuery - the string containing the query.
Returns:
result of query
Throws:
DSOutOfServiceException
omero.ServerError

findByQuery

omero.model.IObject findByQuery(String myQuery)
                                throws omero.ServerError
Run the query against the iQuery interface.

Parameters:
myQuery - the string containing the query.
Returns:
result of query
Throws:
DSOutOfServiceException
omero.ServerError

attachImageToDataset

void attachImageToDataset(omero.model.Dataset dataset,
                          omero.model.Image image)
                          throws omero.ServerError
Attach an image to a dataset.

Parameters:
dataset -
image -
Throws:
DSOutOfServiceException
omero.ServerError

getImageFromDatasetByName

List<omero.model.Image> getImageFromDatasetByName(Long datasetId,
                                                  String imageName)
                                                  throws omero.ServerError
Get the images from the dataset with name, this can use wild cards.

Parameters:
datasetId - see above.
imageName - see above.
Returns:
see above.
Throws:
DSOutOfServiceException
omero.ServerError

getImageByName

List<omero.model.Image> getImageByName(String imageName)
                                       throws omero.ServerError
Get the list of images with name containing imageName.

Parameters:
imageName - see above.
Returns:
see above.
Throws:
DSOutOfServiceException
omero.ServerError

saveObject

void saveObject(omero.model.IObject obj)
                throws omero.ServerError
Save the object to the db .

Parameters:
obj - see above.
Throws:
DSOutOfServiceException
omero.ServerError

saveAndReturnObject

omero.model.IObject saveAndReturnObject(omero.model.IObject obj)
                                        throws omero.ServerError
Save and return the Object.

Parameters:
obj - see above.
Returns:
see above.
Throws:
DSOutOfServiceException
omero.ServerError

saveArray

void saveArray(List<omero.model.IObject> graph)
               throws omero.ServerError
Save the array.

Parameters:
graph - see above.
Throws:
DSOutOfServiceException
omero.ServerError

saveAndReturnArray

<T extends omero.model.IObject> List<T> saveAndReturnArray(List<omero.model.IObject> graph)
                                                       throws omero.ServerError
Save and return the array.

Type Parameters:
T - The Type to return.
Parameters:
graph - the object
Returns:
see above.
Throws:
DSOutOfServiceException
omero.ServerError

deleteObject

void deleteObject(omero.model.IObject row)
                  throws omero.ServerError
Delete the object.

Parameters:
row - the object.(commonly a row in db)
Throws:
DSOutOfServiceException
omero.ServerError

updatePixels

omero.model.Pixels updatePixels(omero.model.Pixels object)
                                throws omero.ServerError
Update the pixels object in the server.

Parameters:
object - see above.
Returns:
The newly updated object.
Throws:
DSOutOfServiceException
DSAccessException
omero.ServerError

getScripts

Map<Long,String> getScripts()
                            throws omero.ServerError
Get the scripts from the iScript Service.

Returns:
All the available scripts in a map by id and name.
Throws:
omero::ServerError
omero.ServerError

getScriptID

long getScriptID(String name)
                 throws omero.ServerError
Get the id of the script with name

Parameters:
name - name of the script.
Returns:
the id of the script.
Throws:
omero::ServerError
omero.ServerError

uploadScript

long uploadScript(String script)
                  throws omero.ServerError
Upload the script to the server.

Parameters:
script - script to upload
Returns:
id of the new script.
Throws:
omero::ServerError
omero.ServerError

getScript

String getScript(long id)
                 throws omero.ServerError
Get the script with id, this returns the actual script as a string.

Parameters:
id - id of the script to retrieve.
Returns:
see above.
Throws:
omero::ServerError
omero.ServerError

getParams

Map<String,omero.RType> getParams(long id)
                                  throws omero.ServerError
Get the parameters the script takes, this is a map of the parameter name and type.

Parameters:
id - id of the script.
Returns:
see above.
Throws:
omero::ServerError
omero.ServerError

runScript

Map<String,omero.RType> runScript(long id,
                                  Map<String,omero.RType> map)
                                  throws omero.ServerError
Run the script and get the results returned as a name , value map.

Parameters:
id - id of the script to run.
map - the map of parameters, values for inputs.
Returns:
see above.
Throws:
omero::ServerError
omero.ServerError

deleteScript

void deleteScript(long id)
                  throws omero.ServerError
Delete the script with id from the server.

Parameters:
id - id of the script to delete.
Throws:
omero::ServerError
omero.ServerError


OmeroJava Api

Version: Beta-4.1.1-r5927-b91

Copyright © 2009 The University of Dundee. All Rights Reserved.