Skip to content

Commit

Permalink
Fix copyAnnotationLinks for folders and plate acquisitions (#52)
Browse files Browse the repository at this point in the history
* Fix copyAnnotations for PlateAcquisitionWrapper and FolderWrapper
  • Loading branch information
ppouchin authored Feb 28, 2023
1 parent 1d90cc0 commit 3c370a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>fr.igred</groupId>
<artifactId>simple-omero-client</artifactId>
<version>5.12.0</version>
<version>5.12.1</version>
<packaging>jar</packaging>

<name>Simple OMERO Client</name>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/fr/igred/omero/repository/FolderWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

import fr.igred.omero.Client;
import fr.igred.omero.GenericObjectWrapper;
import fr.igred.omero.annotations.GenericAnnotationWrapper;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ExceptionHandler;
import fr.igred.omero.exception.OMEROServerError;
import fr.igred.omero.exception.ServiceException;
import fr.igred.omero.roi.ROIWrapper;
import omero.gateway.facility.ROIFacility;
import omero.gateway.model.AnnotationData;
import omero.gateway.model.DataObject;
import omero.gateway.model.FolderData;
import omero.gateway.model.ROIData;
Expand Down Expand Up @@ -128,10 +128,10 @@ protected String annotationLinkType() {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
public <A extends GenericAnnotationWrapper<?>> void link(Client client, A annotation)
protected <A extends AnnotationData> void link(Client client, A annotation)
throws ServiceException, AccessException, ExecutionException {
FolderAnnotationLink link = new FolderAnnotationLinkI();
link.setChild(annotation.asDataObject().asAnnotation());
link.setChild(annotation.asAnnotation());
link.setParent(data.asFolder());
client.save(link);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

import fr.igred.omero.Client;
import fr.igred.omero.GenericObjectWrapper;
import fr.igred.omero.annotations.GenericAnnotationWrapper;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.OMEROServerError;
import fr.igred.omero.exception.ServiceException;
import omero.gateway.model.AnnotationData;
import omero.gateway.model.PlateAcquisitionData;
import omero.model.PlateAcquisitionAnnotationLink;
import omero.model.PlateAcquisitionAnnotationLinkI;
Expand Down Expand Up @@ -137,10 +137,10 @@ public void setDescription(String description) {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
public <A extends GenericAnnotationWrapper<?>> void link(Client client, A annotation)
protected <A extends AnnotationData> void link(Client client, A annotation)
throws ServiceException, AccessException, ExecutionException {
PlateAcquisitionAnnotationLink link = new PlateAcquisitionAnnotationLinkI();
link.setChild(annotation.asDataObject().asAnnotation());
link.setChild(annotation.asAnnotation());
link.setParent((omero.model.PlateAcquisition) data.asIObject());
client.save(link);
}
Expand Down

0 comments on commit 3c370a1

Please sign in to comment.