ROIs are now linked to the image directly. * - * @param client The client handling the connection. + * @param dm The data manager. * @param imageId The image ID. * * @throws ServiceException Cannot connect to OMERO. * @throws AccessException Cannot access data. * @throws ExecutionException A Facility can't be retrieved or instantiated. */ - public void unlinkAllROIs(DataManager client, long imageId) + public void unlinkAllROIs(DataManager dm, long imageId) throws ServiceException, AccessException, ExecutionException { - unlinkROIs(client, getROIs(client, imageId)); + unlinkROIs(dm, getROIs(dm, imageId)); } @@ -411,16 +411,16 @@ public void unlinkAllROIs(DataManager client, long imageId) * Unlink all ROIs associated to the provided image from the folder. *
ROIs are now linked to the image directly. * - * @param client The client handling the connection. - * @param image The image. + * @param dm The data manager. + * @param image The image. * * @throws ServiceException Cannot connect to OMERO. * @throws AccessException Cannot access data. * @throws ExecutionException A Facility can't be retrieved or instantiated. */ - public void unlinkAllROIs(DataManager client, ImageWrapper image) + public void unlinkAllROIs(DataManager dm, ImageWrapper image) throws ServiceException, AccessException, ExecutionException { - unlinkAllROIs(client, image.getId()); + unlinkAllROIs(dm, image.getId()); } @@ -429,16 +429,16 @@ public void unlinkAllROIs(DataManager client, ImageWrapper image) *
The folder must be loaded beforehand.
*ROIs are now linked to their images directly.
* - * @param client The client handling the connection. + * @param dm The data manager. * * @throws ServiceException Cannot connect to OMERO. * @throws AccessException Cannot access data. * @throws ExecutionException A Facility can't be retrieved or instantiated. */ - public void unlinkAllROIs(DataManager client) + public void unlinkAllROIs(DataManager dm) throws ServiceException, AccessException, ExecutionException { CollectionThe ROIs are now linked to the image directly. * - * @param client The data manager. - * @param rois ROI to unlink. + * @param dm The data manager. + * @param rois ROI to unlink. * * @throws ServiceException Cannot connect to OMERO. * @throws AccessException Cannot access data. * @throws ExecutionException A Facility can't be retrieved or instantiated. */ - public void unlinkROIs(DataManager client, ROIWrapper... rois) + public void unlinkROIs(DataManager dm, ROIWrapper... rois) throws ServiceException, AccessException, ExecutionException { - unlinkROIs(client, Arrays.asList(rois)); + unlinkROIs(dm, Arrays.asList(rois)); } @@ -463,20 +463,20 @@ public void unlinkROIs(DataManager client, ROIWrapper... rois) * Unlink ROIs from the folder. *
The ROIs are now linked to the image directly.
*
- * @param client The data manager.
- * @param rois ROI to unlink.
+ * @param dm The data manager.
+ * @param rois ROI to unlink.
*
* @throws ServiceException Cannot connect to OMERO.
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- public void unlinkROIs(DataManager client, Collection extends ROIWrapper> rois)
+ public void unlinkROIs(DataManager dm, Collection extends ROIWrapper> rois)
throws ServiceException, AccessException, ExecutionException {
List The project needs to be reloaded afterwards to list the new dataset. DO NOT USE IT IF A SHAPE WAS DELETED !!!
*
- * @param client The client handling the connection.
- * @param rois ROIs to be added.
+ * @param dm The data manager.
+ * @param rois ROIs to be added.
*
* @return The updated list of ROIs.
*
@@ -517,14 +517,14 @@ public List DO NOT USE IT IF A SHAPE WAS DELETED !!!
*
- * @param client The data manager.
- * @param rois ROIs to be added.
+ * @param dm The data manager.
+ * @param rois ROIs to be added.
*
* @return The updated list of ROIs.
*
@@ -545,16 +545,16 @@ public List
*
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- boolean createRawDataFacility(ConnectionHandler client) throws ExecutionException {
+ boolean createRawDataFacility(ConnectionHandler conn) throws ExecutionException {
boolean created = false;
if (rawDataFacility == null) {
- rawDataFacility = client.getGateway()
- .getFacility(RawDataFacility.class);
+ rawDataFacility = conn.getGateway()
+ .getFacility(RawDataFacility.class);
created = true;
}
return created;
@@ -393,23 +393,23 @@ void destroyRawDataFacility() {
/**
* Returns an array containing the value for each voxel
*
- * @param client The client handling the connection.
+ * @param conn The connection handler.
*
* @return Array containing the value for each voxel of the image.
*
* @throws AccessException If an error occurs while retrieving the plane data from the pixels source.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- public double[][][][][] getAllPixels(ConnectionHandler client)
+ public double[][][][][] getAllPixels(ConnectionHandler conn)
throws AccessException, ExecutionException {
- return getAllPixels(client, null, null, null, null, null);
+ return getAllPixels(conn, null, null, null, null, null);
}
/**
* Returns an array containing the value for each voxel corresponding to the bounds
*
- * @param client The client handling the connection.
+ * @param conn The connection handler.
* @param xBounds Array containing the X bounds from which the pixels should be retrieved.
* @param yBounds Array containing the Y bounds from which the pixels should be retrieved.
* @param cBounds Array containing the C bounds from which the pixels should be retrieved.
@@ -421,14 +421,14 @@ public double[][][][][] getAllPixels(ConnectionHandler client)
* @throws AccessException If an error occurs while retrieving the plane data from the pixels source.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- public double[][][][][] getAllPixels(ConnectionHandler client,
+ public double[][][][][] getAllPixels(ConnectionHandler conn,
int[] xBounds,
int[] yBounds,
int[] cBounds,
int[] zBounds,
int[] tBounds)
throws AccessException, ExecutionException {
- boolean rdf = createRawDataFacility(client);
+ boolean rdf = createRawDataFacility(conn);
Bounds lim = getBounds(xBounds, yBounds, cBounds, zBounds, tBounds);
Coordinates start = lim.getStart();
@@ -452,7 +452,7 @@ public double[][][][][] getAllPixels(ConnectionHandler client,
for (int z = 0, posZ = startZ; z < sizeZ; z++, posZ++) {
for (int c = 0, posC = startC; c < sizeC; c++, posC++) {
Coordinates pos = new Coordinates(x0, y0, posC, posZ, posT);
- tab[t][z][c] = getTile(client, pos, sx, sy);
+ tab[t][z][c] = getTile(conn, pos, sx, sy);
}
}
}
@@ -467,7 +467,7 @@ public double[][][][][] getAllPixels(ConnectionHandler client,
/**
* Gets the tile at the specified position, with the defined width and height.
*
- * @param client The client handling the connection.
+ * @param conn The connection handler.
* @param start Start position of the tile.
* @param width Width of the tile.
* @param height Height of the tile.
@@ -477,11 +477,11 @@ public double[][][][][] getAllPixels(ConnectionHandler client,
* @throws AccessException If an error occurs while retrieving the plane data from the pixels source.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- double[][] getTile(ConnectionHandler client, Coordinates start, int width, int height)
+ double[][] getTile(ConnectionHandler conn, Coordinates start, int width, int height)
throws AccessException, ExecutionException {
- boolean rdf = createRawDataFacility(client);
+ boolean rdf = createRawDataFacility(conn);
double[][] tile = ExceptionHandler.of(this,
- t -> t.getTileUnchecked(client.getCtx(), start, width, height))
+ t -> t.getTileUnchecked(conn.getCtx(), start, width, height))
.rethrow(DataSourceException.class,
AccessException::new,
"Cannot read tile")
@@ -530,24 +530,24 @@ private double[][] getTileUnchecked(SecurityContext ctx, Coordinates start, int
/**
* Returns an array containing the raw values for each voxel for each planes
*
- * @param client The client handling the connection.
- * @param bpp Bytes per pixels of the image.
+ * @param conn The connection handler.
+ * @param bpp Bytes per pixels of the image.
*
* @return a table of bytes containing the pixel values
*
* @throws AccessException If an error occurs while retrieving the plane data from the pixels source.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- public byte[][][][] getRawPixels(ConnectionHandler client, int bpp)
+ public byte[][][][] getRawPixels(ConnectionHandler conn, int bpp)
throws AccessException, ExecutionException {
- return getRawPixels(client, null, null, null, null, null, bpp);
+ return getRawPixels(conn, null, null, null, null, null, bpp);
}
/**
* Returns an array containing the raw values for each voxel for each plane corresponding to the bounds
*
- * @param client The client handling the connection.
+ * @param conn The connection handler.
* @param xBounds Array containing the X bounds from which the pixels should be retrieved.
* @param yBounds Array containing the Y bounds from which the pixels should be retrieved.
* @param cBounds Array containing the C bounds from which the pixels should be retrieved.
@@ -560,7 +560,7 @@ public byte[][][][] getRawPixels(ConnectionHandler client, int bpp)
* @throws AccessException If an error occurs while retrieving the plane data from the pixels source.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- public byte[][][][] getRawPixels(ConnectionHandler client,
+ public byte[][][][] getRawPixels(ConnectionHandler conn,
int[] xBounds,
int[] yBounds,
int[] cBounds,
@@ -568,7 +568,7 @@ public byte[][][][] getRawPixels(ConnectionHandler client,
int[] tBounds,
int bpp)
throws ExecutionException, AccessException {
- boolean rdf = createRawDataFacility(client);
+ boolean rdf = createRawDataFacility(conn);
Bounds lim = getBounds(xBounds, yBounds, cBounds, zBounds, tBounds);
Coordinates start = lim.getStart();
@@ -592,7 +592,7 @@ public byte[][][][] getRawPixels(ConnectionHandler client,
for (int z = 0, posZ = startZ; z < sizeZ; z++, posZ++) {
for (int c = 0, posC = startC; c < sizeC; c++, posC++) {
Coordinates pos = new Coordinates(x0, y0, posC, posZ, posT);
- bytes[t][z][c] = getRawTile(client, pos, sx, sy, bpp);
+ bytes[t][z][c] = getRawTile(conn, pos, sx, sy, bpp);
}
}
}
@@ -606,7 +606,7 @@ public byte[][][][] getRawPixels(ConnectionHandler client,
/**
* Gets the tile at the specified position, with the defined width and height.
*
- * @param client The client handling the connection.
+ * @param conn The connection handler.
* @param start Start position of the tile.
* @param width Width of the tile.
* @param height Height of the tile.
@@ -617,11 +617,11 @@ public byte[][][][] getRawPixels(ConnectionHandler client,
* @throws AccessException If an error occurs while retrieving the plane data from the pixels source.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- byte[] getRawTile(ConnectionHandler client, Coordinates start, int width, int height, int bpp)
+ byte[] getRawTile(ConnectionHandler conn, Coordinates start, int width, int height, int bpp)
throws AccessException, ExecutionException {
- boolean rdf = createRawDataFacility(client);
+ boolean rdf = createRawDataFacility(conn);
byte[] tile = ExceptionHandler.of(this,
- t -> t.getRawTileUnchecked(client.getCtx(), start, width, height, bpp))
+ t -> t.getRawTileUnchecked(conn.getCtx(), start, width, height, bpp))
.rethrow(DataSourceException.class,
AccessException::new,
"Cannot read raw tile")
diff --git a/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java b/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java
index 521023b1..be181ec5 100644
--- a/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java
+++ b/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java
@@ -20,7 +20,6 @@
import fr.igred.omero.ObjectWrapper;
import fr.igred.omero.client.AdminManager;
-import fr.igred.omero.client.Client;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
import omero.gateway.model.ExperimenterData;
@@ -226,7 +225,7 @@ public boolean isLeader(GroupWrapper group) {
/**
* Returns {@code true} if the user is a full admin.
*
- * @param client {@link Client} that handles the connection
+ * @param admin The admin manager.
*
* @return See above.
*
@@ -234,10 +233,10 @@ public boolean isLeader(GroupWrapper group) {
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- public boolean isAdmin(AdminManager client)
+ public boolean isAdmin(AdminManager admin)
throws ServiceException, AccessException, ExecutionException {
- return !call(client.getAdminFacility(),
- a -> a.getAdminPrivileges(client.getCtx(), data),
+ return !call(admin.getAdminFacility(),
+ a -> a.getAdminPrivileges(admin.getCtx(), data),
"Cannot retrieve admin privileges.").isEmpty();
}
diff --git a/src/main/java/fr/igred/omero/roi/ROIWrapper.java b/src/main/java/fr/igred/omero/roi/ROIWrapper.java
index 68879a08..b2bba3d1 100644
--- a/src/main/java/fr/igred/omero/roi/ROIWrapper.java
+++ b/src/main/java/fr/igred/omero/roi/ROIWrapper.java
@@ -446,15 +446,15 @@ public void deleteShape(int pos) {
/**
* Saves the ROI.
*
- * @param client The client handling the connection.
+ * @param dm The data manager.
*
- * @throws AccessException Cannot access data.
- * @throws ServiceException Cannot connect to OMERO.
+ * @throws AccessException Cannot access data.
+ * @throws ServiceException Cannot connect to OMERO.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- public void saveROI(DataManager client)
+ public void saveROI(DataManager dm)
throws AccessException, ServiceException, ExecutionException {
- Roi roi = (Roi) client.save(data.asIObject());
+ Roi roi = (Roi) dm.save(data.asIObject());
data = new ROIData(roi);
}
@@ -573,7 +573,7 @@ protected String annotationLinkType() {
/**
* Attach an {@link AnnotationData} to this object.
*
- * @param client The client handling the connection.
+ * @param dm The data manager.
* @param annotation The {@link AnnotationData}.
* @param The type of the annotation.
*
@@ -582,12 +582,12 @@ protected String annotationLinkType() {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- protected void link(DataManager client, A annotation)
+ protected void link(DataManager dm, A annotation)
throws ServiceException, AccessException, ExecutionException {
RoiAnnotationLink link = new RoiAnnotationLinkI();
link.setChild(annotation.asAnnotation());
link.setParent((Roi) data.asIObject());
- client.save(link);
+ dm.save(link);
}
}
\ No newline at end of file
diff --git a/src/main/java/fr/igred/omero/roi/ShapeWrapper.java b/src/main/java/fr/igred/omero/roi/ShapeWrapper.java
index 0ba5911a..347f234b 100644
--- a/src/main/java/fr/igred/omero/roi/ShapeWrapper.java
+++ b/src/main/java/fr/igred/omero/roi/ShapeWrapper.java
@@ -608,7 +608,7 @@ protected String annotationLinkType() {
/**
* Attach an {@link AnnotationData} to this object.
*
- * @param client The client handling the connection.
+ * @param dm The data manager.
* @param annotation The {@link AnnotationData}.
* @param The type of the annotation.
*
@@ -617,12 +617,12 @@ protected String annotationLinkType() {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- public void link(DataManager client, A annotation)
+ public void link(DataManager dm, A annotation)
throws ServiceException, AccessException, ExecutionException {
ShapeAnnotationLink link = new ShapeAnnotationLinkI();
link.setChild(annotation.asAnnotation());
link.setParent((omero.model.Shape) data.asIObject());
- client.save(link);
+ dm.save(link);
}
}
diff --git a/src/main/java/fr/igred/omero/screen/PlateAcquisitionWrapper.java b/src/main/java/fr/igred/omero/screen/PlateAcquisitionWrapper.java
index ec2aff4f..ffbbe000 100644
--- a/src/main/java/fr/igred/omero/screen/PlateAcquisitionWrapper.java
+++ b/src/main/java/fr/igred/omero/screen/PlateAcquisitionWrapper.java
@@ -131,7 +131,7 @@ public void setDescription(String description) {
/**
* Adds a tag to the object in OMERO, if possible.
*
- * @param client The client handling the connection.
+ * @param dm The data manager.
* @param annotation Tag to be added.
* @param The type of the annotation.
*
@@ -140,12 +140,12 @@ public void setDescription(String description) {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- protected void link(DataManager client, A annotation)
+ protected void link(DataManager dm, A annotation)
throws ServiceException, AccessException, ExecutionException {
PlateAcquisitionAnnotationLink link = new PlateAcquisitionAnnotationLinkI();
link.setChild(annotation.asAnnotation());
link.setParent((omero.model.PlateAcquisition) data.asIObject());
- client.save(link);
+ dm.save(link);
}
diff --git a/src/main/java/fr/igred/omero/screen/ScreenWrapper.java b/src/main/java/fr/igred/omero/screen/ScreenWrapper.java
index fdac53f1..0d87a42f 100644
--- a/src/main/java/fr/igred/omero/screen/ScreenWrapper.java
+++ b/src/main/java/fr/igred/omero/screen/ScreenWrapper.java
@@ -53,7 +53,7 @@ public class ScreenWrapper extends RepositoryObjectWrapper