public interface Annotatable extends RemoteObject
Modifier and Type | Method and Description |
---|---|
default long |
addAndReplaceFile(Client client,
File file)
Uploads a file, links it to the object and unlinks previous files with the same name, or deletes them if they're
orphaned.
|
long |
addAndReplaceFile(Client client,
File file,
ReplacePolicy policy)
Uploads a file, links it to the object and unlinks or deletes previous files with the same name.
|
default void |
addAndReplaceTable(Client client,
Table table)
Adds a table to the object in OMERO and unlinks previous tables with the same name, or deletes them if they're
orphaned.
|
void |
addAndReplaceTable(Client client,
Table table,
ReplacePolicy policy)
Adds a table to the object in OMERO and unlinks or deletes previous tables with the same name.
|
default long |
addFile(DataManager dm,
File file)
Uploads a file and links it to the object
|
void |
addKeyValuePair(DataManager dm,
String key,
String value)
Adds a single Key-Value pair to the object.
|
default void |
addTable(DataManager dm,
Table table)
Adds a table to the object in OMERO.
|
void |
addTag(DataManager dm,
Long id)
Adds a tag to the object in OMERO, if possible.
|
void |
addTag(DataManager dm,
String name,
String description)
Adds a newly created tag to the object in OMERO, if possible.
|
default void |
addTags(DataManager dm,
Long... ids)
Adds multiple tags by ID to the object in OMERO, if possible.
|
default void |
copyAnnotationLinks(Client client,
Annotatable object)
Copies annotation links from some other object to this one.
|
default List<AnnotationData> |
getAnnotationData(Browser browser)
Retrieves annotations linked to the object.
|
List<Annotation> |
getAnnotations(Browser browser)
Retrieves annotations linked to the object (of known types).
|
List<FileAnnotation> |
getFileAnnotations(Browser browser)
Returns the file annotations
|
default List<Map.Entry<String,String>> |
getKeyValuePairs(Browser browser)
Gets the List of Key-Value pairs associated to an object.
|
List<MapAnnotation> |
getMapAnnotations(Browser browser)
Gets all map annotations linked to an object in OMERO, if possible.
|
int |
getMyRating(Browser browser)
Returns the user rating for this object (averaged if multiple ratings are linked).
|
Table |
getTable(DataManager dm,
Long fileId)
Gets a certain table linked to the object in OMERO.
|
default List<Table> |
getTables(DataManager dm)
Gets all tables linked to the object in OMERO.
|
List<TagAnnotation> |
getTags(Browser browser)
Gets all tags linked to an object in OMERO, if possible.
|
default List<String> |
getValues(Browser browser,
String key)
Gets the value from a Key-Value pair associated to the object.
|
default <A extends Annotation> |
isLinked(Browser browser,
A annotation)
Checks if a specific annotation is linked to the object.
|
default <A extends Annotation> |
link(DataManager dm,
A annotation)
Adds an annotation to the object in OMERO, if possible.
|
default <A extends AnnotationData> |
link(DataManager dm,
A annotation)
Attach an
AnnotationData to this object. |
default void |
link(DataManager dm,
Annotation... annotations)
Adds multiple annotations to the object in OMERO, if possible.
|
default void |
linkIfNotLinked(Client client,
Annotation... annotations)
Adds multiple annotations to the object in OMERO if they are not already linked.
|
void |
rate(Client client,
int rating)
Rates the object (using a rating annotation).
|
<A extends Annotation> |
unlink(Client client,
A annotation)
Unlinks the given annotation from the current object.
|
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, distinct, flatten, getCreated, getElementsOf, getGroupId, getId, getOwner, getUpdated, saveAndUpdate
default <A extends Annotation> boolean isLinked(Browser browser, A annotation) throws ServiceException, AccessException, ExecutionException
A
- The type of the annotation.browser
- The data browser.annotation
- Annotation to be checked.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default <A extends AnnotationData> void link(DataManager dm, A annotation) throws ServiceException, AccessException, ExecutionException
AnnotationData
to this object.A
- The type of the annotation.dm
- The data manager.annotation
- The AnnotationData
.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default <A extends Annotation> void link(DataManager dm, A annotation) throws ServiceException, AccessException, ExecutionException
A
- The type of the annotation.dm
- The client handling the connection.annotation
- Annotation to be added.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default void link(DataManager dm, Annotation... annotations) throws ServiceException, AccessException, ExecutionException
dm
- The data manager.annotations
- Annotations to add.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default void linkIfNotLinked(Client client, Annotation... annotations) throws ServiceException, AccessException, ExecutionException
client
- The client handling the connection.annotations
- Annotations to add.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.void addTag(DataManager dm, String name, String description) throws ServiceException, AccessException, ExecutionException
dm
- The data manager.name
- Tag Name.description
- Tag description.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.void addTag(DataManager dm, Long id) throws ServiceException, AccessException, ExecutionException
dm
- The data manager.id
- ID of the tag to add to the object.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default void addTags(DataManager dm, Long... ids) throws ServiceException, AccessException, ExecutionException
dm
- The data manager.ids
- Array of tag id in OMERO to add.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.List<TagAnnotation> getTags(Browser browser) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.List<MapAnnotation> getMapAnnotations(Browser browser) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.void addKeyValuePair(DataManager dm, String key, String value) throws ServiceException, AccessException, ExecutionException
dm
- The data manager.key
- Name of the key.value
- Value associated to the key.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default List<Map.Entry<String,String>> getKeyValuePairs(Browser browser) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default List<String> getValues(Browser browser, String key) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.key
- Key researched.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.NoSuchElementException
- Key not found.ExecutionException
- A Facility can't be retrieved or instantiated.void rate(Client client, int rating) throws ServiceException, AccessException, ExecutionException, InterruptedException
If multiple ratings are present, only one will be kept and updated.
client
- The client handling the connection.rating
- The rating.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.InterruptedException
- The thread was interrupted.int getMyRating(Browser browser) throws ServiceException, AccessException, ExecutionException
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default void addTable(DataManager dm, Table table) throws ServiceException, AccessException, ExecutionException
dm
- The data manager.table
- Table to add to the object.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.void addAndReplaceTable(Client client, Table table, ReplacePolicy policy) throws ServiceException, AccessException, ExecutionException, InterruptedException
client
- The client handling the connection.table
- Table to add to the object.policy
- Whether older tables should be unlinked, deleted or deleted only if they become orphaned.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.InterruptedException
- The thread was interrupted.default void addAndReplaceTable(Client client, Table table) throws ServiceException, AccessException, ExecutionException, InterruptedException
client
- The client handling the connection.table
- Table to add to the object.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.InterruptedException
- The thread was interrupted.Table getTable(DataManager dm, Long fileId) throws ServiceException, AccessException, ExecutionException
dm
- The data manager.fileId
- FileId of the table researched.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default List<Table> getTables(DataManager dm) throws ServiceException, AccessException, ExecutionException
dm
- The data manager.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default long addFile(DataManager dm, File file) throws ExecutionException, InterruptedException
dm
- The data manager.file
- File to add.ExecutionException
- A Facility can't be retrieved or instantiated.InterruptedException
- The thread was interrupted.long addAndReplaceFile(Client client, File file, ReplacePolicy policy) throws ExecutionException, InterruptedException, AccessException, ServiceException
client
- The client handling the connection.file
- File to add.policy
- Whether older files should be unlinked, deleted or deleted only if they become orphaned.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.InterruptedException
- The thread was interrupted.default long addAndReplaceFile(Client client, File file) throws ExecutionException, InterruptedException, AccessException, ServiceException
client
- The client handling the connection.file
- File to add.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.InterruptedException
- The thread was interrupted.List<FileAnnotation> getFileAnnotations(Browser browser) throws ExecutionException, ServiceException, AccessException
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.<A extends Annotation> void unlink(Client client, A annotation) throws ServiceException, AccessException, ExecutionException, InterruptedException
A
- The type of the annotation.client
- The client handling the connection.annotation
- An annotation.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.InterruptedException
- If block(long) does not return.default List<AnnotationData> getAnnotationData(Browser browser) throws AccessException, ServiceException, ExecutionException
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.List<Annotation> getAnnotations(Browser browser) throws AccessException, ServiceException, ExecutionException
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.default void copyAnnotationLinks(Client client, Annotatable object) throws AccessException, ServiceException, ExecutionException
client
- The client handling the connection.object
- Other repository object to copy annotations from.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.Copyright © 2020–2023 GReD. All rights reserved.