diff --git a/README.md b/README.md index 372d90b2..02ecb1e8 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Client client = new Client(); client.connect("host", 4064, "username", password, groupId); ``` -### Repository objects (projects, datasets, images) +### Repository objects (projects, datasets, images, screens, wells, plates) It can then be used to retrieve all the repository objects the user has access to, like projects or datasets: diff --git a/src/main/java/fr/igred/omero/annotations/TableWrapper.java b/src/main/java/fr/igred/omero/annotations/TableWrapper.java index 648621d6..42294072 100644 --- a/src/main/java/fr/igred/omero/annotations/TableWrapper.java +++ b/src/main/java/fr/igred/omero/annotations/TableWrapper.java @@ -130,7 +130,7 @@ public TableWrapper(TableData table) { * @throws AccessException Cannot access data. * @throws ExecutionException A Facility can't be retrieved or instantiated. */ - public TableWrapper(Client client, ResultsTable results, Long imageId, Collection ijRois) + public TableWrapper(Client client, ResultsTable results, Long imageId, List ijRois) throws ServiceException, AccessException, ExecutionException { this(client, results, imageId, ijRois, ROIWrapper.IJ_PROPERTY); } @@ -150,7 +150,7 @@ public TableWrapper(Client client, ResultsTable results, Long imageId, Collectio * @throws AccessException Cannot access data. * @throws ExecutionException A Facility can't be retrieved or instantiated. */ - public TableWrapper(Client client, ResultsTable results, Long imageId, Collection ijRois, String roiProperty) + public TableWrapper(Client client, ResultsTable results, Long imageId, List ijRois, String roiProperty) throws ServiceException, AccessException, ExecutionException { roiProperty = ROIWrapper.checkProperty(roiProperty); @@ -395,7 +395,7 @@ public String toString() { * @throws AccessException Cannot access data. * @throws ExecutionException A Facility can't be retrieved or instantiated. */ - public void addRows(Client client, ResultsTable results, Long imageId, Collection ijRois) + public void addRows(Client client, ResultsTable results, Long imageId, List ijRois) throws ServiceException, AccessException, ExecutionException { this.addRows(client, results, imageId, ijRois, ROIWrapper.IJ_PROPERTY); } @@ -415,7 +415,7 @@ public void addRows(Client client, ResultsTable results, Long imageId, Collectio * @throws AccessException Cannot access data. * @throws ExecutionException A Facility can't be retrieved or instantiated. */ - public void addRows(Client client, ResultsTable results, Long imageId, Collection ijRois, + public void addRows(Client client, ResultsTable results, Long imageId, List ijRois, String roiProperty) throws ServiceException, AccessException, ExecutionException { roiProperty = ROIWrapper.checkProperty(roiProperty); diff --git a/src/main/java/fr/igred/omero/repository/DatasetWrapper.java b/src/main/java/fr/igred/omero/repository/DatasetWrapper.java index ab37007d..fbdd261a 100644 --- a/src/main/java/fr/igred/omero/repository/DatasetWrapper.java +++ b/src/main/java/fr/igred/omero/repository/DatasetWrapper.java @@ -359,7 +359,7 @@ public List getImagesPairKeyValue(Client client, String key, Strin * @throws AccessException Cannot access data. * @throws ExecutionException A Facility can't be retrieved or instantiated. */ - public void addImages(Client client, Iterable images) + public void addImages(Client client, List images) throws ServiceException, AccessException, ExecutionException { for (ImageWrapper image : images) { addImage(client, image); diff --git a/src/main/java/fr/igred/omero/roi/ROIWrapper.java b/src/main/java/fr/igred/omero/roi/ROIWrapper.java index 8234d250..19caead9 100644 --- a/src/main/java/fr/igred/omero/roi/ROIWrapper.java +++ b/src/main/java/fr/igred/omero/roi/ROIWrapper.java @@ -31,7 +31,6 @@ import omero.model.Roi; import java.util.ArrayList; -import java.util.Collection; import java.util.Comparator; import java.util.LinkedHashMap; import java.util.List; @@ -170,7 +169,7 @@ public static List fromImageJ(List ijRois, Str * * @return The converted list of ImageJ ROIs. */ - public static List toImageJ(Collection rois) { + public static List toImageJ(List rois) { return toImageJ(rois, IJ_PROPERTY); } @@ -184,7 +183,7 @@ public static List toImageJ(Collection rois) { * * @return The converted list of ImageJ ROIs. */ - public static List toImageJ(Collection rois, String property) { + public static List toImageJ(List rois, String property) { property = checkProperty(property); final int maxGroups = 255; @@ -223,7 +222,7 @@ public void setData(ROIData data) { * * @param shapes List of GenericShapeWrapper. */ - public void addShapes(Iterable> shapes) { + public void addShapes(List> shapes) { shapes.forEach(this::addShape); } diff --git a/src/test/java/fr/igred/omero/roi/ROITest.java b/src/test/java/fr/igred/omero/roi/ROITest.java index ffa42750..e499f369 100644 --- a/src/test/java/fr/igred/omero/roi/ROITest.java +++ b/src/test/java/fr/igred/omero/roi/ROITest.java @@ -101,7 +101,7 @@ public void testROI2() throws Exception { public void testRoiAddShapeAndDeleteIt() throws Exception { ImageWrapper image = client.getImage(IMAGE1.id); - Collection> shapes = new ArrayList<>(4); + List> shapes = new ArrayList<>(4); for (int i = 0; i < 4; i++) { RectangleWrapper rectangle = new RectangleWrapper(); rectangle.setCoordinates(i * 2, i * 2, 10, 10);