@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Dataset extends java.lang.Object implements java.io.Serializable, IObject, IMutable, IAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
Dataset.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<DatasetAnnotationLink> |
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_IMAGELINKS |
static java.lang.String |
EVENT_FILTER_PROJECTLINKS |
static java.util.Set<java.lang.String> |
FIELDS |
static java.lang.String |
GROUP_FILTER |
static java.lang.String |
GROUP_FILTER_ANNOTATIONLINKS |
static java.lang.String |
GROUP_FILTER_IMAGELINKS |
static java.lang.String |
GROUP_FILTER_PROJECTLINKS |
protected java.lang.Long |
id |
static java.lang.String |
ID |
protected java.util.Set<DatasetImageLink> |
imageLinks |
static java.lang.String |
IMAGELINKS |
static java.lang.String |
IMAGELINKSCOUNTPEROWNER |
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_IMAGELINKS |
static java.lang.String |
OWNER_FILTER_PROJECTLINKS |
static java.lang.String |
PERMS_FILTER |
static java.lang.String |
PERMS_FILTER_ANNOTATIONLINKS |
static java.lang.String |
PERMS_FILTER_IMAGELINKS |
static java.lang.String |
PERMS_FILTER_PROJECTLINKS |
protected java.util.Set<ProjectDatasetLink> |
projectLinks |
static java.lang.String |
PROJECTLINKS |
static java.lang.String |
PROJECTLINKSCOUNTPEROWNER |
protected java.lang.Integer |
version |
static java.lang.String |
VERSION |
Modifier | Constructor and Description |
---|---|
|
Dataset() |
protected |
Dataset(java.lang.Long id) |
|
Dataset(java.lang.Long id,
boolean loaded)
Main constructor.
|
|
Dataset(java.lang.String _name) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addDatasetAnnotationLink(DatasetAnnotationLink target)
use instead of setAnnotationLinks .
|
void |
addDatasetAnnotationLink(DatasetAnnotationLink link,
boolean bothSides)
Adds a ome.model.annotations.DatasetAnnotationLink to annotationLinks, allowing for recursion -- whether
or not addDatasetAnnotationLink will be called on the addition if it is loaded
|
void |
addDatasetAnnotationLinkSet(java.util.Collection<DatasetAnnotationLink> targets)
use like addDatasetAnnotationLink.
|
void |
addDatasetImageLink(DatasetImageLink target)
use instead of setImageLinks .
|
void |
addDatasetImageLink(DatasetImageLink link,
boolean bothSides)
Adds a ome.model.containers.DatasetImageLink to imageLinks, allowing for recursion -- whether
or not addDatasetImageLink will be called on the addition if it is loaded
|
void |
addDatasetImageLinkSet(java.util.Collection<DatasetImageLink> targets)
use like addDatasetImageLink.
|
void |
addProjectDatasetLink(ProjectDatasetLink target)
use instead of setProjectLinks .
|
void |
addProjectDatasetLink(ProjectDatasetLink link,
boolean bothSides)
Adds a ome.model.containers.ProjectDatasetLink to projectLinks, allowing for recursion -- whether
or not addProjectDatasetLink will be called on the addition if it is loaded
|
void |
addProjectDatasetLinkSet(java.util.Collection<ProjectDatasetLink> targets)
use like addProjectDatasetLink.
|
void |
clearAnnotationLinks()
clears the set.
|
void |
clearImageLinks()
clears the set.
|
void |
clearProjectLinks()
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.DatasetAnnotationLink while
collecting the results.
|
<E> java.util.List<E> |
collectImageLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.containers.DatasetImageLink while
collecting the results.
|
<E> java.util.List<E> |
collectProjectLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.containers.ProjectDatasetLink 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> |
eachLinkedImage(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.core.Image while
collecting the results.
|
<E> java.util.List<E> |
eachLinkedProject(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.containers.Project 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<DatasetAnnotationLink> |
findDatasetAnnotationLink(Annotation target)
find all ome.model.annotations.DatasetAnnotationLink which have the argument as their child.
|
java.util.Set<DatasetImageLink> |
findDatasetImageLink(Image target)
find all ome.model.containers.DatasetImageLink which have the argument as their child.
|
java.util.Set<ProjectDatasetLink> |
findProjectDatasetLink(Project target)
find all ome.model.containers.ProjectDatasetLink which have the argument as their parent.
|
protected java.util.Set<DatasetAnnotationLink> |
getAnnotationLinks()
returns annotationLinks .
|
java.util.Map<java.lang.Long,java.lang.Long> |
getAnnotationLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.annotations.DatasetAnnotationLink that a user has.
|
java.lang.String |
getDescription()
Simple field ome.model.containers.Dataset.description (java.lang.String)
|
Details |
getDetails()
The details of this object correspond to low-level system
information.
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
java.lang.Long |
getId()
The DB unique identifier for this object.
|
protected java.util.Set<DatasetImageLink> |
getImageLinks()
returns imageLinks .
|
java.util.Map<java.lang.Long,java.lang.Long> |
getImageLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.containers.DatasetImageLink that a user has.
|
java.lang.String |
getName()
Simple field ome.model.containers.Dataset.name (java.lang.String)
|
protected java.util.Set<ProjectDatasetLink> |
getProjectLinks()
returns projectLinks .
|
java.util.Map<java.lang.Long,java.lang.Long> |
getProjectLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.containers.ProjectDatasetLink that a user has.
|
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<DatasetAnnotationLink> |
iterateAnnotationLinks()
should be used rather than accessing the annotationLinks set directly.
|
java.util.Iterator<DatasetImageLink> |
iterateImageLinks()
should be used rather than accessing the imageLinks set directly.
|
java.util.Iterator<ProjectDatasetLink> |
iterateProjectLinks()
should be used rather than accessing the projectLinks set directly.
|
DatasetAnnotationLink |
linkAnnotation(Annotation addition)
Adds a ome.model.annotations.DatasetAnnotationLink 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<Image> |
linkedImageIterator()
provides an iterator over the parent values of the imageLinks.
|
java.util.List<Image> |
linkedImageList()
produces a
List -copy of the underlying collection. |
java.util.Iterator<Project> |
linkedProjectIterator()
provides an iterator over the child values of the projectLinks.
|
java.util.List<Project> |
linkedProjectList()
produces a
List -copy of the underlying collection. |
DatasetImageLink |
linkImage(Image addition)
Adds a ome.model.containers.DatasetImageLink to imageLinks .
|
ProjectDatasetLink |
linkProject(Project addition)
Adds a ome.model.containers.ProjectDatasetLink to projectLinks .
|
Dataset |
newInstance() |
Dataset |
proxy() |
void |
putAt(java.lang.String field,
java.lang.Object value)
stores a value in this instance.
|
void |
removeDatasetAnnotationLink(DatasetAnnotationLink target)
removes a single element from this set and makes the inverse call on ome.model.annotations.DatasetAnnotationLink
|
void |
removeDatasetAnnotationLink(DatasetAnnotationLink link,
boolean bothSides)
removes the given DatasetAnnotationLink from annotationLinks, allowing for recursion -- whether
or not the removal will call unlinkDataset again if loaded.
|
void |
removeDatasetAnnotationLinkSet(java.util.Collection<DatasetAnnotationLink> targets)
use like removeDatasetAnnotationLink
|
void |
removeDatasetImageLink(DatasetImageLink target)
removes a single element from this set and makes the inverse call on ome.model.containers.DatasetImageLink
|
void |
removeDatasetImageLink(DatasetImageLink link,
boolean bothSides)
removes the given DatasetImageLink from imageLinks, allowing for recursion -- whether
or not the removal will call unlinkDataset again if loaded.
|
void |
removeDatasetImageLinkSet(java.util.Collection<DatasetImageLink> targets)
use like removeDatasetImageLink
|
void |
removeProjectDatasetLink(ProjectDatasetLink target)
removes a single element from this set and makes the inverse call on ome.model.containers.ProjectDatasetLink
|
void |
removeProjectDatasetLink(ProjectDatasetLink link,
boolean bothSides)
removes the given ProjectDatasetLink from projectLinks, allowing for recursion -- whether
or not the removal will call unlinkDataset again if loaded.
|
void |
removeProjectDatasetLinkSet(java.util.Collection<ProjectDatasetLink> targets)
use like removeProjectDatasetLink
|
java.lang.Object |
retrieve(java.lang.String field)
retrieves a value from this instance.
|
protected void |
setAnnotationLinks(java.util.Set<DatasetAnnotationLink> 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 Dataset.Details instance instead. |
void |
setId(java.lang.Long id)
usually unneeded.
|
protected void |
setImageLinks(java.util.Set<DatasetImageLink> imageLinks)
setter for imageLinks should be avoided.
|
protected void |
setImageLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map) |
void |
setName(java.lang.String name) |
protected void |
setProjectLinks(java.util.Set<ProjectDatasetLink> projectLinks)
setter for projectLinks should be avoided.
|
protected void |
setProjectLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map) |
void |
setVersion(java.lang.Integer version)
use with caution.
|
int |
sizeOfAnnotationLinks()
returns the size of annotationLinks.
|
int |
sizeOfImageLinks()
returns the size of imageLinks.
|
int |
sizeOfProjectLinks()
returns the size of projectLinks.
|
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 |
unlinkImage(Image removal)
unlinks all ome.model.core.Image instances from this instance.
|
void |
unlinkProject(Project removal)
unlinks all ome.model.containers.Project instances from this instance.
|
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
java.util.Collection<DatasetAnnotationLink> |
unmodifiableAnnotationLinks()
Returns an unmodifiable collection-view
|
java.util.Collection<DatasetImageLink> |
unmodifiableImageLinks()
Returns an unmodifiable collection-view
|
java.util.Collection<ProjectDatasetLink> |
unmodifiableProjectLinks()
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.util.Set<ProjectDatasetLink> projectLinks
public static final java.lang.String OWNER_FILTER_PROJECTLINKS
public static final java.lang.String GROUP_FILTER_PROJECTLINKS
public static final java.lang.String EVENT_FILTER_PROJECTLINKS
public static final java.lang.String PERMS_FILTER_PROJECTLINKS
protected java.util.Set<DatasetImageLink> imageLinks
public static final java.lang.String OWNER_FILTER_IMAGELINKS
public static final java.lang.String GROUP_FILTER_IMAGELINKS
public static final java.lang.String EVENT_FILTER_IMAGELINKS
public static final java.lang.String PERMS_FILTER_IMAGELINKS
protected java.util.Set<DatasetAnnotationLink> 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 name
protected java.lang.String description
protected Details details
public static final java.lang.String PROJECTLINKSCOUNTPEROWNER
public static final java.lang.String PROJECTLINKS
public static final java.lang.String IMAGELINKSCOUNTPEROWNER
public static final java.lang.String IMAGELINKS
public static final java.lang.String ANNOTATIONLINKSCOUNTPEROWNER
public static final java.lang.String ANNOTATIONLINKS
public static final java.lang.String NAME
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 Dataset()
protected Dataset(java.lang.Long id)
public Dataset(java.lang.Long id, boolean loaded)
public Dataset(java.lang.String _name)
@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.protected java.util.Set<ProjectDatasetLink> getProjectLinks()
protected void setProjectLinks(java.util.Set<ProjectDatasetLink> projectLinks)
public int sizeOfProjectLinks()
public java.util.Iterator<ProjectDatasetLink> iterateProjectLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfProjectLinks()
is less than zero.public java.util.Collection<ProjectDatasetLink> unmodifiableProjectLinks()
public <E> java.util.List<E> collectProjectLinks(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateProjectLinks()
internally and so will return a value
even if the underlying collection is null.public void addProjectDatasetLink(ProjectDatasetLink target)
public void addProjectDatasetLinkSet(java.util.Collection<ProjectDatasetLink> targets)
public void removeProjectDatasetLink(ProjectDatasetLink target)
public void removeProjectDatasetLinkSet(java.util.Collection<ProjectDatasetLink> targets)
public ProjectDatasetLink linkProject(Project addition)
public void addProjectDatasetLink(ProjectDatasetLink link, boolean bothSides)
public java.util.Iterator<Project> linkedProjectIterator()
ConcurrentModificationException
.
Use linkedProjectList()
instead.public java.util.Set<ProjectDatasetLink> findProjectDatasetLink(Project target)
public java.util.List<Project> linkedProjectList()
List
-copy of the underlying collection. Unlike,
linkedProjectIterator()
, while using the returned List
,
modifications can be made to the underlying collection without throwing
ConcurrentModificationException
.public <E> java.util.List<E> eachLinkedProject(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.public void unlinkProject(Project removal)
public void removeProjectDatasetLink(ProjectDatasetLink link, boolean bothSides)
public void clearProjectLinks()
protected void setProjectLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map)
public java.util.Map<java.lang.Long,java.lang.Long> getProjectLinksCountPerOwner()
protected java.util.Set<DatasetImageLink> getImageLinks()
protected void setImageLinks(java.util.Set<DatasetImageLink> imageLinks)
public int sizeOfImageLinks()
public java.util.Iterator<DatasetImageLink> iterateImageLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfImageLinks()
is less than zero.public java.util.Collection<DatasetImageLink> unmodifiableImageLinks()
public <E> java.util.List<E> collectImageLinks(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateImageLinks()
internally and so will return a value
even if the underlying collection is null.public void addDatasetImageLink(DatasetImageLink target)
public void addDatasetImageLinkSet(java.util.Collection<DatasetImageLink> targets)
public void removeDatasetImageLink(DatasetImageLink target)
public void removeDatasetImageLinkSet(java.util.Collection<DatasetImageLink> targets)
public DatasetImageLink linkImage(Image addition)
public void addDatasetImageLink(DatasetImageLink link, boolean bothSides)
public java.util.Iterator<Image> linkedImageIterator()
ConcurrentModificationException
.
Use linkedImageList()
instead.public java.util.Set<DatasetImageLink> findDatasetImageLink(Image target)
public java.util.List<Image> linkedImageList()
List
-copy of the underlying collection. Unlike,
linkedImageIterator()
, while using the returned List
,
modifications can be made to the underlying collection without throwing
ConcurrentModificationException
.public <E> java.util.List<E> eachLinkedImage(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.public void unlinkImage(Image removal)
public void removeDatasetImageLink(DatasetImageLink link, boolean bothSides)
public void clearImageLinks()
protected void setImageLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map)
public java.util.Map<java.lang.Long,java.lang.Long> getImageLinksCountPerOwner()
protected java.util.Set<DatasetAnnotationLink> getAnnotationLinks()
protected void setAnnotationLinks(java.util.Set<DatasetAnnotationLink> annotationLinks)
public int sizeOfAnnotationLinks()
sizeOfAnnotationLinks
in interface IAnnotated
public java.util.Iterator<DatasetAnnotationLink> iterateAnnotationLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfAnnotationLinks()
is less than zero.iterateAnnotationLinks
in interface IAnnotated
public java.util.Collection<DatasetAnnotationLink> 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 addDatasetAnnotationLink(DatasetAnnotationLink target)
public void addDatasetAnnotationLinkSet(java.util.Collection<DatasetAnnotationLink> targets)
public void removeDatasetAnnotationLink(DatasetAnnotationLink target)
public void removeDatasetAnnotationLinkSet(java.util.Collection<DatasetAnnotationLink> targets)
public DatasetAnnotationLink linkAnnotation(Annotation addition)
linkAnnotation
in interface IAnnotated
public void addDatasetAnnotationLink(DatasetAnnotationLink link, boolean bothSides)
public java.util.Iterator<Annotation> linkedAnnotationIterator()
ConcurrentModificationException
.
Use linkedAnnotationList()
instead.linkedAnnotationIterator
in interface IAnnotated
public java.util.Set<DatasetAnnotationLink> findDatasetAnnotationLink(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 removeDatasetAnnotationLink(DatasetAnnotationLink 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 getName()
public void setName(java.lang.String name)
@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 Dataset.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.public Dataset newInstance()
public Dataset 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.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.