@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Roi extends java.lang.Object implements java.io.Serializable, IObject, IMutable, IAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
Roi.Details |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
_dynamicFields |
protected boolean |
_loaded |
protected java.util.Set<RoiAnnotationLink> |
annotationLinks |
static java.lang.String |
ANNOTATIONLINKS |
static java.lang.String |
ANNOTATIONLINKSCOUNTPEROWNER |
protected java.lang.String |
description |
static java.lang.String |
DESCRIPTION |
protected Details |
details |
static java.lang.String |
DETAILS |
static java.lang.String |
EVENT_FILTER |
static java.lang.String |
EVENT_FILTER_ANNOTATIONLINKS |
static java.lang.String |
EVENT_FILTER_FOLDERLINKS |
static java.lang.String |
EVENT_FILTER_SHAPES |
static java.util.Set<java.lang.String> |
FIELDS |
protected java.util.Set<FolderRoiLink> |
folderLinks |
static java.lang.String |
FOLDERLINKS |
static java.lang.String |
FOLDERLINKSCOUNTPEROWNER |
static java.lang.String |
GROUP_FILTER |
static java.lang.String |
GROUP_FILTER_ANNOTATIONLINKS |
static java.lang.String |
GROUP_FILTER_FOLDERLINKS |
static java.lang.String |
GROUP_FILTER_SHAPES |
protected java.lang.Long |
id |
static java.lang.String |
ID |
protected Image |
image |
static java.lang.String |
IMAGE |
protected java.lang.String |
name |
static java.lang.String |
NAME |
static java.lang.String |
OWNER_FILTER |
static java.lang.String |
OWNER_FILTER_ANNOTATIONLINKS |
static java.lang.String |
OWNER_FILTER_FOLDERLINKS |
static java.lang.String |
OWNER_FILTER_SHAPES |
static java.lang.String |
PERMS_FILTER |
static java.lang.String |
PERMS_FILTER_ANNOTATIONLINKS |
static java.lang.String |
PERMS_FILTER_FOLDERLINKS |
static java.lang.String |
PERMS_FILTER_SHAPES |
protected java.util.List<Shape> |
shapes |
static java.lang.String |
SHAPES |
protected OriginalFile |
source |
static java.lang.String |
SOURCE |
protected java.lang.Integer |
version |
static java.lang.String |
VERSION |
Modifier | Constructor and Description |
---|---|
|
Roi() |
protected |
Roi(java.lang.Long id) |
|
Roi(java.lang.Long id,
boolean loaded)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addFolderRoiLink(FolderRoiLink target)
use instead of setFolderLinks .
|
void |
addFolderRoiLink(FolderRoiLink link,
boolean bothSides)
Adds a ome.model.containers.FolderRoiLink to folderLinks, allowing for recursion -- whether
or not addFolderRoiLink will be called on the addition if it is loaded
|
void |
addFolderRoiLinkSet(java.util.Collection<FolderRoiLink> targets)
use like addFolderRoiLink.
|
void |
addRoiAnnotationLink(RoiAnnotationLink target)
use instead of setAnnotationLinks .
|
void |
addRoiAnnotationLink(RoiAnnotationLink link,
boolean bothSides)
Adds a ome.model.annotations.RoiAnnotationLink to annotationLinks, allowing for recursion -- whether
or not addRoiAnnotationLink will be called on the addition if it is loaded
|
void |
addRoiAnnotationLinkSet(java.util.Collection<RoiAnnotationLink> targets)
use like addRoiAnnotationLink.
|
void |
addShape(Shape target)
use instead of setShapes .
|
void |
addShapeSet(java.util.Collection<Shape> targets)
use like addShape.
|
void |
clearAnnotationLinks()
clears the set.
|
void |
clearFolderLinks()
clears the set.
|
void |
clearShapes()
clears the set.
|
<E> java.util.List<E> |
collectAnnotationLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.RoiAnnotationLink while
collecting the results.
|
<E> java.util.List<E> |
collectFolderLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.containers.FolderRoiLink while
collecting the results.
|
<E> java.util.List<E> |
collectShapes(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.roi.Shape while
collecting the results.
|
<E> java.util.List<E> |
eachLinkedAnnotation(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.Annotation while
collecting the results.
|
<E> java.util.List<E> |
eachLinkedFolder(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.containers.Folder while
collecting the results.
|
protected void |
errorIfUnloaded() |
java.util.Set<java.lang.String> |
fields()
returns a Set of field names that belong to this class
|
java.util.Set<FolderRoiLink> |
findFolderRoiLink(Folder target)
find all ome.model.containers.FolderRoiLink which have the argument as their parent.
|
java.util.Set<RoiAnnotationLink> |
findRoiAnnotationLink(Annotation target)
find all ome.model.annotations.RoiAnnotationLink which have the argument as their child.
|
protected java.util.Set<RoiAnnotationLink> |
getAnnotationLinks()
returns annotationLinks .
|
java.util.Map<java.lang.Long,java.lang.Long> |
getAnnotationLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.annotations.RoiAnnotationLink that a user has.
|
java.lang.String |
getDescription()
Simple field ome.model.roi.Roi.description (java.lang.String)
|
Details |
getDetails()
The details of this object correspond to low-level system
information.
|
protected java.util.Set<FolderRoiLink> |
getFolderLinks()
returns folderLinks .
|
java.util.Map<java.lang.Long,java.lang.Long> |
getFolderLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.containers.FolderRoiLink that a user has.
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
java.lang.Long |
getId()
The DB unique identifier for this object.
|
Image |
getImage()
Many-to-one field ome.model.roi.Roi.image (ome.model.core.Image)
|
java.lang.String |
getName()
Simple field ome.model.roi.Roi.name (java.lang.String)
|
Shape |
getPrimaryShape()
Gets the first element of shapes which can be interpreted as the
primary or default element in some situations.
|
Shape |
getShape(int index)
Gets the ome.model.roi.Shape at the given index.
|
protected java.util.List<Shape> |
getShapes()
returns shapes .
|
OriginalFile |
getSource()
Many-to-one field ome.model.roi.Roi.source (ome.model.core.OriginalFile)
|
java.lang.Integer |
getVersion()
This version number is controlled by the database for optimisitic
locking.
|
boolean |
isLoaded()
transient field (not stored in the DB) which specifies whether this
object has been loaded from the DB or is only a wrapper around the ID.
|
boolean |
isValid()
calls the class-specific validator for this instance and returns the
value from
Validation.isValid() |
java.util.Iterator<RoiAnnotationLink> |
iterateAnnotationLinks()
should be used rather than accessing the annotationLinks set directly.
|
java.util.Iterator<FolderRoiLink> |
iterateFolderLinks()
should be used rather than accessing the folderLinks set directly.
|
java.util.Iterator<Shape> |
iterateShapes()
should be used rather than accessing the shapes set directly.
|
RoiAnnotationLink |
linkAnnotation(Annotation addition)
Adds a ome.model.annotations.RoiAnnotationLink to annotationLinks .
|
java.util.Iterator<Annotation> |
linkedAnnotationIterator()
provides an iterator over the parent values of the annotationLinks.
|
java.util.List<Annotation> |
linkedAnnotationList()
produces a
List -copy of the underlying collection. |
java.util.Iterator<Folder> |
linkedFolderIterator()
provides an iterator over the child values of the folderLinks.
|
java.util.List<Folder> |
linkedFolderList()
produces a
List -copy of the underlying collection. |
FolderRoiLink |
linkFolder(Folder addition)
Adds a ome.model.containers.FolderRoiLink to folderLinks .
|
Roi |
newInstance() |
Roi |
proxy() |
void |
putAt(java.lang.String field,
java.lang.Object value)
stores a value in this instance.
|
void |
removeFolderRoiLink(FolderRoiLink target)
removes a single element from this set and makes the inverse call on ome.model.containers.FolderRoiLink
|
void |
removeFolderRoiLink(FolderRoiLink link,
boolean bothSides)
removes the given FolderRoiLink from folderLinks, allowing for recursion -- whether
or not the removal will call unlinkRoi again if loaded.
|
void |
removeFolderRoiLinkSet(java.util.Collection<FolderRoiLink> targets)
use like removeFolderRoiLink
|
void |
removeRoiAnnotationLink(RoiAnnotationLink target)
removes a single element from this set and makes the inverse call on ome.model.annotations.RoiAnnotationLink
|
void |
removeRoiAnnotationLink(RoiAnnotationLink link,
boolean bothSides)
removes the given RoiAnnotationLink from annotationLinks, allowing for recursion -- whether
or not the removal will call unlinkRoi again if loaded.
|
void |
removeRoiAnnotationLinkSet(java.util.Collection<RoiAnnotationLink> targets)
use like removeRoiAnnotationLink
|
void |
removeShape(Shape target)
removes a single element from this set and makes the inverse call on ome.model.roi.Shape
|
void |
removeShapeSet(java.util.Collection<Shape> targets)
use like removeShape
|
java.lang.Object |
retrieve(java.lang.String field)
retrieves a value from this instance.
|
protected void |
setAnnotationLinks(java.util.Set<RoiAnnotationLink> annotationLinks)
setter for annotationLinks should be avoided.
|
protected void |
setAnnotationLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map) |
void |
setDescription(java.lang.String description) |
protected void |
setDetails(Details details)
Use the
Details.copy(ome.model.internal.Details)
or Details.shallowCopy(ome.model.internal.Details)
methods to set the Roi.Details instance instead. |
protected void |
setFolderLinks(java.util.Set<FolderRoiLink> folderLinks)
setter for folderLinks should be avoided.
|
protected void |
setFolderLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map) |
void |
setId(java.lang.Long id)
usually unneeded.
|
void |
setImage(Image image) |
void |
setName(java.lang.String name) |
Shape |
setPrimaryShape(Shape element)
Swaps the first element of shapes with the first instance of the
given element.
|
Shape |
setShape(int index,
Shape element)
Sets the ome.model.roi.Shape at the given index.
|
protected void |
setShapes(java.util.List<Shape> shapes)
setter for shapes should be avoided.
|
void |
setSource(OriginalFile source) |
void |
setVersion(java.lang.Integer version)
use with caution.
|
int |
sizeOfAnnotationLinks()
returns the size of annotationLinks.
|
int |
sizeOfFolderLinks()
returns the size of folderLinks.
|
int |
sizeOfShapes()
returns the size of shapes.
|
protected void |
throwNullCollectionException(java.lang.String propertyName) |
java.lang.String |
toString() |
void |
unlinkAnnotation(Annotation removal)
unlinks all ome.model.annotations.Annotation instances from this instance.
|
void |
unlinkFolder(Folder removal)
unlinks all ome.model.containers.Folder instances from this instance.
|
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
java.util.Collection<RoiAnnotationLink> |
unmodifiableAnnotationLinks()
Returns an unmodifiable collection-view
|
java.util.Collection<FolderRoiLink> |
unmodifiableFolderLinks()
Returns an unmodifiable collection-view
|
java.util.Collection<Shape> |
unmodifiableShapes()
Returns an unmodifiable collection-view
|
Validation |
validate()
calls the class-specific validator for this instance and returns the
Validation object. |
public static final java.lang.String OWNER_FILTER
public static final java.lang.String GROUP_FILTER
public static final java.lang.String EVENT_FILTER
public static final java.lang.String PERMS_FILTER
public static final java.lang.String ID
protected java.lang.Long id
public static final java.lang.String VERSION
protected java.lang.Integer version
protected java.lang.String name
protected java.util.List<Shape> shapes
public static final java.lang.String OWNER_FILTER_SHAPES
public static final java.lang.String GROUP_FILTER_SHAPES
public static final java.lang.String EVENT_FILTER_SHAPES
public static final java.lang.String PERMS_FILTER_SHAPES
protected Image image
protected OriginalFile source
protected java.util.Set<FolderRoiLink> folderLinks
public static final java.lang.String OWNER_FILTER_FOLDERLINKS
public static final java.lang.String GROUP_FILTER_FOLDERLINKS
public static final java.lang.String EVENT_FILTER_FOLDERLINKS
public static final java.lang.String PERMS_FILTER_FOLDERLINKS
protected java.util.Set<RoiAnnotationLink> annotationLinks
public static final java.lang.String OWNER_FILTER_ANNOTATIONLINKS
public static final java.lang.String GROUP_FILTER_ANNOTATIONLINKS
public static final java.lang.String EVENT_FILTER_ANNOTATIONLINKS
public static final java.lang.String PERMS_FILTER_ANNOTATIONLINKS
protected java.lang.String description
protected Details details
public static final java.lang.String NAME
public static final java.lang.String SHAPES
public static final java.lang.String IMAGE
public static final java.lang.String SOURCE
public static final java.lang.String FOLDERLINKSCOUNTPEROWNER
public static final java.lang.String FOLDERLINKS
public static final java.lang.String ANNOTATIONLINKSCOUNTPEROWNER
public static final java.lang.String ANNOTATIONLINKS
public static final java.lang.String DESCRIPTION
public static final java.lang.String DETAILS
public static final java.util.Set<java.lang.String> FIELDS
protected java.util.Map<java.lang.String,java.lang.Object> _dynamicFields
protected boolean _loaded
public Roi()
protected Roi(java.lang.Long id)
public Roi(java.lang.Long id, boolean loaded)
@DocumentId public java.lang.Long getId()
public void setId(java.lang.Long id)
IObject
public java.lang.Integer getVersion()
getVersion
in interface IMutable
public void setVersion(java.lang.Integer version)
IMutable
setVersion
in interface IMutable
version
- Value for this objects version.@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public java.lang.String getName()
public void setName(java.lang.String name)
protected java.util.List<Shape> getShapes()
protected void setShapes(java.util.List<Shape> shapes)
public int sizeOfShapes()
public java.util.Iterator<Shape> iterateShapes()
EmptyIterator
. To test for a null collection,
see of sizeOfShapes()
is less than zero.public java.util.Collection<Shape> unmodifiableShapes()
public <E> java.util.List<E> collectShapes(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateShapes()
internally and so will return a value
even if the underlying collection is null.public void addShape(Shape target)
public void addShapeSet(java.util.Collection<Shape> targets)
public void removeShape(Shape target)
public void removeShapeSet(java.util.Collection<Shape> targets)
public void clearShapes()
public Shape getShape(int index) throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
public Shape setShape(int index, Shape element) throws java.lang.IndexOutOfBoundsException
List.set(int, Object)
contract. To extend the list, use addShape(Shape)
.java.lang.IndexOutOfBoundsException
List.set(int, Object)
public Shape getPrimaryShape() throws java.lang.IndexOutOfBoundsException
IndexOutOfBoundsException
is throws. This method
will also throw an ApiUsageException
if the collection is
unloaded. See sizeOfShapes()
for more information.java.lang.IndexOutOfBoundsException
public Shape setPrimaryShape(Shape element) throws java.lang.IndexOutOfBoundsException
IndexOutOfBoundsException
will be thrown. Returns the swapped
element. This method
will also throw an ApiUsageException
if the collection is
unloaded. See sizeOfShapes()
for more information.java.lang.IndexOutOfBoundsException
public Image getImage()
public void setImage(Image image)
public OriginalFile getSource()
public void setSource(OriginalFile source)
protected java.util.Set<FolderRoiLink> getFolderLinks()
protected void setFolderLinks(java.util.Set<FolderRoiLink> folderLinks)
public int sizeOfFolderLinks()
public java.util.Iterator<FolderRoiLink> iterateFolderLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfFolderLinks()
is less than zero.public java.util.Collection<FolderRoiLink> unmodifiableFolderLinks()
public <E> java.util.List<E> collectFolderLinks(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateFolderLinks()
internally and so will return a value
even if the underlying collection is null.public void addFolderRoiLink(FolderRoiLink target)
public void addFolderRoiLinkSet(java.util.Collection<FolderRoiLink> targets)
public void removeFolderRoiLink(FolderRoiLink target)
public void removeFolderRoiLinkSet(java.util.Collection<FolderRoiLink> targets)
public FolderRoiLink linkFolder(Folder addition)
public void addFolderRoiLink(FolderRoiLink link, boolean bothSides)
public java.util.Iterator<Folder> linkedFolderIterator()
ConcurrentModificationException
.
Use linkedFolderList()
instead.public java.util.Set<FolderRoiLink> findFolderRoiLink(Folder target)
public java.util.List<Folder> linkedFolderList()
List
-copy of the underlying collection. Unlike,
linkedFolderIterator()
, while using the returned List
,
modifications can be made to the underlying collection without throwing
ConcurrentModificationException
.public <E> java.util.List<E> eachLinkedFolder(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.public void unlinkFolder(Folder removal)
public void removeFolderRoiLink(FolderRoiLink link, boolean bothSides)
public void clearFolderLinks()
protected void setFolderLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map)
public java.util.Map<java.lang.Long,java.lang.Long> getFolderLinksCountPerOwner()
protected java.util.Set<RoiAnnotationLink> getAnnotationLinks()
protected void setAnnotationLinks(java.util.Set<RoiAnnotationLink> annotationLinks)
public int sizeOfAnnotationLinks()
sizeOfAnnotationLinks
in interface IAnnotated
public java.util.Iterator<RoiAnnotationLink> iterateAnnotationLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfAnnotationLinks()
is less than zero.iterateAnnotationLinks
in interface IAnnotated
public java.util.Collection<RoiAnnotationLink> unmodifiableAnnotationLinks()
unmodifiableAnnotationLinks
in interface IAnnotated
public <E> java.util.List<E> collectAnnotationLinks(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateAnnotationLinks()
internally and so will return a value
even if the underlying collection is null.collectAnnotationLinks
in interface IAnnotated
public void addRoiAnnotationLink(RoiAnnotationLink target)
public void addRoiAnnotationLinkSet(java.util.Collection<RoiAnnotationLink> targets)
public void removeRoiAnnotationLink(RoiAnnotationLink target)
public void removeRoiAnnotationLinkSet(java.util.Collection<RoiAnnotationLink> targets)
public RoiAnnotationLink linkAnnotation(Annotation addition)
linkAnnotation
in interface IAnnotated
public void addRoiAnnotationLink(RoiAnnotationLink link, boolean bothSides)
public java.util.Iterator<Annotation> linkedAnnotationIterator()
ConcurrentModificationException
.
Use linkedAnnotationList()
instead.linkedAnnotationIterator
in interface IAnnotated
public java.util.Set<RoiAnnotationLink> findRoiAnnotationLink(Annotation target)
public java.util.List<Annotation> linkedAnnotationList()
List
-copy of the underlying collection. Unlike,
linkedAnnotationIterator()
, while using the returned List
,
modifications can be made to the underlying collection without throwing
ConcurrentModificationException
.linkedAnnotationList
in interface IAnnotated
public <E> java.util.List<E> eachLinkedAnnotation(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.eachLinkedAnnotation
in interface IAnnotated
public void unlinkAnnotation(Annotation removal)
unlinkAnnotation
in interface IAnnotated
public void removeRoiAnnotationLink(RoiAnnotationLink link, boolean bothSides)
public void clearAnnotationLinks()
clearAnnotationLinks
in interface IAnnotated
protected void setAnnotationLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map)
public java.util.Map<java.lang.Long,java.lang.Long> getAnnotationLinksCountPerOwner()
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public Details getDetails()
Details
type.getDetails
in interface IObject
protected void setDetails(Details details)
Details.copy(ome.model.internal.Details)
or Details.shallowCopy(ome.model.internal.Details)
methods to set the Roi.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.public Roi newInstance()
public Roi proxy()
public boolean acceptFilter(Filter __filter)
acceptFilter
in interface Filterable
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Set<java.lang.String> fields()
IObject
public java.lang.Object retrieve(java.lang.String field)
IObject
field
which match a field of this instance will be delegated to the accessors.
Otherwise, values will be retrieved from a lazy-loaded map filled by
calls to IObject.putAt(String, Object)
public void putAt(java.lang.String field, java.lang.Object value)
IObject
field
which
match a field of this instance will be delegated to the accessors.
Otherwise, values will be stored in a lazy-loaded map.public boolean isLoaded()
IObject
protected void errorIfUnloaded()
public void unload()
IObject
public final GraphHolder getGraphHolder()
IObject
GraphHolder
for this entity. If the GraphHolder has
not been actively set, a new one will be instatiated.getGraphHolder
in interface IObject
protected void throwNullCollectionException(java.lang.String propertyName)
Version: 5.4.10-ice35-b105
Copyright © 2019 The University of Dundee & Open Microscopy Environment. All Rights Reserved.