From 03e6e6a7f6e53ff1975e6143873a76cf73850e3f Mon Sep 17 00:00:00 2001 From: Pierre Pouchin Date: Fri, 3 Nov 2023 14:22:59 +0100 Subject: [PATCH] Refactor packages --- .../fr/igred/omero/AnnotatableWrapper.java | 3 ++- .../java/fr/igred/omero/ObjectWrapper.java | 13 ++-------- .../RepositoryObjectWrapper.java | 9 +++---- .../omero/annotations/AnnotationWrapper.java | 18 ++++++------- .../annotations/FileAnnotationWrapper.java | 2 +- .../igred/omero/annotations/TableWrapper.java | 4 +-- .../annotations/TagAnnotationWrapper.java | 2 +- .../omero/annotations/TagSetWrapper.java | 4 +-- .../fr/igred/omero/{ => client}/Browser.java | 17 ++++++------ .../fr/igred/omero/{ => client}/Client.java | 13 +++++----- .../omero/{ => client}/GatewayWrapper.java | 6 ++--- .../fr/igred/omero/client/package-info.java | 20 ++++++++++++++ .../DatasetWrapper.java | 8 +++--- .../FolderWrapper.java | 8 +++--- .../ProjectWrapper.java | 8 +++--- .../package-info.java | 2 +- .../{repository => core}/ChannelWrapper.java | 2 +- .../{repository => core}/ImageWrapper.java | 19 ++++++++++---- .../{repository => core}/PixelsWrapper.java | 7 +++-- .../{meta => core}/PlaneInfoWrapper.java | 2 +- .../fr/igred/omero/core/package-info.java | 20 ++++++++++++++ .../igred/omero/meta/ExperimenterWrapper.java | 2 +- .../java/fr/igred/omero/package-info.java | 3 +-- .../java/fr/igred/omero/roi/ROIWrapper.java | 8 +++--- .../java/fr/igred/omero/roi/ShapeWrapper.java | 2 +- .../PlateAcquisitionWrapper.java | 8 +++--- .../{repository => screen}/PlateWrapper.java | 8 +++--- .../{repository => screen}/ScreenWrapper.java | 10 ++++--- .../WellSampleWrapper.java | 7 ++--- .../{repository => screen}/WellWrapper.java | 8 +++--- .../fr/igred/omero/screen/package-info.java | 20 ++++++++++++++ .../java/fr/igred/omero/util/Wrapper.java | 26 +++++++++---------- src/test/java/fr/igred/omero/RootTest.java | 1 + src/test/java/fr/igred/omero/UserTest.java | 1 + .../omero/annotations/ImageJTableTest.java | 4 +-- .../annotations/RatingAnnotationTest.java | 4 +-- .../fr/igred/omero/annotations/TableTest.java | 4 +-- .../fr/igred/omero/annotations/TagTest.java | 12 ++++----- .../annotations/TextualAnnotationTest.java | 2 +- .../igred/omero/{ => client}/ClientTest.java | 15 ++++++----- .../omero/{ => client}/ConnectionTest.java | 3 ++- .../fr/igred/omero/{ => client}/SudoTest.java | 7 ++--- .../DatasetTest.java | 3 ++- .../FolderTest.java | 3 ++- .../ProjectTest.java | 7 ++--- .../{repository => core}/ChannelTest.java | 2 +- .../{repository => core}/ImageImportTest.java | 8 +++--- .../omero/{repository => core}/ImageTest.java | 5 +++- .../{repository => core}/PixelsTest.java | 2 +- .../{meta => core}/PlaneInfoWrapperTest.java | 9 +++---- .../omero/exception/AccessExceptionTest.java | 8 +++--- .../igred/omero/exception/ExceptionTest.java | 2 +- src/test/java/fr/igred/omero/roi/ROITest.java | 2 +- .../PlateAcquisitionTest.java | 3 ++- .../{repository => screen}/PlateTest.java | 3 ++- .../{repository => screen}/ScreenTest.java | 3 ++- .../WellSampleTest.java | 3 ++- .../{repository => screen}/WellTest.java | 2 +- .../java/fr/igred/omero/util/WrapperTest.java | 24 ++++++++--------- 59 files changed, 261 insertions(+), 170 deletions(-) rename src/main/java/fr/igred/omero/{repository => }/RepositoryObjectWrapper.java (98%) rename src/main/java/fr/igred/omero/{ => client}/Browser.java (99%) rename src/main/java/fr/igred/omero/{ => client}/Client.java (97%) rename src/main/java/fr/igred/omero/{ => client}/GatewayWrapper.java (99%) create mode 100644 src/main/java/fr/igred/omero/client/package-info.java rename src/main/java/fr/igred/omero/{repository => containers}/DatasetWrapper.java (99%) rename src/main/java/fr/igred/omero/{repository => containers}/FolderWrapper.java (98%) rename src/main/java/fr/igred/omero/{repository => containers}/ProjectWrapper.java (98%) rename src/main/java/fr/igred/omero/{repository => containers}/package-info.java (96%) rename src/main/java/fr/igred/omero/{repository => core}/ChannelWrapper.java (99%) rename src/main/java/fr/igred/omero/{repository => core}/ImageWrapper.java (98%) rename src/main/java/fr/igred/omero/{repository => core}/PixelsWrapper.java (99%) rename src/main/java/fr/igred/omero/{meta => core}/PlaneInfoWrapper.java (99%) create mode 100644 src/main/java/fr/igred/omero/core/package-info.java rename src/main/java/fr/igred/omero/{repository => screen}/PlateAcquisitionWrapper.java (98%) rename src/main/java/fr/igred/omero/{repository => screen}/PlateWrapper.java (98%) rename src/main/java/fr/igred/omero/{repository => screen}/ScreenWrapper.java (97%) rename src/main/java/fr/igred/omero/{repository => screen}/WellSampleWrapper.java (97%) rename src/main/java/fr/igred/omero/{repository => screen}/WellWrapper.java (97%) create mode 100644 src/main/java/fr/igred/omero/screen/package-info.java rename src/test/java/fr/igred/omero/{ => client}/ClientTest.java (96%) rename src/test/java/fr/igred/omero/{ => client}/ConnectionTest.java (97%) rename src/test/java/fr/igred/omero/{ => client}/SudoTest.java (96%) rename src/test/java/fr/igred/omero/{repository => containers}/DatasetTest.java (99%) rename src/test/java/fr/igred/omero/{repository => containers}/FolderTest.java (99%) rename src/test/java/fr/igred/omero/{repository => containers}/ProjectTest.java (98%) rename src/test/java/fr/igred/omero/{repository => core}/ChannelTest.java (97%) rename src/test/java/fr/igred/omero/{repository => core}/ImageImportTest.java (98%) rename src/test/java/fr/igred/omero/{repository => core}/ImageTest.java (99%) rename src/test/java/fr/igred/omero/{repository => core}/PixelsTest.java (99%) rename src/test/java/fr/igred/omero/{meta => core}/PlaneInfoWrapperTest.java (90%) rename src/test/java/fr/igred/omero/{repository => screen}/PlateAcquisitionTest.java (99%) rename src/test/java/fr/igred/omero/{repository => screen}/PlateTest.java (99%) rename src/test/java/fr/igred/omero/{repository => screen}/ScreenTest.java (99%) rename src/test/java/fr/igred/omero/{repository => screen}/WellSampleTest.java (98%) rename src/test/java/fr/igred/omero/{repository => screen}/WellTest.java (99%) diff --git a/src/main/java/fr/igred/omero/AnnotatableWrapper.java b/src/main/java/fr/igred/omero/AnnotatableWrapper.java index e485ace1..6daf551c 100644 --- a/src/main/java/fr/igred/omero/AnnotatableWrapper.java +++ b/src/main/java/fr/igred/omero/AnnotatableWrapper.java @@ -25,9 +25,10 @@ import fr.igred.omero.annotations.RatingAnnotationWrapper; import fr.igred.omero.annotations.TableWrapper; import fr.igred.omero.annotations.TagAnnotationWrapper; +import fr.igred.omero.client.Client; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; -import fr.igred.omero.repository.RepositoryObjectWrapper.ReplacePolicy; +import fr.igred.omero.RepositoryObjectWrapper.ReplacePolicy; import omero.gateway.facility.TablesFacility; import omero.gateway.model.AnnotationData; import omero.gateway.model.DataObject; diff --git a/src/main/java/fr/igred/omero/ObjectWrapper.java b/src/main/java/fr/igred/omero/ObjectWrapper.java index 1323c1cc..10333f38 100644 --- a/src/main/java/fr/igred/omero/ObjectWrapper.java +++ b/src/main/java/fr/igred/omero/ObjectWrapper.java @@ -18,6 +18,7 @@ package fr.igred.omero; +import fr.igred.omero.client.Client; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; import fr.igred.omero.meta.ExperimenterWrapper; @@ -88,7 +89,7 @@ protected ObjectWrapper(T o) { * * @return See above. */ - protected static > List + public static > List wrap(Collection objects, Function mapper) { return wrap(objects, mapper, ObjectWrapper::getId); } @@ -142,16 +143,6 @@ public T asDataObject() { } - /** - * Returns the contained DataObject as IObject. - * - * @return See above. - */ - IObject asIObject() { - return data.asIObject(); - } - - /** * Gets the object id * diff --git a/src/main/java/fr/igred/omero/repository/RepositoryObjectWrapper.java b/src/main/java/fr/igred/omero/RepositoryObjectWrapper.java similarity index 98% rename from src/main/java/fr/igred/omero/repository/RepositoryObjectWrapper.java rename to src/main/java/fr/igred/omero/RepositoryObjectWrapper.java index 06fe7f1d..e2ae7936 100644 --- a/src/main/java/fr/igred/omero/repository/RepositoryObjectWrapper.java +++ b/src/main/java/fr/igred/omero/RepositoryObjectWrapper.java @@ -15,13 +15,12 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero; -import fr.igred.omero.AnnotatableWrapper; -import fr.igred.omero.Browser; -import fr.igred.omero.Client; -import fr.igred.omero.GatewayWrapper; +import fr.igred.omero.client.Browser; +import fr.igred.omero.client.Client; +import fr.igred.omero.client.GatewayWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ExceptionHandler; import fr.igred.omero.exception.ServiceException; diff --git a/src/main/java/fr/igred/omero/annotations/AnnotationWrapper.java b/src/main/java/fr/igred/omero/annotations/AnnotationWrapper.java index 3956de1a..c2fa4e7c 100644 --- a/src/main/java/fr/igred/omero/annotations/AnnotationWrapper.java +++ b/src/main/java/fr/igred/omero/annotations/AnnotationWrapper.java @@ -18,18 +18,18 @@ package fr.igred.omero.annotations; -import fr.igred.omero.Client; +import fr.igred.omero.client.Client; import fr.igred.omero.ObjectWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; -import fr.igred.omero.repository.DatasetWrapper; -import fr.igred.omero.repository.FolderWrapper; -import fr.igred.omero.repository.ImageWrapper; -import fr.igred.omero.repository.PlateAcquisitionWrapper; -import fr.igred.omero.repository.PlateWrapper; -import fr.igred.omero.repository.ProjectWrapper; -import fr.igred.omero.repository.ScreenWrapper; -import fr.igred.omero.repository.WellWrapper; +import fr.igred.omero.containers.DatasetWrapper; +import fr.igred.omero.containers.FolderWrapper; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.screen.PlateAcquisitionWrapper; +import fr.igred.omero.screen.PlateWrapper; +import fr.igred.omero.containers.ProjectWrapper; +import fr.igred.omero.screen.ScreenWrapper; +import fr.igred.omero.screen.WellWrapper; import omero.RLong; import omero.gateway.model.AnnotationData; import omero.gateway.model.PlateAcquisitionData; diff --git a/src/main/java/fr/igred/omero/annotations/FileAnnotationWrapper.java b/src/main/java/fr/igred/omero/annotations/FileAnnotationWrapper.java index e2e906c2..3ca46bd6 100644 --- a/src/main/java/fr/igred/omero/annotations/FileAnnotationWrapper.java +++ b/src/main/java/fr/igred/omero/annotations/FileAnnotationWrapper.java @@ -18,7 +18,7 @@ package fr.igred.omero.annotations; -import fr.igred.omero.Client; +import fr.igred.omero.client.Client; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ExceptionHandler; import fr.igred.omero.exception.ServiceException; diff --git a/src/main/java/fr/igred/omero/annotations/TableWrapper.java b/src/main/java/fr/igred/omero/annotations/TableWrapper.java index c55c20bf..7190ae39 100644 --- a/src/main/java/fr/igred/omero/annotations/TableWrapper.java +++ b/src/main/java/fr/igred/omero/annotations/TableWrapper.java @@ -18,11 +18,11 @@ package fr.igred.omero.annotations; -import fr.igred.omero.Client; import fr.igred.omero.ObjectWrapper; +import fr.igred.omero.client.Client; +import fr.igred.omero.core.ImageWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; -import fr.igred.omero.repository.ImageWrapper; import fr.igred.omero.roi.ROIWrapper; import ij.gui.Roi; import ij.macro.Variable; diff --git a/src/main/java/fr/igred/omero/annotations/TagAnnotationWrapper.java b/src/main/java/fr/igred/omero/annotations/TagAnnotationWrapper.java index 3d57d08f..491f4465 100644 --- a/src/main/java/fr/igred/omero/annotations/TagAnnotationWrapper.java +++ b/src/main/java/fr/igred/omero/annotations/TagAnnotationWrapper.java @@ -18,7 +18,7 @@ package fr.igred.omero.annotations; -import fr.igred.omero.Client; +import fr.igred.omero.client.Client; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; import omero.gateway.model.TagAnnotationData; diff --git a/src/main/java/fr/igred/omero/annotations/TagSetWrapper.java b/src/main/java/fr/igred/omero/annotations/TagSetWrapper.java index 41515e0a..5820012f 100644 --- a/src/main/java/fr/igred/omero/annotations/TagSetWrapper.java +++ b/src/main/java/fr/igred/omero/annotations/TagSetWrapper.java @@ -18,8 +18,8 @@ package fr.igred.omero.annotations; -import fr.igred.omero.Browser; -import fr.igred.omero.Client; +import fr.igred.omero.client.Browser; +import fr.igred.omero.client.Client; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; import omero.gateway.model.TagAnnotationData; diff --git a/src/main/java/fr/igred/omero/Browser.java b/src/main/java/fr/igred/omero/client/Browser.java similarity index 99% rename from src/main/java/fr/igred/omero/Browser.java rename to src/main/java/fr/igred/omero/client/Browser.java index 9484cc9a..2698b706 100644 --- a/src/main/java/fr/igred/omero/Browser.java +++ b/src/main/java/fr/igred/omero/client/Browser.java @@ -15,22 +15,23 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero; +package fr.igred.omero.client; +import fr.igred.omero.ObjectWrapper; import fr.igred.omero.annotations.AnnotationWrapper; import fr.igred.omero.annotations.MapAnnotationWrapper; import fr.igred.omero.annotations.TagAnnotationWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; import fr.igred.omero.meta.ExperimenterWrapper; -import fr.igred.omero.repository.DatasetWrapper; -import fr.igred.omero.repository.FolderWrapper; -import fr.igred.omero.repository.ImageWrapper; -import fr.igred.omero.repository.PlateWrapper; -import fr.igred.omero.repository.ProjectWrapper; -import fr.igred.omero.repository.ScreenWrapper; -import fr.igred.omero.repository.WellWrapper; +import fr.igred.omero.containers.DatasetWrapper; +import fr.igred.omero.containers.FolderWrapper; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.screen.PlateWrapper; +import fr.igred.omero.containers.ProjectWrapper; +import fr.igred.omero.screen.ScreenWrapper; +import fr.igred.omero.screen.WellWrapper; import omero.RLong; import omero.gateway.Gateway; import omero.gateway.SecurityContext; diff --git a/src/main/java/fr/igred/omero/Client.java b/src/main/java/fr/igred/omero/client/Client.java similarity index 97% rename from src/main/java/fr/igred/omero/Client.java rename to src/main/java/fr/igred/omero/client/Client.java index 8b4eb450..4a22485a 100644 --- a/src/main/java/fr/igred/omero/Client.java +++ b/src/main/java/fr/igred/omero/client/Client.java @@ -15,9 +15,10 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero; +package fr.igred.omero.client; +import fr.igred.omero.ObjectWrapper; import fr.igred.omero.annotations.AnnotationWrapper; import fr.igred.omero.annotations.TableWrapper; import fr.igred.omero.exception.AccessException; @@ -25,9 +26,9 @@ import fr.igred.omero.exception.ServiceException; import fr.igred.omero.meta.ExperimenterWrapper; import fr.igred.omero.meta.GroupWrapper; -import fr.igred.omero.repository.FolderWrapper; -import fr.igred.omero.repository.ImageWrapper; -import fr.igred.omero.repository.ProjectWrapper; +import fr.igred.omero.containers.FolderWrapper; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.containers.ProjectWrapper; import omero.ApiUsageException; import omero.gateway.Gateway; import omero.gateway.SecurityContext; @@ -140,7 +141,7 @@ public void delete(Collection> objects) } if (!objects.isEmpty()) { delete(objects.stream() - .map(ObjectWrapper::asIObject) + .map(o -> o.asDataObject().asIObject()) .collect(Collectors.toList())); } } @@ -162,7 +163,7 @@ public void delete(ObjectWrapper object) if (object instanceof FolderWrapper) { ((FolderWrapper) object).unlinkAllROIs(this); } - delete(object.asIObject()); + delete(object.asDataObject().asIObject()); } diff --git a/src/main/java/fr/igred/omero/GatewayWrapper.java b/src/main/java/fr/igred/omero/client/GatewayWrapper.java similarity index 99% rename from src/main/java/fr/igred/omero/GatewayWrapper.java rename to src/main/java/fr/igred/omero/client/GatewayWrapper.java index b222022a..ca052f60 100644 --- a/src/main/java/fr/igred/omero/GatewayWrapper.java +++ b/src/main/java/fr/igred/omero/client/GatewayWrapper.java @@ -15,7 +15,7 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero; +package fr.igred.omero.client; import fr.igred.omero.exception.AccessException; @@ -475,7 +475,7 @@ public IObject save(IObject object) * @throws ExecutionException A Facility can't be retrieved or instantiated. * @throws InterruptedException If block(long) does not return. */ - void delete(IObject object) + public void delete(IObject object) throws ServiceException, AccessException, ExecutionException, InterruptedException { final long wait = 500L; ExceptionHandler.ofConsumer(getDm(), @@ -496,7 +496,7 @@ void delete(IObject object) * @throws ExecutionException A Facility can't be retrieved or instantiated. * @throws InterruptedException If block(long) does not return. */ - void delete(List objects) + public void delete(List objects) throws ServiceException, AccessException, ExecutionException, InterruptedException { final long wait = 500L; ExceptionHandler.ofConsumer(getDm(), diff --git a/src/main/java/fr/igred/omero/client/package-info.java b/src/main/java/fr/igred/omero/client/package-info.java new file mode 100644 index 00000000..3005b5dd --- /dev/null +++ b/src/main/java/fr/igred/omero/client/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2020-2023 GReD + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 51 Franklin + * Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +/** + * This package contains the client classes used to interact with an OMERO server. + */ +package fr.igred.omero.client; diff --git a/src/main/java/fr/igred/omero/repository/DatasetWrapper.java b/src/main/java/fr/igred/omero/containers/DatasetWrapper.java similarity index 99% rename from src/main/java/fr/igred/omero/repository/DatasetWrapper.java rename to src/main/java/fr/igred/omero/containers/DatasetWrapper.java index 584e4f19..ace2e5e8 100644 --- a/src/main/java/fr/igred/omero/repository/DatasetWrapper.java +++ b/src/main/java/fr/igred/omero/containers/DatasetWrapper.java @@ -15,15 +15,17 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.containers; -import fr.igred.omero.Browser; -import fr.igred.omero.Client; +import fr.igred.omero.client.Browser; +import fr.igred.omero.client.Client; import fr.igred.omero.ObjectWrapper; import fr.igred.omero.annotations.TagAnnotationWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.RepositoryObjectWrapper; import fr.igred.omero.roi.ROIWrapper; import omero.RLong; import omero.gateway.model.DatasetData; diff --git a/src/main/java/fr/igred/omero/repository/FolderWrapper.java b/src/main/java/fr/igred/omero/containers/FolderWrapper.java similarity index 98% rename from src/main/java/fr/igred/omero/repository/FolderWrapper.java rename to src/main/java/fr/igred/omero/containers/FolderWrapper.java index e93ebb09..40788ad6 100644 --- a/src/main/java/fr/igred/omero/repository/FolderWrapper.java +++ b/src/main/java/fr/igred/omero/containers/FolderWrapper.java @@ -15,15 +15,17 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.containers; -import fr.igred.omero.Browser; -import fr.igred.omero.Client; +import fr.igred.omero.client.Browser; +import fr.igred.omero.client.Client; import fr.igred.omero.ObjectWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ExceptionHandler; import fr.igred.omero.exception.ServiceException; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.RepositoryObjectWrapper; import fr.igred.omero.roi.ROIWrapper; import omero.gateway.facility.ROIFacility; import omero.gateway.model.AnnotationData; diff --git a/src/main/java/fr/igred/omero/repository/ProjectWrapper.java b/src/main/java/fr/igred/omero/containers/ProjectWrapper.java similarity index 98% rename from src/main/java/fr/igred/omero/repository/ProjectWrapper.java rename to src/main/java/fr/igred/omero/containers/ProjectWrapper.java index 3cdd8018..f1c2556c 100644 --- a/src/main/java/fr/igred/omero/repository/ProjectWrapper.java +++ b/src/main/java/fr/igred/omero/containers/ProjectWrapper.java @@ -15,15 +15,17 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.containers; -import fr.igred.omero.Browser; -import fr.igred.omero.Client; +import fr.igred.omero.client.Browser; +import fr.igred.omero.client.Client; import fr.igred.omero.ObjectWrapper; import fr.igred.omero.annotations.TagAnnotationWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.RepositoryObjectWrapper; import omero.gateway.model.ImageData; import omero.gateway.model.ProjectData; import omero.model.ProjectDatasetLink; diff --git a/src/main/java/fr/igred/omero/repository/package-info.java b/src/main/java/fr/igred/omero/containers/package-info.java similarity index 96% rename from src/main/java/fr/igred/omero/repository/package-info.java rename to src/main/java/fr/igred/omero/containers/package-info.java index 648c5d9e..044f0329 100644 --- a/src/main/java/fr/igred/omero/repository/package-info.java +++ b/src/main/java/fr/igred/omero/containers/package-info.java @@ -19,4 +19,4 @@ *

This includes containers (such as screens or projects for example), as well as data contained within images * (e.g. pixels and channels). */ -package fr.igred.omero.repository; \ No newline at end of file +package fr.igred.omero.containers; \ No newline at end of file diff --git a/src/main/java/fr/igred/omero/repository/ChannelWrapper.java b/src/main/java/fr/igred/omero/core/ChannelWrapper.java similarity index 99% rename from src/main/java/fr/igred/omero/repository/ChannelWrapper.java rename to src/main/java/fr/igred/omero/core/ChannelWrapper.java index 59f9714d..5178a745 100644 --- a/src/main/java/fr/igred/omero/repository/ChannelWrapper.java +++ b/src/main/java/fr/igred/omero/core/ChannelWrapper.java @@ -15,7 +15,7 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.core; import fr.igred.omero.ObjectWrapper; diff --git a/src/main/java/fr/igred/omero/repository/ImageWrapper.java b/src/main/java/fr/igred/omero/core/ImageWrapper.java similarity index 98% rename from src/main/java/fr/igred/omero/repository/ImageWrapper.java rename to src/main/java/fr/igred/omero/core/ImageWrapper.java index 85d030a2..771cd7ee 100644 --- a/src/main/java/fr/igred/omero/repository/ImageWrapper.java +++ b/src/main/java/fr/igred/omero/core/ImageWrapper.java @@ -15,16 +15,25 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.core; -import fr.igred.omero.Browser; -import fr.igred.omero.Client; +import fr.igred.omero.client.Browser; +import fr.igred.omero.client.Client; import fr.igred.omero.ObjectWrapper; +import fr.igred.omero.containers.DatasetWrapper; +import fr.igred.omero.containers.FolderWrapper; +import fr.igred.omero.containers.ProjectWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; -import fr.igred.omero.repository.PixelsWrapper.Bounds; -import fr.igred.omero.repository.PixelsWrapper.Coordinates; +import fr.igred.omero.core.PixelsWrapper.Bounds; +import fr.igred.omero.core.PixelsWrapper.Coordinates; +import fr.igred.omero.screen.PlateAcquisitionWrapper; +import fr.igred.omero.screen.PlateWrapper; +import fr.igred.omero.RepositoryObjectWrapper; +import fr.igred.omero.screen.ScreenWrapper; +import fr.igred.omero.screen.WellSampleWrapper; +import fr.igred.omero.screen.WellWrapper; import fr.igred.omero.roi.ROIWrapper; import ij.CompositeImage; import ij.IJ; diff --git a/src/main/java/fr/igred/omero/repository/PixelsWrapper.java b/src/main/java/fr/igred/omero/core/PixelsWrapper.java similarity index 99% rename from src/main/java/fr/igred/omero/repository/PixelsWrapper.java rename to src/main/java/fr/igred/omero/core/PixelsWrapper.java index de1b7e68..5a82f167 100644 --- a/src/main/java/fr/igred/omero/repository/PixelsWrapper.java +++ b/src/main/java/fr/igred/omero/core/PixelsWrapper.java @@ -15,15 +15,14 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.core; -import fr.igred.omero.Client; +import fr.igred.omero.client.Client; import fr.igred.omero.ObjectWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ExceptionHandler; import fr.igred.omero.exception.ServiceException; -import fr.igred.omero.meta.PlaneInfoWrapper; import ome.units.unit.Unit; import omero.gateway.exception.DataSourceException; import omero.gateway.facility.RawDataFacility; @@ -40,7 +39,7 @@ import java.util.concurrent.ExecutionException; import static fr.igred.omero.exception.ExceptionHandler.call; -import static fr.igred.omero.meta.PlaneInfoWrapper.getMinPosition; +import static fr.igred.omero.core.PlaneInfoWrapper.getMinPosition; import static ome.formats.model.UnitsFactory.convertLength; diff --git a/src/main/java/fr/igred/omero/meta/PlaneInfoWrapper.java b/src/main/java/fr/igred/omero/core/PlaneInfoWrapper.java similarity index 99% rename from src/main/java/fr/igred/omero/meta/PlaneInfoWrapper.java rename to src/main/java/fr/igred/omero/core/PlaneInfoWrapper.java index 11dce42a..dd854ccd 100644 --- a/src/main/java/fr/igred/omero/meta/PlaneInfoWrapper.java +++ b/src/main/java/fr/igred/omero/core/PlaneInfoWrapper.java @@ -15,7 +15,7 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.meta; +package fr.igred.omero.core; import fr.igred.omero.ObjectWrapper; diff --git a/src/main/java/fr/igred/omero/core/package-info.java b/src/main/java/fr/igred/omero/core/package-info.java new file mode 100644 index 00000000..922a64fe --- /dev/null +++ b/src/main/java/fr/igred/omero/core/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2020-2023 GReD + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 51 Franklin + * Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +/** + * This package contains classes to handle images and their content, such as pixels, channels or planes. + */ +package fr.igred.omero.core; \ No newline at end of file diff --git a/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java b/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java index 4834f55b..067ef61b 100644 --- a/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java +++ b/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java @@ -18,7 +18,7 @@ package fr.igred.omero.meta; -import fr.igred.omero.Client; +import fr.igred.omero.client.Client; import fr.igred.omero.ObjectWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; diff --git a/src/main/java/fr/igred/omero/package-info.java b/src/main/java/fr/igred/omero/package-info.java index 8fb42c6c..427d87d3 100644 --- a/src/main/java/fr/igred/omero/package-info.java +++ b/src/main/java/fr/igred/omero/package-info.java @@ -15,7 +15,6 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /** - * This package contains abstract wrapper classes for the OMERO Gateway and the basic OMERO object. It also contains a - * Client, derived from the GatewayWrapper, which handles the retrieval of wrapped objects from OMERO. + * This package contains abstract classes to handle OME Remote Objects. */ package fr.igred.omero; \ No newline at end of file diff --git a/src/main/java/fr/igred/omero/roi/ROIWrapper.java b/src/main/java/fr/igred/omero/roi/ROIWrapper.java index 534aae2b..94b9e2b9 100644 --- a/src/main/java/fr/igred/omero/roi/ROIWrapper.java +++ b/src/main/java/fr/igred/omero/roi/ROIWrapper.java @@ -19,14 +19,14 @@ import fr.igred.omero.AnnotatableWrapper; -import fr.igred.omero.Client; +import fr.igred.omero.client.Client; import fr.igred.omero.ObjectWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ExceptionHandler; import fr.igred.omero.exception.ServiceException; -import fr.igred.omero.repository.ImageWrapper; -import fr.igred.omero.repository.PixelsWrapper.Bounds; -import fr.igred.omero.repository.PixelsWrapper.Coordinates; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.core.PixelsWrapper.Bounds; +import fr.igred.omero.core.PixelsWrapper.Coordinates; import ij.IJ; import ij.gui.PointRoi; import ij.gui.ShapeRoi; diff --git a/src/main/java/fr/igred/omero/roi/ShapeWrapper.java b/src/main/java/fr/igred/omero/roi/ShapeWrapper.java index 90ce23b0..587d01a1 100644 --- a/src/main/java/fr/igred/omero/roi/ShapeWrapper.java +++ b/src/main/java/fr/igred/omero/roi/ShapeWrapper.java @@ -19,7 +19,7 @@ import fr.igred.omero.AnnotatableWrapper; -import fr.igred.omero.Client; +import fr.igred.omero.client.Client; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; import ij.ImagePlus; diff --git a/src/main/java/fr/igred/omero/repository/PlateAcquisitionWrapper.java b/src/main/java/fr/igred/omero/screen/PlateAcquisitionWrapper.java similarity index 98% rename from src/main/java/fr/igred/omero/repository/PlateAcquisitionWrapper.java rename to src/main/java/fr/igred/omero/screen/PlateAcquisitionWrapper.java index 1b028b2f..d9a32f28 100644 --- a/src/main/java/fr/igred/omero/repository/PlateAcquisitionWrapper.java +++ b/src/main/java/fr/igred/omero/screen/PlateAcquisitionWrapper.java @@ -15,11 +15,13 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.screen; -import fr.igred.omero.Browser; -import fr.igred.omero.Client; +import fr.igred.omero.RepositoryObjectWrapper; +import fr.igred.omero.client.Browser; +import fr.igred.omero.client.Client; +import fr.igred.omero.core.ImageWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; import omero.gateway.model.AnnotationData; diff --git a/src/main/java/fr/igred/omero/repository/PlateWrapper.java b/src/main/java/fr/igred/omero/screen/PlateWrapper.java similarity index 98% rename from src/main/java/fr/igred/omero/repository/PlateWrapper.java rename to src/main/java/fr/igred/omero/screen/PlateWrapper.java index 443cab3c..152c4941 100644 --- a/src/main/java/fr/igred/omero/repository/PlateWrapper.java +++ b/src/main/java/fr/igred/omero/screen/PlateWrapper.java @@ -15,12 +15,14 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.screen; -import fr.igred.omero.Browser; -import fr.igred.omero.Client; +import fr.igred.omero.RepositoryObjectWrapper; +import fr.igred.omero.client.Browser; +import fr.igred.omero.client.Client; import fr.igred.omero.ObjectWrapper; +import fr.igred.omero.core.ImageWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; import ome.model.units.BigResult; diff --git a/src/main/java/fr/igred/omero/repository/ScreenWrapper.java b/src/main/java/fr/igred/omero/screen/ScreenWrapper.java similarity index 97% rename from src/main/java/fr/igred/omero/repository/ScreenWrapper.java rename to src/main/java/fr/igred/omero/screen/ScreenWrapper.java index 13d74aca..1400c4dd 100644 --- a/src/main/java/fr/igred/omero/repository/ScreenWrapper.java +++ b/src/main/java/fr/igred/omero/screen/ScreenWrapper.java @@ -15,12 +15,14 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.screen; -import fr.igred.omero.Browser; -import fr.igred.omero.Client; -import fr.igred.omero.GatewayWrapper; +import fr.igred.omero.RepositoryObjectWrapper; +import fr.igred.omero.client.Browser; +import fr.igred.omero.client.Client; +import fr.igred.omero.client.GatewayWrapper; +import fr.igred.omero.core.ImageWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; import omero.gateway.model.ScreenData; diff --git a/src/main/java/fr/igred/omero/repository/WellSampleWrapper.java b/src/main/java/fr/igred/omero/screen/WellSampleWrapper.java similarity index 97% rename from src/main/java/fr/igred/omero/repository/WellSampleWrapper.java rename to src/main/java/fr/igred/omero/screen/WellSampleWrapper.java index c4998daa..fab9fea2 100644 --- a/src/main/java/fr/igred/omero/repository/WellSampleWrapper.java +++ b/src/main/java/fr/igred/omero/screen/WellSampleWrapper.java @@ -15,12 +15,13 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.screen; -import fr.igred.omero.Browser; -import fr.igred.omero.Client; +import fr.igred.omero.client.Browser; +import fr.igred.omero.client.Client; import fr.igred.omero.ObjectWrapper; +import fr.igred.omero.core.ImageWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; import ome.model.units.BigResult; diff --git a/src/main/java/fr/igred/omero/repository/WellWrapper.java b/src/main/java/fr/igred/omero/screen/WellWrapper.java similarity index 97% rename from src/main/java/fr/igred/omero/repository/WellWrapper.java rename to src/main/java/fr/igred/omero/screen/WellWrapper.java index f4ba6ecf..647724f4 100644 --- a/src/main/java/fr/igred/omero/repository/WellWrapper.java +++ b/src/main/java/fr/igred/omero/screen/WellWrapper.java @@ -15,11 +15,13 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.screen; -import fr.igred.omero.Browser; -import fr.igred.omero.Client; +import fr.igred.omero.RepositoryObjectWrapper; +import fr.igred.omero.client.Browser; +import fr.igred.omero.client.Client; +import fr.igred.omero.core.ImageWrapper; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; import omero.gateway.model.WellData; diff --git a/src/main/java/fr/igred/omero/screen/package-info.java b/src/main/java/fr/igred/omero/screen/package-info.java new file mode 100644 index 00000000..fd4d8c28 --- /dev/null +++ b/src/main/java/fr/igred/omero/screen/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2020-2023 GReD + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 51 Franklin + * Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +/** + * This package contains classes related to the HCS organization, e.g. screens, plates or wells. + */ +package fr.igred.omero.screen; \ No newline at end of file diff --git a/src/main/java/fr/igred/omero/util/Wrapper.java b/src/main/java/fr/igred/omero/util/Wrapper.java index 2ea84ead..b50dd2c1 100644 --- a/src/main/java/fr/igred/omero/util/Wrapper.java +++ b/src/main/java/fr/igred/omero/util/Wrapper.java @@ -28,19 +28,19 @@ import fr.igred.omero.annotations.TextualAnnotationWrapper; import fr.igred.omero.meta.ExperimenterWrapper; import fr.igred.omero.meta.GroupWrapper; -import fr.igred.omero.meta.PlaneInfoWrapper; -import fr.igred.omero.repository.ChannelWrapper; -import fr.igred.omero.repository.DatasetWrapper; -import fr.igred.omero.repository.FolderWrapper; -import fr.igred.omero.repository.RepositoryObjectWrapper; -import fr.igred.omero.repository.ImageWrapper; -import fr.igred.omero.repository.PixelsWrapper; -import fr.igred.omero.repository.PlateAcquisitionWrapper; -import fr.igred.omero.repository.PlateWrapper; -import fr.igred.omero.repository.ProjectWrapper; -import fr.igred.omero.repository.ScreenWrapper; -import fr.igred.omero.repository.WellSampleWrapper; -import fr.igred.omero.repository.WellWrapper; +import fr.igred.omero.core.PlaneInfoWrapper; +import fr.igred.omero.core.ChannelWrapper; +import fr.igred.omero.containers.DatasetWrapper; +import fr.igred.omero.containers.FolderWrapper; +import fr.igred.omero.RepositoryObjectWrapper; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.core.PixelsWrapper; +import fr.igred.omero.screen.PlateAcquisitionWrapper; +import fr.igred.omero.screen.PlateWrapper; +import fr.igred.omero.containers.ProjectWrapper; +import fr.igred.omero.screen.ScreenWrapper; +import fr.igred.omero.screen.WellSampleWrapper; +import fr.igred.omero.screen.WellWrapper; import fr.igred.omero.roi.EllipseWrapper; import fr.igred.omero.roi.ShapeWrapper; import fr.igred.omero.roi.LineWrapper; diff --git a/src/test/java/fr/igred/omero/RootTest.java b/src/test/java/fr/igred/omero/RootTest.java index a6c1f412..2b4337a7 100644 --- a/src/test/java/fr/igred/omero/RootTest.java +++ b/src/test/java/fr/igred/omero/RootTest.java @@ -18,6 +18,7 @@ package fr.igred.omero; +import fr.igred.omero.client.Client; import fr.igred.omero.exception.ServiceException; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/fr/igred/omero/UserTest.java b/src/test/java/fr/igred/omero/UserTest.java index c0a12309..edd8ecca 100644 --- a/src/test/java/fr/igred/omero/UserTest.java +++ b/src/test/java/fr/igred/omero/UserTest.java @@ -18,6 +18,7 @@ package fr.igred.omero; +import fr.igred.omero.client.Client; import fr.igred.omero.exception.ServiceException; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/fr/igred/omero/annotations/ImageJTableTest.java b/src/test/java/fr/igred/omero/annotations/ImageJTableTest.java index 6e6412d0..6c85be93 100644 --- a/src/test/java/fr/igred/omero/annotations/ImageJTableTest.java +++ b/src/test/java/fr/igred/omero/annotations/ImageJTableTest.java @@ -18,11 +18,11 @@ package fr.igred.omero.annotations; -import fr.igred.omero.Client; +import fr.igred.omero.client.Client; import fr.igred.omero.UserTest; import fr.igred.omero.exception.AccessException; import fr.igred.omero.exception.ServiceException; -import fr.igred.omero.repository.ImageWrapper; +import fr.igred.omero.core.ImageWrapper; import fr.igred.omero.roi.ROIWrapper; import fr.igred.omero.roi.RectangleWrapper; import ij.gui.Roi; diff --git a/src/test/java/fr/igred/omero/annotations/RatingAnnotationTest.java b/src/test/java/fr/igred/omero/annotations/RatingAnnotationTest.java index 31aa2676..e2aa49fe 100644 --- a/src/test/java/fr/igred/omero/annotations/RatingAnnotationTest.java +++ b/src/test/java/fr/igred/omero/annotations/RatingAnnotationTest.java @@ -19,8 +19,8 @@ import fr.igred.omero.UserTest; -import fr.igred.omero.repository.DatasetWrapper; -import fr.igred.omero.repository.ImageWrapper; +import fr.igred.omero.containers.DatasetWrapper; +import fr.igred.omero.core.ImageWrapper; import omero.gateway.model.RatingAnnotationData; import org.junit.jupiter.api.Test; diff --git a/src/test/java/fr/igred/omero/annotations/TableTest.java b/src/test/java/fr/igred/omero/annotations/TableTest.java index 6245e7c2..7c6563c8 100644 --- a/src/test/java/fr/igred/omero/annotations/TableTest.java +++ b/src/test/java/fr/igred/omero/annotations/TableTest.java @@ -19,8 +19,8 @@ import fr.igred.omero.UserTest; -import fr.igred.omero.repository.DatasetWrapper; -import fr.igred.omero.repository.ImageWrapper; +import fr.igred.omero.containers.DatasetWrapper; +import fr.igred.omero.core.ImageWrapper; import omero.gateway.model.ImageData; import org.junit.jupiter.api.Test; diff --git a/src/test/java/fr/igred/omero/annotations/TagTest.java b/src/test/java/fr/igred/omero/annotations/TagTest.java index 001cbfc3..7fd65586 100644 --- a/src/test/java/fr/igred/omero/annotations/TagTest.java +++ b/src/test/java/fr/igred/omero/annotations/TagTest.java @@ -19,12 +19,12 @@ import fr.igred.omero.UserTest; -import fr.igred.omero.repository.DatasetWrapper; -import fr.igred.omero.repository.ImageWrapper; -import fr.igred.omero.repository.PlateWrapper; -import fr.igred.omero.repository.ProjectWrapper; -import fr.igred.omero.repository.ScreenWrapper; -import fr.igred.omero.repository.WellWrapper; +import fr.igred.omero.containers.DatasetWrapper; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.screen.PlateWrapper; +import fr.igred.omero.containers.ProjectWrapper; +import fr.igred.omero.screen.ScreenWrapper; +import fr.igred.omero.screen.WellWrapper; import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/test/java/fr/igred/omero/annotations/TextualAnnotationTest.java b/src/test/java/fr/igred/omero/annotations/TextualAnnotationTest.java index 77c4fbe2..fda8251e 100644 --- a/src/test/java/fr/igred/omero/annotations/TextualAnnotationTest.java +++ b/src/test/java/fr/igred/omero/annotations/TextualAnnotationTest.java @@ -19,7 +19,7 @@ import fr.igred.omero.UserTest; -import fr.igred.omero.repository.ImageWrapper; +import fr.igred.omero.core.ImageWrapper; import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/test/java/fr/igred/omero/ClientTest.java b/src/test/java/fr/igred/omero/client/ClientTest.java similarity index 96% rename from src/test/java/fr/igred/omero/ClientTest.java rename to src/test/java/fr/igred/omero/client/ClientTest.java index 90c1b326..dff2b305 100644 --- a/src/test/java/fr/igred/omero/ClientTest.java +++ b/src/test/java/fr/igred/omero/client/ClientTest.java @@ -15,17 +15,18 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero; +package fr.igred.omero.client; +import fr.igred.omero.UserTest; import fr.igred.omero.meta.ExperimenterWrapper; import fr.igred.omero.meta.GroupWrapper; -import fr.igred.omero.repository.DatasetWrapper; -import fr.igred.omero.repository.ImageWrapper; -import fr.igred.omero.repository.PlateWrapper; -import fr.igred.omero.repository.ProjectWrapper; -import fr.igred.omero.repository.ScreenWrapper; -import fr.igred.omero.repository.WellWrapper; +import fr.igred.omero.containers.DatasetWrapper; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.screen.PlateWrapper; +import fr.igred.omero.containers.ProjectWrapper; +import fr.igred.omero.screen.ScreenWrapper; +import fr.igred.omero.screen.WellWrapper; import org.junit.jupiter.api.Test; import java.io.File; diff --git a/src/test/java/fr/igred/omero/ConnectionTest.java b/src/test/java/fr/igred/omero/client/ConnectionTest.java similarity index 97% rename from src/test/java/fr/igred/omero/ConnectionTest.java rename to src/test/java/fr/igred/omero/client/ConnectionTest.java index c9350481..b4bb2b82 100644 --- a/src/test/java/fr/igred/omero/ConnectionTest.java +++ b/src/test/java/fr/igred/omero/client/ConnectionTest.java @@ -15,9 +15,10 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero; +package fr.igred.omero.client; +import fr.igred.omero.BasicTest; import fr.igred.omero.exception.ServiceException; import org.junit.jupiter.api.Test; diff --git a/src/test/java/fr/igred/omero/SudoTest.java b/src/test/java/fr/igred/omero/client/SudoTest.java similarity index 96% rename from src/test/java/fr/igred/omero/SudoTest.java rename to src/test/java/fr/igred/omero/client/SudoTest.java index 00ff486b..de65be1c 100644 --- a/src/test/java/fr/igred/omero/SudoTest.java +++ b/src/test/java/fr/igred/omero/client/SudoTest.java @@ -15,12 +15,13 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero; +package fr.igred.omero.client; +import fr.igred.omero.BasicTest; import fr.igred.omero.annotations.TagAnnotationWrapper; -import fr.igred.omero.repository.DatasetWrapper; -import fr.igred.omero.repository.ImageWrapper; +import fr.igred.omero.containers.DatasetWrapper; +import fr.igred.omero.core.ImageWrapper; import org.junit.jupiter.api.Test; import java.io.File; diff --git a/src/test/java/fr/igred/omero/repository/DatasetTest.java b/src/test/java/fr/igred/omero/containers/DatasetTest.java similarity index 99% rename from src/test/java/fr/igred/omero/repository/DatasetTest.java rename to src/test/java/fr/igred/omero/containers/DatasetTest.java index b2a70e0c..99752c15 100644 --- a/src/test/java/fr/igred/omero/repository/DatasetTest.java +++ b/src/test/java/fr/igred/omero/containers/DatasetTest.java @@ -15,11 +15,12 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.containers; import fr.igred.omero.UserTest; import fr.igred.omero.annotations.TagAnnotationWrapper; +import fr.igred.omero.core.ImageWrapper; import org.junit.jupiter.api.Test; import java.io.File; diff --git a/src/test/java/fr/igred/omero/repository/FolderTest.java b/src/test/java/fr/igred/omero/containers/FolderTest.java similarity index 99% rename from src/test/java/fr/igred/omero/repository/FolderTest.java rename to src/test/java/fr/igred/omero/containers/FolderTest.java index 95cd2d46..67c56433 100644 --- a/src/test/java/fr/igred/omero/repository/FolderTest.java +++ b/src/test/java/fr/igred/omero/containers/FolderTest.java @@ -15,11 +15,12 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.containers; import fr.igred.omero.UserTest; import fr.igred.omero.annotations.TagAnnotationWrapper; +import fr.igred.omero.core.ImageWrapper; import fr.igred.omero.roi.ROIWrapper; import fr.igred.omero.roi.RectangleWrapper; import org.junit.jupiter.api.Test; diff --git a/src/test/java/fr/igred/omero/repository/ProjectTest.java b/src/test/java/fr/igred/omero/containers/ProjectTest.java similarity index 98% rename from src/test/java/fr/igred/omero/repository/ProjectTest.java rename to src/test/java/fr/igred/omero/containers/ProjectTest.java index acdce8e4..d0b4f55c 100644 --- a/src/test/java/fr/igred/omero/repository/ProjectTest.java +++ b/src/test/java/fr/igred/omero/containers/ProjectTest.java @@ -15,7 +15,7 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.containers; import fr.igred.omero.UserTest; @@ -23,13 +23,14 @@ import fr.igred.omero.annotations.MapAnnotationWrapper; import fr.igred.omero.annotations.TableWrapper; import fr.igred.omero.annotations.TagAnnotationWrapper; +import fr.igred.omero.core.ImageWrapper; import org.junit.jupiter.api.Test; import java.io.File; import java.util.List; -import static fr.igred.omero.repository.RepositoryObjectWrapper.ReplacePolicy.DELETE; -import static fr.igred.omero.repository.RepositoryObjectWrapper.ReplacePolicy.DELETE_ORPHANED; +import static fr.igred.omero.RepositoryObjectWrapper.ReplacePolicy.DELETE; +import static fr.igred.omero.RepositoryObjectWrapper.ReplacePolicy.DELETE_ORPHANED; import static java.lang.String.format; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; diff --git a/src/test/java/fr/igred/omero/repository/ChannelTest.java b/src/test/java/fr/igred/omero/core/ChannelTest.java similarity index 97% rename from src/test/java/fr/igred/omero/repository/ChannelTest.java rename to src/test/java/fr/igred/omero/core/ChannelTest.java index b0859714..024761fb 100644 --- a/src/test/java/fr/igred/omero/repository/ChannelTest.java +++ b/src/test/java/fr/igred/omero/core/ChannelTest.java @@ -15,7 +15,7 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.core; import fr.igred.omero.BasicTest; diff --git a/src/test/java/fr/igred/omero/repository/ImageImportTest.java b/src/test/java/fr/igred/omero/core/ImageImportTest.java similarity index 98% rename from src/test/java/fr/igred/omero/repository/ImageImportTest.java rename to src/test/java/fr/igred/omero/core/ImageImportTest.java index 0a75b84d..d9d89219 100644 --- a/src/test/java/fr/igred/omero/repository/ImageImportTest.java +++ b/src/test/java/fr/igred/omero/core/ImageImportTest.java @@ -15,12 +15,14 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.core; import fr.igred.omero.UserTest; import fr.igred.omero.annotations.TableWrapper; import fr.igred.omero.annotations.TagAnnotationWrapper; +import fr.igred.omero.containers.DatasetWrapper; +import fr.igred.omero.containers.FolderWrapper; import fr.igred.omero.roi.ROIWrapper; import fr.igred.omero.roi.RectangleWrapper; import org.junit.jupiter.api.Test; @@ -28,8 +30,8 @@ import java.io.File; import java.util.List; -import static fr.igred.omero.repository.RepositoryObjectWrapper.ReplacePolicy.DELETE; -import static fr.igred.omero.repository.RepositoryObjectWrapper.ReplacePolicy.DELETE_ORPHANED; +import static fr.igred.omero.RepositoryObjectWrapper.ReplacePolicy.DELETE; +import static fr.igred.omero.RepositoryObjectWrapper.ReplacePolicy.DELETE_ORPHANED; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotEquals; diff --git a/src/test/java/fr/igred/omero/repository/ImageTest.java b/src/test/java/fr/igred/omero/core/ImageTest.java similarity index 99% rename from src/test/java/fr/igred/omero/repository/ImageTest.java rename to src/test/java/fr/igred/omero/core/ImageTest.java index 44cbad2d..5d6b5894 100644 --- a/src/test/java/fr/igred/omero/repository/ImageTest.java +++ b/src/test/java/fr/igred/omero/core/ImageTest.java @@ -15,7 +15,7 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.core; import fr.igred.omero.UserTest; @@ -26,6 +26,9 @@ import fr.igred.omero.roi.EllipseWrapper; import fr.igred.omero.roi.ROIWrapper; import fr.igred.omero.roi.RectangleWrapper; +import fr.igred.omero.screen.PlateAcquisitionWrapper; +import fr.igred.omero.screen.WellSampleWrapper; +import fr.igred.omero.screen.WellWrapper; import ij.ImagePlus; import ij.plugin.Duplicator; import ij.plugin.ImageCalculator; diff --git a/src/test/java/fr/igred/omero/repository/PixelsTest.java b/src/test/java/fr/igred/omero/core/PixelsTest.java similarity index 99% rename from src/test/java/fr/igred/omero/repository/PixelsTest.java rename to src/test/java/fr/igred/omero/core/PixelsTest.java index d11a49b7..4c61f8c5 100644 --- a/src/test/java/fr/igred/omero/repository/PixelsTest.java +++ b/src/test/java/fr/igred/omero/core/PixelsTest.java @@ -15,7 +15,7 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.core; import fr.igred.omero.UserTest; diff --git a/src/test/java/fr/igred/omero/meta/PlaneInfoWrapperTest.java b/src/test/java/fr/igred/omero/core/PlaneInfoWrapperTest.java similarity index 90% rename from src/test/java/fr/igred/omero/meta/PlaneInfoWrapperTest.java rename to src/test/java/fr/igred/omero/core/PlaneInfoWrapperTest.java index df2cdbc8..23a00987 100644 --- a/src/test/java/fr/igred/omero/meta/PlaneInfoWrapperTest.java +++ b/src/test/java/fr/igred/omero/core/PlaneInfoWrapperTest.java @@ -15,20 +15,19 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.meta; +package fr.igred.omero.core; import fr.igred.omero.UserTest; -import fr.igred.omero.repository.PixelsWrapper; import omero.model.Length; import omero.model.Time; import org.junit.jupiter.api.Test; import java.util.List; -import static fr.igred.omero.meta.PlaneInfoWrapper.computeMeanExposureTime; -import static fr.igred.omero.meta.PlaneInfoWrapper.computeMeanTimeInterval; -import static fr.igred.omero.meta.PlaneInfoWrapper.getMinPosition; +import static fr.igred.omero.core.PlaneInfoWrapper.computeMeanExposureTime; +import static fr.igred.omero.core.PlaneInfoWrapper.computeMeanTimeInterval; +import static fr.igred.omero.core.PlaneInfoWrapper.getMinPosition; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/fr/igred/omero/exception/AccessExceptionTest.java b/src/test/java/fr/igred/omero/exception/AccessExceptionTest.java index 4d111e9c..a78611e3 100644 --- a/src/test/java/fr/igred/omero/exception/AccessExceptionTest.java +++ b/src/test/java/fr/igred/omero/exception/AccessExceptionTest.java @@ -19,12 +19,12 @@ import fr.igred.omero.BasicTest; -import fr.igred.omero.Client; +import fr.igred.omero.client.Client; import fr.igred.omero.annotations.MapAnnotationWrapper; import fr.igred.omero.annotations.TagAnnotationWrapper; -import fr.igred.omero.repository.FolderWrapper; -import fr.igred.omero.repository.ImageWrapper; -import fr.igred.omero.repository.ProjectWrapper; +import fr.igred.omero.containers.FolderWrapper; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.containers.ProjectWrapper; import fr.igred.omero.roi.ROIWrapper; import fr.igred.omero.roi.RectangleWrapper; import omero.gateway.model.ProjectData; diff --git a/src/test/java/fr/igred/omero/exception/ExceptionTest.java b/src/test/java/fr/igred/omero/exception/ExceptionTest.java index 84075d98..d92b8fdf 100644 --- a/src/test/java/fr/igred/omero/exception/ExceptionTest.java +++ b/src/test/java/fr/igred/omero/exception/ExceptionTest.java @@ -19,7 +19,7 @@ import fr.igred.omero.BasicTest; -import fr.igred.omero.Client; +import fr.igred.omero.client.Client; import omero.ResourceError; import omero.SecurityViolation; import omero.ServerError; diff --git a/src/test/java/fr/igred/omero/roi/ROITest.java b/src/test/java/fr/igred/omero/roi/ROITest.java index f184fd4d..7e1d6777 100644 --- a/src/test/java/fr/igred/omero/roi/ROITest.java +++ b/src/test/java/fr/igred/omero/roi/ROITest.java @@ -20,7 +20,7 @@ import fr.igred.omero.UserTest; import fr.igred.omero.annotations.TagAnnotationWrapper; -import fr.igred.omero.repository.ImageWrapper; +import fr.igred.omero.core.ImageWrapper; import org.junit.jupiter.api.Test; import java.awt.geom.Point2D; diff --git a/src/test/java/fr/igred/omero/repository/PlateAcquisitionTest.java b/src/test/java/fr/igred/omero/screen/PlateAcquisitionTest.java similarity index 99% rename from src/test/java/fr/igred/omero/repository/PlateAcquisitionTest.java rename to src/test/java/fr/igred/omero/screen/PlateAcquisitionTest.java index 44533684..8a48a410 100644 --- a/src/test/java/fr/igred/omero/repository/PlateAcquisitionTest.java +++ b/src/test/java/fr/igred/omero/screen/PlateAcquisitionTest.java @@ -15,11 +15,12 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.screen; import fr.igred.omero.UserTest; import fr.igred.omero.annotations.TagAnnotationWrapper; +import fr.igred.omero.core.ImageWrapper; import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/test/java/fr/igred/omero/repository/PlateTest.java b/src/test/java/fr/igred/omero/screen/PlateTest.java similarity index 99% rename from src/test/java/fr/igred/omero/repository/PlateTest.java rename to src/test/java/fr/igred/omero/screen/PlateTest.java index 91b9557a..9b5eefa1 100644 --- a/src/test/java/fr/igred/omero/repository/PlateTest.java +++ b/src/test/java/fr/igred/omero/screen/PlateTest.java @@ -15,11 +15,12 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.screen; import fr.igred.omero.UserTest; import fr.igred.omero.annotations.TagAnnotationWrapper; +import fr.igred.omero.core.ImageWrapper; import omero.gateway.model.PlateData; import org.junit.jupiter.api.Test; diff --git a/src/test/java/fr/igred/omero/repository/ScreenTest.java b/src/test/java/fr/igred/omero/screen/ScreenTest.java similarity index 99% rename from src/test/java/fr/igred/omero/repository/ScreenTest.java rename to src/test/java/fr/igred/omero/screen/ScreenTest.java index cc209105..44598a8a 100644 --- a/src/test/java/fr/igred/omero/repository/ScreenTest.java +++ b/src/test/java/fr/igred/omero/screen/ScreenTest.java @@ -15,11 +15,12 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.screen; import fr.igred.omero.UserTest; import fr.igred.omero.annotations.TagAnnotationWrapper; +import fr.igred.omero.core.ImageWrapper; import org.junit.jupiter.api.Test; import java.io.File; diff --git a/src/test/java/fr/igred/omero/repository/WellSampleTest.java b/src/test/java/fr/igred/omero/screen/WellSampleTest.java similarity index 98% rename from src/test/java/fr/igred/omero/repository/WellSampleTest.java rename to src/test/java/fr/igred/omero/screen/WellSampleTest.java index 82d46171..93aafa6f 100644 --- a/src/test/java/fr/igred/omero/repository/WellSampleTest.java +++ b/src/test/java/fr/igred/omero/screen/WellSampleTest.java @@ -15,10 +15,11 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.screen; import fr.igred.omero.UserTest; +import fr.igred.omero.core.ImageWrapper; import org.junit.jupiter.api.Test; import java.util.List; diff --git a/src/test/java/fr/igred/omero/repository/WellTest.java b/src/test/java/fr/igred/omero/screen/WellTest.java similarity index 99% rename from src/test/java/fr/igred/omero/repository/WellTest.java rename to src/test/java/fr/igred/omero/screen/WellTest.java index 5c5f8592..cfc41bdd 100644 --- a/src/test/java/fr/igred/omero/repository/WellTest.java +++ b/src/test/java/fr/igred/omero/screen/WellTest.java @@ -15,7 +15,7 @@ * Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package fr.igred.omero.repository; +package fr.igred.omero.screen; import fr.igred.omero.UserTest; diff --git a/src/test/java/fr/igred/omero/util/WrapperTest.java b/src/test/java/fr/igred/omero/util/WrapperTest.java index 5873b68e..329a54b2 100644 --- a/src/test/java/fr/igred/omero/util/WrapperTest.java +++ b/src/test/java/fr/igred/omero/util/WrapperTest.java @@ -28,18 +28,18 @@ import fr.igred.omero.annotations.TextualAnnotationWrapper; import fr.igred.omero.meta.ExperimenterWrapper; import fr.igred.omero.meta.GroupWrapper; -import fr.igred.omero.meta.PlaneInfoWrapper; -import fr.igred.omero.repository.ChannelWrapper; -import fr.igred.omero.repository.DatasetWrapper; -import fr.igred.omero.repository.FolderWrapper; -import fr.igred.omero.repository.ImageWrapper; -import fr.igred.omero.repository.PixelsWrapper; -import fr.igred.omero.repository.PlateAcquisitionWrapper; -import fr.igred.omero.repository.PlateWrapper; -import fr.igred.omero.repository.ProjectWrapper; -import fr.igred.omero.repository.ScreenWrapper; -import fr.igred.omero.repository.WellSampleWrapper; -import fr.igred.omero.repository.WellWrapper; +import fr.igred.omero.core.PlaneInfoWrapper; +import fr.igred.omero.core.ChannelWrapper; +import fr.igred.omero.containers.DatasetWrapper; +import fr.igred.omero.containers.FolderWrapper; +import fr.igred.omero.core.ImageWrapper; +import fr.igred.omero.core.PixelsWrapper; +import fr.igred.omero.screen.PlateAcquisitionWrapper; +import fr.igred.omero.screen.PlateWrapper; +import fr.igred.omero.containers.ProjectWrapper; +import fr.igred.omero.screen.ScreenWrapper; +import fr.igred.omero.screen.WellSampleWrapper; +import fr.igred.omero.screen.WellWrapper; import fr.igred.omero.roi.EllipseWrapper; import fr.igred.omero.roi.LineWrapper; import fr.igred.omero.roi.MaskWrapper;