ome.services.blitz.gateway.services.impl
Class DataServiceImpl

java.lang.Object
  extended by ome.services.blitz.gateway.services.impl.DataServiceImpl
All Implemented Interfaces:
DataService

public class DataServiceImpl
extends Object
implements 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

Constructor Summary
DataServiceImpl(GatewayFactory gatewayFactory)
          Instantiate the imageService with the serviceFactory.
 
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.
 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.
 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.
<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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataServiceImpl

public DataServiceImpl(GatewayFactory gatewayFactory)
Instantiate the imageService with the serviceFactory.

Parameters:
serviceFactory - see above.
Method Detail

attachImageToDataset

public void attachImageToDataset(omero.model.Dataset dataset,
                                 omero.model.Image image)
                          throws omero.ServerError
Description copied from interface: DataService
Attach an image to a dataset.

Specified by:
attachImageToDataset in interface DataService
Throws:
omero.ServerError

deleteObject

public void deleteObject(omero.model.IObject row)
                  throws omero.ServerError
Description copied from interface: DataService
Delete the object.

Specified by:
deleteObject in interface DataService
Parameters:
row - the object.(commonly a row in db)
Throws:
omero.ServerError

findAllByQuery

public List<omero.model.IObject> findAllByQuery(String myQuery)
                                         throws omero.ServerError
Description copied from interface: DataService
Run the query against the iQuery interface.

Specified by:
findAllByQuery in interface DataService
Parameters:
myQuery - the string containing the query.
Returns:
result of query
Throws:
omero.ServerError

findByQuery

public omero.model.IObject findByQuery(String myQuery)
                                throws omero.ServerError
Description copied from interface: DataService
Run the query against the iQuery interface.

Specified by:
findByQuery in interface DataService
Parameters:
myQuery - the string containing the query.
Returns:
result of query
Throws:
omero.ServerError

getDatasets

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

Specified by:
getDatasets in interface DataService
Parameters:
ids - see above.
getLeaves - should image data be populated.
Returns:
see above.
Throws:
omero.ServerError

getImageByName

public List<omero.model.Image> getImageByName(String imageName)
                                       throws omero.ServerError
Description copied from interface: DataService
Get the list of images with name containing imageName.

Specified by:
getImageByName in interface DataService
Parameters:
imageName - see above.
Returns:
see above.
Throws:
omero.ServerError

getImageFromDatasetByName

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

Specified by:
getImageFromDatasetByName in interface DataService
Parameters:
datasetId - see above.
imageName - see above.
Returns:
see above.
Throws:
omero.ServerError

getImages

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

Specified by:
getImages in interface DataService
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:
omero.ServerError - If an error occurred while trying to retrieve data from OMERO service.

getPixelType

public omero.model.PixelsType getPixelType(String type)
                                    throws omero.ServerError
Description copied from interface: DataService
Get the pixelsType with type.

Specified by:
getPixelType in interface DataService
Parameters:
type - see above.
Returns:
see above.
Throws:
omero.ServerError

getPixelTypes

public List<omero.model.PixelsType> getPixelTypes()
                                           throws omero.ServerError
Description copied from interface: DataService
Get the PixelTypes available in the system.

Specified by:
getPixelTypes in interface DataService
Returns:
see above.
Throws:
omero.ServerError

getPixelsFromImage

public List<omero.model.Pixels> getPixelsFromImage(long imageId)
                                            throws omero.ServerError
Description copied from interface: DataService
Get the pixels associated with the image.

Specified by:
getPixelsFromImage in interface DataService
Returns:
the list of pixels.
Throws:
omero.ServerError - If an error occurred while trying to

getProjects

public List<omero.model.Project> getProjects(List<Long> ids,
                                             boolean getLeaves)
                                      throws omero.ServerError
Description copied from interface: DataService
Get the projects in the users.

Specified by:
getProjects in interface DataService
Parameters:
ids - The ids of the users.
getLeaves - see above.
Returns:
see above.
Throws:
omero.ServerError

saveAndReturnArray

public <T extends omero.model.IObject> List<T> saveAndReturnArray(List<omero.model.IObject> graph)
                                                       throws omero.ServerError
Description copied from interface: DataService
Save and return the array.

Specified by:
saveAndReturnArray in interface DataService
Type Parameters:
T - The Type to return.
Parameters:
graph - the object
Returns:
see above.
Throws:
omero.ServerError

saveAndReturnObject

public omero.model.IObject saveAndReturnObject(omero.model.IObject obj)
                                        throws omero.ServerError
Description copied from interface: DataService
Save and return the Object.

Specified by:
saveAndReturnObject in interface DataService
Parameters:
obj - see above.
Returns:
see above.
Throws:
omero.ServerError

saveArray

public void saveArray(List<omero.model.IObject> graph)
               throws omero.ServerError
Description copied from interface: DataService
Save the array.

Specified by:
saveArray in interface DataService
Parameters:
graph - see above.
Throws:
omero.ServerError

saveObject

public void saveObject(omero.model.IObject obj)
                throws omero.ServerError
Description copied from interface: DataService
Save the object to the db .

Specified by:
saveObject in interface DataService
Parameters:
obj - see above.
Throws:
omero.ServerError

updatePixels

public omero.model.Pixels updatePixels(omero.model.Pixels object)
                                throws omero.ServerError
Description copied from interface: DataService
Update the pixels object in the server.

Specified by:
updatePixels in interface DataService
Parameters:
object - see above.
Returns:
The newly updated object.
Throws:
omero.ServerError


OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

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