Package ome.api
Interface IMetadata
-
- All Superinterfaces:
ServiceInterface
public interface IMetadata extends ServiceInterface
Provides method to interact with acquisition metadata and annotations.- Since:
- 3.0-Beta4
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MOVIE_MPEG_NS
The name space used to indicate that theFileAnnotation
is anMPEG
file.static java.lang.String
MOVIE_QT_NS
The name space used to indicate that theFileAnnotation
is anQT
file.static java.lang.String
MOVIE_WMV_NS
The name space used to indicate that theFileAnnotation
is anWMV
file.static java.lang.String
NS_IMPORTER_ARCHIVED
The name space indicating that theBoolean
annotation indicated if an archived image is imported with the image.static java.lang.String
NS_INSIGHT_RATING
The name space indicating that theLong
annotation is a rating annotation i.e.static java.lang.String
NS_INSIGHT_TAG_SET
The name space indicating that the tag is used a tag set.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Long
countAnnotationsUsedNotOwned(java.lang.Class annotationType, long userID)
Counts the number of annotation of a given type used by the specified user but not owned by the user.java.lang.Long
countSpecifiedAnnotations(java.lang.Class type, java.util.Set<java.lang.String> include, java.util.Set<java.lang.String> exclude, ome.parameters.Parameters options)
Counts the number of annotation of a given type.java.util.Map<java.lang.Long,java.lang.Long>
getTaggedObjectsCount(java.util.Set<java.lang.Long> tagIds, ome.parameters.Parameters options)
Returns a map whose key is a tag's id and the value the number of Projects, Datasets, and Images linked to that tag.<A extends ome.model.annotations.Annotation>
java.util.Set<A>loadAnnotation(java.util.Set<java.lang.Long> annotationIds)
Loads the specified annotations.<T extends ome.model.IObject,A extends ome.model.annotations.Annotation>
java.util.Map<java.lang.Long,java.util.Set<A>>loadAnnotations(java.lang.Class<T> nodeType, java.util.Set<java.lang.Long> rootNodeIds, java.util.Set<java.lang.String> annotationType, java.util.Set<java.lang.Long> annotatorIds, ome.parameters.Parameters options)
Loads all the annotations of given types, that have been attached to the specifiedrootNodes
for the specifiedannotatorIds
.java.util.Set<ome.model.IObject>
loadAnnotationsUsedNotOwned(java.lang.Class annotationType, long userID)
Loads the annotations of a given type used by the specified user but not owned by the user.java.util.Set<ome.model.core.LogicalChannel>
loadChannelAcquisitionData(java.util.Set<java.lang.Long> ids)
Loads thelogical channels
and the acquisition metadata related to them.ome.model.acquisition.Instrument
loadInstrument(long id)
Loads the instrument and its components i.e.java.util.Map<java.lang.Long,java.util.Set<ome.model.IObject>>
loadLogFiles(java.lang.Class<? extends ome.model.IObject> rootNodeType, java.util.Set<java.lang.Long> ids)
Find the original file IDs for the import logs corresponding to the given Image or Fileset IDs.<A extends ome.model.annotations.Annotation>
java.util.Set<A>loadSpecifiedAnnotations(java.lang.Class type, java.util.Set<java.lang.String> include, java.util.Set<java.lang.String> exclude, ome.parameters.Parameters options)
Loads all the annotations of a given type.<A extends ome.model.annotations.Annotation>
java.util.Map<java.lang.Long,java.util.Set<A>>loadSpecifiedAnnotationsLinkedTo(java.lang.Class type, java.util.Set<java.lang.String> include, java.util.Set<java.lang.String> exclude, java.lang.Class rootNodeType, java.util.Set<java.lang.Long> rootNodeIds, ome.parameters.Parameters options)
Loads the annotations of a given type linked to the specified objects.java.util.Map<java.lang.Long,java.util.Set<ome.model.IObject>>
loadTagContent(java.util.Set<java.lang.Long> tagIds, ome.parameters.Parameters options)
Loads the Tag Set if the id is specified otherwise loads all the Tag Set.java.util.Set<ome.model.IObject>
loadTagSets(ome.parameters.Parameters options)
Loads all the tag Sets.
-
-
-
Field Detail
-
NS_INSIGHT_TAG_SET
static final java.lang.String NS_INSIGHT_TAG_SET
The name space indicating that the tag is used a tag set.- See Also:
- Constant Field Values
-
NS_INSIGHT_RATING
static final java.lang.String NS_INSIGHT_RATING
The name space indicating that theLong
annotation is a rating annotation i.e. an integer in the interval[0, 5]
.- See Also:
- Constant Field Values
-
NS_IMPORTER_ARCHIVED
static final java.lang.String NS_IMPORTER_ARCHIVED
The name space indicating that theBoolean
annotation indicated if an archived image is imported with the image.- See Also:
- Constant Field Values
-
MOVIE_MPEG_NS
static final java.lang.String MOVIE_MPEG_NS
The name space used to indicate that theFileAnnotation
is anMPEG
file.- See Also:
- Constant Field Values
-
MOVIE_QT_NS
static final java.lang.String MOVIE_QT_NS
The name space used to indicate that theFileAnnotation
is anQT
file.- See Also:
- Constant Field Values
-
MOVIE_WMV_NS
static final java.lang.String MOVIE_WMV_NS
The name space used to indicate that theFileAnnotation
is anWMV
file.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadChannelAcquisitionData
java.util.Set<ome.model.core.LogicalChannel> loadChannelAcquisitionData(java.util.Set<java.lang.Long> ids)
Loads thelogical channels
and the acquisition metadata related to them.- Parameters:
ids
- The collection of logical channel's ids. Mustn't benull
.- Returns:
- The collection of loaded logical channels.
-
loadAnnotations
<T extends ome.model.IObject,A extends ome.model.annotations.Annotation> java.util.Map<java.lang.Long,java.util.Set<A>> loadAnnotations(java.lang.Class<T> nodeType, java.util.Set<java.lang.Long> rootNodeIds, java.util.Set<java.lang.String> annotationType, java.util.Set<java.lang.Long> annotatorIds, ome.parameters.Parameters options)
Loads all the annotations of given types, that have been attached to the specifiedrootNodes
for the specifiedannotatorIds
. If no types specified, all annotations will be loaded. This method looks for the annotations that have been attached to each of the specified objects. It then maps eachrootNodeId
onto the set of annotations that were found for that node. If no annotations were found for that node, then the entry will benull
. Otherwise it will be aSet
containingAnnotation
objects.- Parameters:
nodeType
- The type of the nodes the annotations are linked to. Mustn't benull
.rootNodeIds
- Ids of the objects of typerootNodeType
. Mustn't benull
.annotationType
- The types of annotation to retrieve. Ifnull
all annotations will be loaded. String of the typeome.model.annotations.*
.annotatorIds
- Ids of the users for whom annotations should be retrieved. Ifnull
, all annotations returned.options
-- Returns:
- A map whose key is rootNodeId and value the
Set
of all annotations for that node ornull
.
-
loadSpecifiedAnnotations
<A extends ome.model.annotations.Annotation> java.util.Set<A> loadSpecifiedAnnotations(java.lang.Class type, java.util.Set<java.lang.String> include, java.util.Set<java.lang.String> exclude, ome.parameters.Parameters options)
Loads all the annotations of a given type. It is possible to filter the annotations by including or excluding name spaces set on the annotations.- Parameters:
type
- The type of annotations to load.include
- Include the annotations with the specified name spaces.exclude
- Exclude the annotations with the specified name spaces.options
- The POJO options.- Returns:
- A collection of found annotations.
-
loadTagContent
java.util.Map<java.lang.Long,java.util.Set<ome.model.IObject>> loadTagContent(java.util.Set<java.lang.Long> tagIds, ome.parameters.Parameters options)
Loads the Tag Set if the id is specified otherwise loads all the Tag Set.- Parameters:
tagIds
- The id of the tag to load or-1
.options
- The POJO options.- Returns:
- Map whose key is a
Tag/Tag Set
and the value either a Map or a list of relatedDataObject
.
-
loadTagSets
java.util.Set<ome.model.IObject> loadTagSets(ome.parameters.Parameters options)
Loads all the tag Sets. Returns a collection ofAnnotationAnnotatioLink
objects and, if theorphan
parameters istrue
, theTagAnnotation
object. Note that the difference between a Tag Set and a Tag is made using the name spaceNS_INSIGHT_TAG_SET
.- Parameters:
options
- The POJO options.- Returns:
- See above.
-
getTaggedObjectsCount
java.util.Map<java.lang.Long,java.lang.Long> getTaggedObjectsCount(java.util.Set<java.lang.Long> tagIds, ome.parameters.Parameters options)
Returns a map whose key is a tag's id and the value the number of Projects, Datasets, and Images linked to that tag.- Parameters:
tagIds
- The collection of ids.options
- The POJO options.- Returns:
- See above.
-
countSpecifiedAnnotations
java.lang.Long countSpecifiedAnnotations(java.lang.Class type, java.util.Set<java.lang.String> include, java.util.Set<java.lang.String> exclude, ome.parameters.Parameters options)
Counts the number of annotation of a given type.- Parameters:
type
- The type of annotations to load.include
- The collection of name space, one of the constants defined by this class.exclude
- The collection of name space, one of the constants defined by this class.options
- The POJO options.- Returns:
- See above.
-
loadAnnotation
<A extends ome.model.annotations.Annotation> java.util.Set<A> loadAnnotation(java.util.Set<java.lang.Long> annotationIds)
Loads the specified annotations.- Parameters:
annotationIds
- The collection of annotation's ids.- Returns:
- See above.
-
loadInstrument
ome.model.acquisition.Instrument loadInstrument(long id)
Loads the instrument and its components i.e. detectors, objectives, etc.- Parameters:
id
- The id of the instrument to load.- Returns:
- See above
-
countAnnotationsUsedNotOwned
java.lang.Long countAnnotationsUsedNotOwned(java.lang.Class annotationType, long userID)
Counts the number of annotation of a given type used by the specified user but not owned by the user.- Parameters:
annotationType
- The type of annotations to load.userID
- The identifier of the user.- Returns:
- See above.
-
loadAnnotationsUsedNotOwned
java.util.Set<ome.model.IObject> loadAnnotationsUsedNotOwned(java.lang.Class annotationType, long userID)
Loads the annotations of a given type used by the specified user but not owned by the user.- Parameters:
annotationType
- The type of annotations to load.userID
- The identifier of the user.- Returns:
- See above.
-
loadSpecifiedAnnotationsLinkedTo
<A extends ome.model.annotations.Annotation> java.util.Map<java.lang.Long,java.util.Set<A>> loadSpecifiedAnnotationsLinkedTo(java.lang.Class type, java.util.Set<java.lang.String> include, java.util.Set<java.lang.String> exclude, java.lang.Class rootNodeType, java.util.Set<java.lang.Long> rootNodeIds, ome.parameters.Parameters options)
Loads the annotations of a given type linked to the specified objects. It is possible to filter the annotations by including or excluding name spaces set on the annotations. This method looks for the annotations that have been attached to each of the specified objects. It then maps eachrootNodeId
onto the set of annotations that were found for that node. If no annotations were found for that node, the map will not contain an entry for that node. Otherwise it will be aSet
containingAnnotation
objects. TherootNodeType
supported are: Project, Dataset, Image, Pixels, Screen, Plate, PlateAcquisition, Well, Fileset.- Parameters:
type
- The type of annotations to load.include
- Include the annotations with the specified name spaces.exclude
- Exclude the annotations with the specified name spaces.rootNodeType
- The type of objects the annotations are linked to.rootNodeIds
- The identifiers of the objects.options
- The POJO options.- Returns:
- A collection of found annotations.
-
loadLogFiles
java.util.Map<java.lang.Long,java.util.Set<ome.model.IObject>> loadLogFiles(java.lang.Class<? extends ome.model.IObject> rootNodeType, java.util.Set<java.lang.Long> ids)
Find the original file IDs for the import logs corresponding to the given Image or Fileset IDs.- Parameters:
rootNodeType
- the root node type, may beImage
orFileset
ids
- the IDs of the entities for which the import log original file IDs are required- Returns:
- the original file IDs of the import logs
-
-