From 0aeb56d44ec388a6610ed43dda8c729022bc8b4c Mon Sep 17 00:00:00 2001 From: Pierre Pouchin Date: Sun, 1 Dec 2024 16:14:46 +0100 Subject: [PATCH] Extract toTagSet interface --- src/main/java/fr/igred/omero/annotations/Tag.java | 14 ++++++++++++++ .../fr/igred/omero/annotations/TagAnnotation.java | 10 +--------- 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 src/main/java/fr/igred/omero/annotations/Tag.java diff --git a/src/main/java/fr/igred/omero/annotations/Tag.java b/src/main/java/fr/igred/omero/annotations/Tag.java new file mode 100644 index 00000000..4a62b489 --- /dev/null +++ b/src/main/java/fr/igred/omero/annotations/Tag.java @@ -0,0 +1,14 @@ +package fr.igred.omero.annotations; + + +@FunctionalInterface +public interface Tag { + + /** + * Converts this tag annotation to a tag set. + * + * @return See above. + */ + TagSet toTagSet(); + +} diff --git a/src/main/java/fr/igred/omero/annotations/TagAnnotation.java b/src/main/java/fr/igred/omero/annotations/TagAnnotation.java index 4b0560f9..9dc23737 100644 --- a/src/main/java/fr/igred/omero/annotations/TagAnnotation.java +++ b/src/main/java/fr/igred/omero/annotations/TagAnnotation.java @@ -24,7 +24,7 @@ /** * Interface to handle Tag Annotations on OMERO. */ -public interface TagAnnotation extends Annotation { +public interface TagAnnotation extends Tag, Annotation { /** * The name space used to indicate that the tag is used a tag set. @@ -68,12 +68,4 @@ default boolean isTagSet() { return NS_TAGSET.equals(getNameSpace()); } - - /** - * Converts this tag annotation to a tag set. - * - * @return See above. - */ - TagSet toTagSet(); - }