Package fr.igred.omero.containers
Class ProjectWrapper
- java.lang.Object
-
- fr.igred.omero.ObjectWrapper<T>
-
- fr.igred.omero.AnnotatableWrapper<T>
-
- fr.igred.omero.RepositoryObjectWrapper<ProjectData>
-
- fr.igred.omero.containers.ProjectWrapper
-
- All Implemented Interfaces:
Annotatable
,ContainerLinked
,Project
,ImageLinked
,RemoteObject
,RepositoryObject
public class ProjectWrapper extends RepositoryObjectWrapper<ProjectData> implements Project
Class containing a ProjectData object.Wraps function calls to the Project contained
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ANNOTATION_LINK
Annotation link name for this type of object-
Fields inherited from class fr.igred.omero.ObjectWrapper
data
-
-
Constructor Summary
Constructors Constructor Description ProjectWrapper(DataManager dm, java.lang.String name, java.lang.String description)
Constructor of the ProjectWrapper class.ProjectWrapper(ProjectData project)
Constructor of the ProjectWrapper class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Dataset
addDataset(Client client, java.lang.String name, java.lang.String description)
Adds a dataset to the project in OMERO.protected java.lang.String
annotationLinkType()
Returns the type of annotation link for this object.java.util.List<Dataset>
getDatasets()
Gets all the datasets in the project available from OMERO.java.lang.String
getDescription()
Gets the project description.java.util.List<Image>
getImages(Browser browser)
Gets all images in the project available from OMERO.java.lang.String
getName()
Gets the project name.void
reload(Browser browser)
Reloads the project from OMERO.void
removeDataset(Client client, Dataset dataset)
Removes a dataset from the project in OMERO.void
setDescription(java.lang.String description)
Sets the description of the project.void
setName(java.lang.String name)
Sets the name of the project.-
Methods inherited from class fr.igred.omero.RepositoryObjectWrapper
importImage, importImages
-
Methods inherited from class fr.igred.omero.AnnotatableWrapper
addAndReplaceFile, addAndReplaceTable, addKeyValuePair, addTag, addTag, getAnnotations, getFileAnnotations, getMapAnnotations, getMyRating, getTable, getTags, rate, removeLink, unlink
-
Methods inherited from class fr.igred.omero.ObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface fr.igred.omero.Annotatable
addAndReplaceFile, addAndReplaceFile, addAndReplaceTable, addAndReplaceTable, addFile, addKeyValuePair, addTable, addTag, addTag, addTags, copyAnnotationLinks, getAnnotationData, getAnnotations, getFileAnnotations, getKeyValuePairs, getMapAnnotations, getMyRating, getTable, getTables, getTags, getValues, isLinked, link, link, linkIfNotLinked, rate, unlink
-
Methods inherited from interface fr.igred.omero.containers.Project
addDataset, asDataObject, getDatasets, getDatasets, getImages, getImages, getImagesLike, getImagesTagged, getImagesTagged, getImagesWithKey, getImagesWithKeyValuePair, getProjects
-
Methods inherited from interface fr.igred.omero.RemoteObject
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate
-
-
-
-
Field Detail
-
ANNOTATION_LINK
public static final java.lang.String ANNOTATION_LINK
Annotation link name for this type of object- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProjectWrapper
public ProjectWrapper(ProjectData project)
Constructor of the ProjectWrapper class.- Parameters:
project
- ProjectData to be contained.
-
ProjectWrapper
public ProjectWrapper(DataManager dm, java.lang.String name, java.lang.String description) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Constructor of the ProjectWrapper class. Creates a new project and save it to OMERO.- Parameters:
dm
- The data manager.name
- Project name.description
- Project description.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the project name.- Specified by:
getName
in interfaceRepositoryObject
- Returns:
- See above.
-
setName
public void setName(java.lang.String name)
Sets the name of the project.
-
getDescription
public java.lang.String getDescription()
Gets the project description.- Specified by:
getDescription
in interfaceRepositoryObject
- Returns:
- See above.
-
setDescription
public void setDescription(java.lang.String description)
Sets the description of the project.- Specified by:
setDescription
in interfaceProject
- Parameters:
description
- The description of the project.
-
annotationLinkType
protected java.lang.String annotationLinkType()
Returns the type of annotation link for this object.- Specified by:
annotationLinkType
in classAnnotatableWrapper<ProjectData>
- Returns:
- See above.
-
getDatasets
public java.util.List<Dataset> getDatasets()
Gets all the datasets in the project available from OMERO.- Specified by:
getDatasets
in interfaceProject
- Returns:
- Collection of Dataset.
-
addDataset
public Dataset addDataset(Client client, java.lang.String name, java.lang.String description) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Adds a dataset to the project in OMERO. Create the dataset.- Specified by:
addDataset
in interfaceProject
- Parameters:
client
- The client handling the connection.name
- Dataset name.description
- Dataset description.- Returns:
- The object saved in OMERO.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
removeDataset
public void removeDataset(Client client, Dataset dataset) throws ServiceException, AccessException, java.util.concurrent.ExecutionException, ServerException, java.lang.InterruptedException
Removes a dataset from the project in OMERO.- Specified by:
removeDataset
in interfaceProject
- Parameters:
client
- The client handling the connection.dataset
- Dataset to remove.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.ServerException
- Server error.java.lang.InterruptedException
- If block(long) does not return.
-
getImages
public java.util.List<Image> getImages(Browser browser) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Gets all images in the project available from OMERO.- Specified by:
getImages
in interfaceImageLinked
- Specified by:
getImages
in interfaceProject
- Parameters:
browser
- The data browser.- Returns:
- See above.
- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
reload
public void reload(Browser browser) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Reloads the project from OMERO.- Specified by:
reload
in interfaceProject
- Parameters:
browser
- The data browser.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.java.util.concurrent.ExecutionException
- A Facility can't be retrieved or instantiated.
-
-