diff --git a/src/main/java/fr/igred/omero/AnnotatableWrapper.java b/src/main/java/fr/igred/omero/AnnotatableWrapper.java index 2b6321b7..d271e83d 100644 --- a/src/main/java/fr/igred/omero/AnnotatableWrapper.java +++ b/src/main/java/fr/igred/omero/AnnotatableWrapper.java @@ -838,7 +838,7 @@ public List getFileAnnotations(Client client) */ public > void unlink(Client client, A annotation) throws ServiceException, AccessException, ExecutionException, OMEROServerError, InterruptedException { - removeLinks(client, annotationLinkType(), Collections.singletonList(annotation.getId())); + removeLink(client, annotationLinkType(), annotation.getId()); } @@ -889,6 +889,25 @@ protected void removeLinks(Client client, String linkType, Collection chil } + /** + * Removes the link of the given type with the given child ID. + * + * @param client The client handling the connection. + * @param linkType The link type. + * @param childId Link child ID. + * + * @throws ServiceException Cannot connect to OMERO. + * @throws AccessException Cannot access data. + * @throws ExecutionException A Facility can't be retrieved or instantiated. + * @throws OMEROServerError Server error. + * @throws InterruptedException If block(long) does not return. + */ + protected void removeLink(Client client, String linkType, long childId) + throws ServiceException, OMEROServerError, AccessException, ExecutionException, InterruptedException { + removeLinks(client, linkType, Collections.singletonList(childId)); + } + + /** * Retrieves annotations linked to the object. *