Skip to content

Commit

Permalink
Re-add removeLink method
Browse files Browse the repository at this point in the history
  • Loading branch information
ppouchin committed Feb 23, 2024
1 parent 76791a4 commit fd5655b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/main/java/fr/igred/omero/AnnotatableWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ public List<FileAnnotationWrapper> getFileAnnotations(Client client)
*/
public <A extends GenericAnnotationWrapper<?>> void unlink(Client client, A annotation)
throws ServiceException, AccessException, ExecutionException, OMEROServerError, InterruptedException {
removeLinks(client, annotationLinkType(), Collections.singletonList(annotation.getId()));
removeLink(client, annotationLinkType(), annotation.getId());
}


Expand Down Expand Up @@ -889,6 +889,25 @@ protected void removeLinks(Client client, String linkType, Collection<Long> 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.
*
Expand Down

0 comments on commit fd5655b

Please sign in to comment.