Package fr.igred.omero.repository
Class ScreenWrapper
- java.lang.Object
-
- fr.igred.omero.GenericObjectWrapper<T>
-
- fr.igred.omero.AnnotatableWrapper<T>
-
- fr.igred.omero.repository.GenericRepositoryObjectWrapper<ScreenData>
-
- fr.igred.omero.repository.ScreenWrapper
-
public class ScreenWrapper extends GenericRepositoryObjectWrapper<ScreenData>
Class containing a ScreenData object.Wraps function calls to the ScreenData contained.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class fr.igred.omero.repository.GenericRepositoryObjectWrapper
GenericRepositoryObjectWrapper.ReplacePolicy
-
-
Field Summary
Fields Modifier and Type Field Description static String
ANNOTATION_LINK
Annotation link name for this type of object-
Fields inherited from class fr.igred.omero.GenericObjectWrapper
data
-
-
Constructor Summary
Constructors Constructor Description ScreenWrapper(Client client, String name, String description)
Constructor of the ProjectWrapper class.ScreenWrapper(ScreenData screen)
Constructor of the class ScreenWrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected String
annotationLinkType()
Returns the type of annotation link for this object.ScreenData
asScreenData()
Deprecated.Returns the ScreenData contained.String
getDescription()
Gets the screen descriptionList<ImageWrapper>
getImages(Client client)
Retrieves the images contained in this screen.String
getName()
Gets the screen name.List<PlateAcquisitionWrapper>
getPlateAcquisitions(Client client)
Returns the plate acquisitions linked to this object, either directly, or through parents/children.List<PlateWrapper>
getPlates()
Returns the plates contained in this screen.List<PlateWrapper>
getPlates(String name)
Returns the plates contained in this screen, with the specified name.String
getProtocolDescription()
Returns the description of the protocol.String
getProtocolIdentifier()
Returns the identifier of the protocol.String
getReagentSetDescription()
Returns the description of the reagent set.String
getReagentSetIdentifier()
Returns the identifier of the Reagent set.List<WellWrapper>
getWells(Client client)
Retrieves the wells linked to this object, either directly, or through parents/children.List<Long>
importImage(GatewayWrapper client, String path)
Imports one image file to the screen in OMERO.boolean
importImages(GatewayWrapper client, int threads, String... paths)
Imports all images candidates in the paths to the screen in OMERO.boolean
importImages(GatewayWrapper client, String... paths)
Imports all images candidates in the paths to the screen in OMERO.void
refresh(GatewayWrapper client)
Reloads the screen from OMERO.void
setDescription(String description)
Sets the description of the screen.void
setName(String name)
Sets the name of the screen.void
setProtocolDescription(String value)
Sets the description of the protocol.void
setProtocolIdentifier(String value)
Sets the identifier of the protocol.void
setReagentSetDescription(String value)
Sets the identifier of the reagent.void
setReagentSetIdentifier(String value)
Sets the identifier of the reagent.-
Methods inherited from class fr.igred.omero.repository.GenericRepositoryObjectWrapper
copyAnnotationLinks, importImage, importImages
-
Methods inherited from class fr.igred.omero.AnnotatableWrapper
addAndReplaceFile, addAndReplaceFile, addAndReplaceTable, addAndReplaceTable, addFile, addFileAnnotation, addKeyValuePair, addMapAnnotation, addPairKeyValue, addTable, addTag, addTag, addTag, addTags, addTags, copyAnnotationLinks, getAnnotations, getFileAnnotations, getKeyValuePairs, getMapAnnotations, getMyRating, getTable, getTables, getTags, getValue, isLinked, link, link, linkIfNotLinked, rate, removeLink, unlink
-
Methods inherited from class fr.igred.omero.GenericObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, delete, distinct, flatten, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
-
-
-
-
Field Detail
-
ANNOTATION_LINK
public static final String ANNOTATION_LINK
Annotation link name for this type of object- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ScreenWrapper
public ScreenWrapper(Client client, String name, String description) throws ServiceException, AccessException, ExecutionException
Constructor of the ProjectWrapper class. Creates a new project and saves it to OMERO.- Parameters:
client
- The client handling the connection.name
- Project name.description
- Project description.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
ScreenWrapper
public ScreenWrapper(ScreenData screen)
Constructor of the class ScreenWrapper.- Parameters:
screen
- The ScreenData contained in the ScreenWrapper.
-
-
Method Detail
-
annotationLinkType
protected String annotationLinkType()
Returns the type of annotation link for this object.- Specified by:
annotationLinkType
in classAnnotatableWrapper<ScreenData>
- Returns:
- See above.
-
getName
public String getName()
Gets the screen name.- Specified by:
getName
in classGenericRepositoryObjectWrapper<ScreenData>
- Returns:
- See above.
-
setName
public void setName(String name)
Sets the name of the screen.- Parameters:
name
- The name of the screen. Mustn't benull
.- Throws:
IllegalArgumentException
- If the name isnull
.
-
asScreenData
@Deprecated public ScreenData asScreenData()
Deprecated.Returns the ScreenData contained. UseGenericObjectWrapper.asDataObject()
instead.- Returns:
- See above.
-
getDescription
public String getDescription()
Gets the screen description- Specified by:
getDescription
in classGenericRepositoryObjectWrapper<ScreenData>
- Returns:
- See above.
-
setDescription
public void setDescription(String description)
Sets the description of the screen.- Parameters:
description
- The description of the screen.
-
getPlates
public List<PlateWrapper> getPlates()
Returns the plates contained in this screen.- Returns:
- See above.
-
getPlates
public List<PlateWrapper> getPlates(String name)
Returns the plates contained in this screen, with the specified name.- Parameters:
name
- The expected plates name.- Returns:
- See above.
-
getPlateAcquisitions
public List<PlateAcquisitionWrapper> getPlateAcquisitions(Client client) throws ServiceException, AccessException, ExecutionException
Returns the plate acquisitions linked to this object, either directly, or through parents/children.- Parameters:
client
- The client handling the connection.- Returns:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getWells
public List<WellWrapper> getWells(Client client) throws ServiceException, AccessException, ExecutionException
Retrieves the wells linked to this object, either directly, or through parents/children.- Parameters:
client
- The client handling the connection.- Returns:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getImages
public List<ImageWrapper> getImages(Client client) throws ServiceException, AccessException, ExecutionException
Retrieves the images contained in this screen.- Parameters:
client
- The client handling the connection.- Returns:
- See above
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getProtocolDescription
public String getProtocolDescription()
Returns the description of the protocol.- Returns:
- See above.
-
setProtocolDescription
public void setProtocolDescription(String value)
Sets the description of the protocol.- Parameters:
value
- The value to set.
-
getProtocolIdentifier
public String getProtocolIdentifier()
Returns the identifier of the protocol.- Returns:
- See above.
-
setProtocolIdentifier
public void setProtocolIdentifier(String value)
Sets the identifier of the protocol.- Parameters:
value
- The value to set.
-
getReagentSetDescription
public String getReagentSetDescription()
Returns the description of the reagent set.- Returns:
- See above.
-
setReagentSetDescription
public void setReagentSetDescription(String value)
Sets the identifier of the reagent.- Parameters:
value
- The value to set.
-
getReagentSetIdentifier
public String getReagentSetIdentifier()
Returns the identifier of the Reagent set.- Returns:
- See above.
-
setReagentSetIdentifier
public void setReagentSetIdentifier(String value)
Sets the identifier of the reagent.- Parameters:
value
- The value to set.
-
refresh
public void refresh(GatewayWrapper client) throws ServiceException, AccessException, ExecutionException
Reloads the screen from OMERO.- Parameters:
client
- The client handling the connection.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
importImages
public boolean importImages(GatewayWrapper client, String... paths) throws ServiceException, OMEROServerError, AccessException, IOException, ExecutionException
Imports all images candidates in the paths to the screen in OMERO.- Parameters:
client
- The client handling the connection.paths
- Paths to the image files on the computer.- Returns:
- If the import did not exit because of an error.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.OMEROServerError
- Server error.IOException
- Cannot read file.ExecutionException
- A Facility can't be retrieved or instantiated.
-
importImages
public boolean importImages(GatewayWrapper client, int threads, String... paths) throws ServiceException, OMEROServerError, AccessException, IOException, ExecutionException
Imports all images candidates in the paths to the screen in OMERO.- Parameters:
client
- The client handling the connection.threads
- The number of threads (same value used for filesets and uploads).paths
- Paths to the image files on the computer.- Returns:
- If the import did not exit because of an error.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.OMEROServerError
- Server error.IOException
- Cannot read file.ExecutionException
- A Facility can't be retrieved or instantiated.
-
importImage
public List<Long> importImage(GatewayWrapper client, String path) throws ServiceException, AccessException, OMEROServerError, ExecutionException
Imports one image file to the screen in OMERO.- Parameters:
client
- The client handling the connection.path
- Path to the image file on the computer.- Returns:
- The list of IDs of the newly imported images.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.OMEROServerError
- Server error.ExecutionException
- A Facility can't be retrieved or instantiated.
-
-