From 419afbccba97badcd1349d58df1be5cb3ea23b35 Mon Sep 17 00:00:00 2001 From: Pierre Pouchin Date: Sun, 1 Dec 2024 01:06:04 +0100 Subject: [PATCH] Move link implementation to TagSetWrapper --- .../fr/igred/omero/annotations/TagSet.java | 8 ++------ .../omero/annotations/TagSetWrapper.java | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/main/java/fr/igred/omero/annotations/TagSet.java b/src/main/java/fr/igred/omero/annotations/TagSet.java index 156a1eea..3cc381f2 100644 --- a/src/main/java/fr/igred/omero/annotations/TagSet.java +++ b/src/main/java/fr/igred/omero/annotations/TagSet.java @@ -136,12 +136,8 @@ default void link(DataManager dm, TagAnnotation tag) * @throws AccessException Cannot access data. * @throws ExecutionException A Facility can't be retrieved or instantiated. */ - default void link(DataManager dm, TagAnnotation... tags) - throws AccessException, ServiceException, ExecutionException { - for (TagAnnotation tag : tags) { - link(dm, tag); - } - } + void link(DataManager dm, TagAnnotation... tags) + throws AccessException, ServiceException, ExecutionException; /** diff --git a/src/main/java/fr/igred/omero/annotations/TagSetWrapper.java b/src/main/java/fr/igred/omero/annotations/TagSetWrapper.java index 10c8458d..cf9ee722 100644 --- a/src/main/java/fr/igred/omero/annotations/TagSetWrapper.java +++ b/src/main/java/fr/igred/omero/annotations/TagSetWrapper.java @@ -75,6 +75,25 @@ public List getTags() { } + /** + * Links multiple tags to this tag set. + * + * @param dm The data manager. + * @param tags The tags. + * + * @throws ServiceException Cannot connect to OMERO. + * @throws AccessException Cannot access data. + * @throws ExecutionException A Facility can't be retrieved or instantiated. + */ + @Override + public void link(DataManager dm, TagAnnotation... tags) + throws AccessException, ServiceException, ExecutionException { + for (TagAnnotation tag : tags) { + link(dm, tag); + } + } + + /** * Reloads the tag set from OMERO. *