Skip to content

Commit

Permalink
Move link implementation to TagSetWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
ppouchin committed Dec 1, 2024
1 parent f9465e7 commit 419afbc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/fr/igred/omero/annotations/TagSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;


/**
Expand Down
19 changes: 19 additions & 0 deletions src/main/java/fr/igred/omero/annotations/TagSetWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,25 @@ public List<TagAnnotation> 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.
*
Expand Down

0 comments on commit 419afbc

Please sign in to comment.