@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Instrument extends Object implements Serializable, IObject, IMutable, IAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
Instrument.Details |
Modifier | Constructor and Description |
---|---|
|
Instrument() |
protected |
Instrument(Long id) |
|
Instrument(Long id,
boolean loaded)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addDetector(Detector target)
use instead of setDetector .
|
void |
addDetectorSet(Collection<Detector> targets)
use like addDetector.
|
void |
addDichroic(Dichroic target)
use instead of setDichroic .
|
void |
addDichroicSet(Collection<Dichroic> targets)
use like addDichroic.
|
void |
addFilter(Filter target)
use instead of setFilter .
|
void |
addFilterSet(Collection<Filter> targets)
use like addFilter.
|
void |
addFilterSet(FilterSet target)
use instead of setFilterSet .
|
void |
addFilterSetSet(Collection<FilterSet> targets)
use like addFilterSet.
|
void |
addInstrumentAnnotationLink(InstrumentAnnotationLink target)
use instead of setAnnotationLinks .
|
void |
addInstrumentAnnotationLink(InstrumentAnnotationLink link,
boolean bothSides)
Adds a ome.model.annotations.InstrumentAnnotationLink to annotationLinks, allowing for recursion -- whether
or not addInstrumentAnnotationLink will be called on the addition if it is loaded
|
void |
addInstrumentAnnotationLinkSet(Collection<InstrumentAnnotationLink> targets)
use like addInstrumentAnnotationLink.
|
void |
addLightSource(LightSource target)
use instead of setLightSource .
|
void |
addLightSourceSet(Collection<LightSource> targets)
use like addLightSource.
|
void |
addObjective(Objective target)
use instead of setObjective .
|
void |
addObjectiveSet(Collection<Objective> targets)
use like addObjective.
|
void |
addOTF(OTF target)
use instead of setOtf .
|
void |
addOTFSet(Collection<OTF> targets)
use like addOTF.
|
void |
clearAnnotationLinks()
clears the set.
|
void |
clearDetector()
clears the set.
|
void |
clearDichroic()
clears the set.
|
void |
clearFilter()
clears the set.
|
void |
clearFilterSet()
clears the set.
|
void |
clearLightSource()
clears the set.
|
void |
clearObjective()
clears the set.
|
void |
clearOtf()
clears the set.
|
<E> List<E> |
collectAnnotationLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.InstrumentAnnotationLink while
collecting the results.
|
<E> List<E> |
collectDetector(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.acquisition.Detector while
collecting the results.
|
<E> List<E> |
collectDichroic(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.acquisition.Dichroic while
collecting the results.
|
<E> List<E> |
collectFilter(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.acquisition.Filter while
collecting the results.
|
<E> List<E> |
collectFilterSet(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.acquisition.FilterSet while
collecting the results.
|
<E> List<E> |
collectLightSource(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.acquisition.LightSource while
collecting the results.
|
<E> List<E> |
collectObjective(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.acquisition.Objective while
collecting the results.
|
<E> List<E> |
collectOtf(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.acquisition.OTF while
collecting the results.
|
<E> List<E> |
eachLinkedAnnotation(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.Annotation while
collecting the results.
|
protected void |
errorIfUnloaded() |
Set<String> |
fields()
returns a Set of field names that belong to this class
|
Set<InstrumentAnnotationLink> |
findInstrumentAnnotationLink(Annotation target)
find all ome.model.annotations.InstrumentAnnotationLink which have the argument as their child.
|
protected Set<InstrumentAnnotationLink> |
getAnnotationLinks()
returns annotationLinks .
|
Map<Long,Long> |
getAnnotationLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.annotations.InstrumentAnnotationLink that a user has.
|
Details |
getDetails()
The details of this object correspond to low-level system
information.
|
protected Set<Detector> |
getDetector()
returns detector .
|
protected Set<Dichroic> |
getDichroic()
returns dichroic .
|
protected Set<Filter> |
getFilter()
returns filter .
|
protected Set<FilterSet> |
getFilterSet()
returns filterSet .
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
Long |
getId()
The DB unique identifier for this object.
|
protected Set<LightSource> |
getLightSource()
returns lightSource .
|
Microscope |
getMicroscope()
Many-to-one field ome.model.acquisition.Instrument.microscope (ome.model.acquisition.Microscope)
|
protected Set<Objective> |
getObjective()
returns objective .
|
protected Set<OTF> |
getOtf()
returns otf .
|
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() |
Iterator<InstrumentAnnotationLink> |
iterateAnnotationLinks()
should be used rather than accessing the annotationLinks set directly.
|
Iterator<Detector> |
iterateDetector()
should be used rather than accessing the detector set directly.
|
Iterator<Dichroic> |
iterateDichroic()
should be used rather than accessing the dichroic set directly.
|
Iterator<Filter> |
iterateFilter()
should be used rather than accessing the filter set directly.
|
Iterator<FilterSet> |
iterateFilterSet()
should be used rather than accessing the filterSet set directly.
|
Iterator<LightSource> |
iterateLightSource()
should be used rather than accessing the lightSource set directly.
|
Iterator<Objective> |
iterateObjective()
should be used rather than accessing the objective set directly.
|
Iterator<OTF> |
iterateOtf()
should be used rather than accessing the otf set directly.
|
InstrumentAnnotationLink |
linkAnnotation(Annotation addition)
Adds a ome.model.annotations.InstrumentAnnotationLink to annotationLinks .
|
Iterator<Annotation> |
linkedAnnotationIterator()
provides an iterator over the parent values of the annotationLinks.
|
List<Annotation> |
linkedAnnotationList()
produces a
List -copy of the underlying collection. |
Instrument |
newInstance() |
Instrument |
proxy() |
void |
putAt(String field,
Object value)
stores a value in this instance.
|
void |
removeDetector(Detector target)
removes a single element from this set and makes the inverse call on ome.model.acquisition.Detector
|
void |
removeDetectorSet(Collection<Detector> targets)
use like removeDetector
|
void |
removeDichroic(Dichroic target)
removes a single element from this set and makes the inverse call on ome.model.acquisition.Dichroic
|
void |
removeDichroicSet(Collection<Dichroic> targets)
use like removeDichroic
|
void |
removeFilter(Filter target)
removes a single element from this set and makes the inverse call on ome.model.acquisition.Filter
|
void |
removeFilterSet(Collection<Filter> targets)
use like removeFilter
|
void |
removeFilterSet(FilterSet target)
removes a single element from this set and makes the inverse call on ome.model.acquisition.FilterSet
|
void |
removeFilterSetSet(Collection<FilterSet> targets)
use like removeFilterSet
|
void |
removeInstrumentAnnotationLink(InstrumentAnnotationLink target)
removes a single element from this set and makes the inverse call on ome.model.annotations.InstrumentAnnotationLink
|
void |
removeInstrumentAnnotationLink(InstrumentAnnotationLink link,
boolean bothSides)
removes the given InstrumentAnnotationLink from annotationLinks, allowing for recursion -- whether
or not the removal will call unlinkInstrument again if loaded.
|
void |
removeInstrumentAnnotationLinkSet(Collection<InstrumentAnnotationLink> targets)
use like removeInstrumentAnnotationLink
|
void |
removeLightSource(LightSource target)
removes a single element from this set and makes the inverse call on ome.model.acquisition.LightSource
|
void |
removeLightSourceSet(Collection<LightSource> targets)
use like removeLightSource
|
void |
removeObjective(Objective target)
removes a single element from this set and makes the inverse call on ome.model.acquisition.Objective
|
void |
removeObjectiveSet(Collection<Objective> targets)
use like removeObjective
|
void |
removeOTF(OTF target)
removes a single element from this set and makes the inverse call on ome.model.acquisition.OTF
|
void |
removeOTFSet(Collection<OTF> targets)
use like removeOTF
|
Object |
retrieve(String field)
retrieves a value from this instance.
|
protected void |
setAnnotationLinks(Set<InstrumentAnnotationLink> annotationLinks)
setter for annotationLinks should be avoided.
|
protected void |
setAnnotationLinksCountPerOwner(Map<Long,Long> map) |
protected void |
setDetails(Details details)
Use the
Details.copy(ome.model.internal.Details)
or Details.shallowCopy(ome.model.internal.Details)
methods to set the Instrument.Details instance instead. |
protected void |
setDetector(Set<Detector> detector)
setter for detector should be avoided.
|
protected void |
setDichroic(Set<Dichroic> dichroic)
setter for dichroic should be avoided.
|
protected void |
setFilter(Set<Filter> filter)
setter for filter should be avoided.
|
protected void |
setFilterSet(Set<FilterSet> filterSet)
setter for filterSet should be avoided.
|
void |
setId(Long id)
usually unneeded.
|
protected void |
setLightSource(Set<LightSource> lightSource)
setter for lightSource should be avoided.
|
void |
setMicroscope(Microscope microscope) |
protected void |
setObjective(Set<Objective> objective)
setter for objective should be avoided.
|
protected void |
setOtf(Set<OTF> otf)
setter for otf should be avoided.
|
void |
setVersion(Integer version)
use with caution.
|
int |
sizeOfAnnotationLinks()
returns the size of annotationLinks.
|
int |
sizeOfDetector()
returns the size of detector.
|
int |
sizeOfDichroic()
returns the size of dichroic.
|
int |
sizeOfFilter()
returns the size of filter.
|
int |
sizeOfFilterSet()
returns the size of filterSet.
|
int |
sizeOfLightSource()
returns the size of lightSource.
|
int |
sizeOfObjective()
returns the size of objective.
|
int |
sizeOfOtf()
returns the size of otf.
|
protected void |
throwNullCollectionException(String propertyName) |
String |
toString() |
void |
unlinkAnnotation(Annotation removal)
unlinks all ome.model.annotations.Annotation instances from this instance.
|
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
Collection<InstrumentAnnotationLink> |
unmodifiableAnnotationLinks()
Returns an unmodifiable collection-view
|
Collection<Detector> |
unmodifiableDetector()
Returns an unmodifiable collection-view
|
Collection<Dichroic> |
unmodifiableDichroic()
Returns an unmodifiable collection-view
|
Collection<Filter> |
unmodifiableFilter()
Returns an unmodifiable collection-view
|
Collection<FilterSet> |
unmodifiableFilterSet()
Returns an unmodifiable collection-view
|
Collection<LightSource> |
unmodifiableLightSource()
Returns an unmodifiable collection-view
|
Collection<Objective> |
unmodifiableObjective()
Returns an unmodifiable collection-view
|
Collection<OTF> |
unmodifiableOtf()
Returns an unmodifiable collection-view
|
Validation |
validate()
calls the class-specific validator for this instance and returns the
Validation object. |
public static final String OWNER_FILTER
public static final String GROUP_FILTER
public static final String EVENT_FILTER
public static final String PERMS_FILTER
public static final String ID
protected Long id
public static final String VERSION
protected Integer version
protected Microscope microscope
public static final String OWNER_FILTER_DETECTOR
public static final String GROUP_FILTER_DETECTOR
public static final String EVENT_FILTER_DETECTOR
public static final String PERMS_FILTER_DETECTOR
public static final String OWNER_FILTER_OBJECTIVE
public static final String GROUP_FILTER_OBJECTIVE
public static final String EVENT_FILTER_OBJECTIVE
public static final String PERMS_FILTER_OBJECTIVE
protected Set<LightSource> lightSource
public static final String OWNER_FILTER_LIGHTSOURCE
public static final String GROUP_FILTER_LIGHTSOURCE
public static final String EVENT_FILTER_LIGHTSOURCE
public static final String PERMS_FILTER_LIGHTSOURCE
public static final String OWNER_FILTER_FILTER
public static final String GROUP_FILTER_FILTER
public static final String EVENT_FILTER_FILTER
public static final String PERMS_FILTER_FILTER
public static final String OWNER_FILTER_DICHROIC
public static final String GROUP_FILTER_DICHROIC
public static final String EVENT_FILTER_DICHROIC
public static final String PERMS_FILTER_DICHROIC
public static final String OWNER_FILTER_FILTERSET
public static final String GROUP_FILTER_FILTERSET
public static final String EVENT_FILTER_FILTERSET
public static final String PERMS_FILTER_FILTERSET
public static final String OWNER_FILTER_OTF
public static final String GROUP_FILTER_OTF
public static final String EVENT_FILTER_OTF
public static final String PERMS_FILTER_OTF
protected Set<InstrumentAnnotationLink> annotationLinks
public static final String OWNER_FILTER_ANNOTATIONLINKS
public static final String GROUP_FILTER_ANNOTATIONLINKS
public static final String EVENT_FILTER_ANNOTATIONLINKS
public static final String PERMS_FILTER_ANNOTATIONLINKS
protected Details details
public static final String MICROSCOPE
public static final String DETECTOR
public static final String OBJECTIVE
public static final String LIGHTSOURCE
public static final String FILTER
public static final String DICHROIC
public static final String FILTERSET
public static final String OTF
public static final String ANNOTATIONLINKSCOUNTPEROWNER
public static final String ANNOTATIONLINKS
public static final String DETAILS
protected boolean _loaded
public Instrument()
protected Instrument(Long id)
public Instrument(Long id, boolean loaded)
@DocumentId public Long getId()
public void setId(Long id)
IObject
public Integer getVersion()
getVersion
in interface IMutable
public void setVersion(Integer version)
IMutable
setVersion
in interface IMutable
version
- Value for this objects version.public Microscope getMicroscope()
public void setMicroscope(Microscope microscope)
protected Set<Detector> getDetector()
protected void setDetector(Set<Detector> detector)
public int sizeOfDetector()
public Iterator<Detector> iterateDetector()
EmptyIterator
. To test for a null collection,
see of sizeOfDetector()
is less than zero.public Collection<Detector> unmodifiableDetector()
public <E> List<E> collectDetector(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateDetector()
internally and so will return a value
even if the underlying collection is null.public void addDetector(Detector target)
public void addDetectorSet(Collection<Detector> targets)
public void removeDetector(Detector target)
public void removeDetectorSet(Collection<Detector> targets)
public void clearDetector()
protected Set<Objective> getObjective()
protected void setObjective(Set<Objective> objective)
public int sizeOfObjective()
public Iterator<Objective> iterateObjective()
EmptyIterator
. To test for a null collection,
see of sizeOfObjective()
is less than zero.public Collection<Objective> unmodifiableObjective()
public <E> List<E> collectObjective(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateObjective()
internally and so will return a value
even if the underlying collection is null.public void addObjective(Objective target)
public void addObjectiveSet(Collection<Objective> targets)
public void removeObjective(Objective target)
public void removeObjectiveSet(Collection<Objective> targets)
public void clearObjective()
protected Set<LightSource> getLightSource()
protected void setLightSource(Set<LightSource> lightSource)
public int sizeOfLightSource()
public Iterator<LightSource> iterateLightSource()
EmptyIterator
. To test for a null collection,
see of sizeOfLightSource()
is less than zero.public Collection<LightSource> unmodifiableLightSource()
public <E> List<E> collectLightSource(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateLightSource()
internally and so will return a value
even if the underlying collection is null.public void addLightSource(LightSource target)
public void addLightSourceSet(Collection<LightSource> targets)
public void removeLightSource(LightSource target)
public void removeLightSourceSet(Collection<LightSource> targets)
public void clearLightSource()
protected Set<Filter> getFilter()
protected void setFilter(Set<Filter> filter)
public int sizeOfFilter()
public Iterator<Filter> iterateFilter()
EmptyIterator
. To test for a null collection,
see of sizeOfFilter()
is less than zero.public Collection<Filter> unmodifiableFilter()
public <E> List<E> collectFilter(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateFilter()
internally and so will return a value
even if the underlying collection is null.public void addFilter(Filter target)
public void addFilterSet(Collection<Filter> targets)
public void removeFilter(Filter target)
public void removeFilterSet(Collection<Filter> targets)
public void clearFilter()
protected Set<Dichroic> getDichroic()
protected void setDichroic(Set<Dichroic> dichroic)
public int sizeOfDichroic()
public Iterator<Dichroic> iterateDichroic()
EmptyIterator
. To test for a null collection,
see of sizeOfDichroic()
is less than zero.public Collection<Dichroic> unmodifiableDichroic()
public <E> List<E> collectDichroic(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateDichroic()
internally and so will return a value
even if the underlying collection is null.public void addDichroic(Dichroic target)
public void addDichroicSet(Collection<Dichroic> targets)
public void removeDichroic(Dichroic target)
public void removeDichroicSet(Collection<Dichroic> targets)
public void clearDichroic()
protected Set<FilterSet> getFilterSet()
protected void setFilterSet(Set<FilterSet> filterSet)
public int sizeOfFilterSet()
public Iterator<FilterSet> iterateFilterSet()
EmptyIterator
. To test for a null collection,
see of sizeOfFilterSet()
is less than zero.public Collection<FilterSet> unmodifiableFilterSet()
public <E> List<E> collectFilterSet(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateFilterSet()
internally and so will return a value
even if the underlying collection is null.public void addFilterSet(FilterSet target)
public void addFilterSetSet(Collection<FilterSet> targets)
public void removeFilterSet(FilterSet target)
public void removeFilterSetSet(Collection<FilterSet> targets)
public void clearFilterSet()
protected Set<OTF> getOtf()
protected void setOtf(Set<OTF> otf)
public int sizeOfOtf()
public Iterator<OTF> iterateOtf()
EmptyIterator
. To test for a null collection,
see of sizeOfOtf()
is less than zero.public Collection<OTF> unmodifiableOtf()
public <E> List<E> collectOtf(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateOtf()
internally and so will return a value
even if the underlying collection is null.public void addOTF(OTF target)
public void addOTFSet(Collection<OTF> targets)
public void removeOTF(OTF target)
public void removeOTFSet(Collection<OTF> targets)
public void clearOtf()
protected Set<InstrumentAnnotationLink> getAnnotationLinks()
protected void setAnnotationLinks(Set<InstrumentAnnotationLink> annotationLinks)
public int sizeOfAnnotationLinks()
sizeOfAnnotationLinks
in interface IAnnotated
public Iterator<InstrumentAnnotationLink> iterateAnnotationLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfAnnotationLinks()
is less than zero.iterateAnnotationLinks
in interface IAnnotated
public Collection<InstrumentAnnotationLink> unmodifiableAnnotationLinks()
unmodifiableAnnotationLinks
in interface IAnnotated
public <E> 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 addInstrumentAnnotationLink(InstrumentAnnotationLink target)
public void addInstrumentAnnotationLinkSet(Collection<InstrumentAnnotationLink> targets)
public void removeInstrumentAnnotationLink(InstrumentAnnotationLink target)
public void removeInstrumentAnnotationLinkSet(Collection<InstrumentAnnotationLink> targets)
public InstrumentAnnotationLink linkAnnotation(Annotation addition)
linkAnnotation
in interface IAnnotated
public void addInstrumentAnnotationLink(InstrumentAnnotationLink link, boolean bothSides)
public Iterator<Annotation> linkedAnnotationIterator()
ConcurrentModificationException
.
Use linkedAnnotationList()
instead.linkedAnnotationIterator
in interface IAnnotated
public Set<InstrumentAnnotationLink> findInstrumentAnnotationLink(Annotation target)
public 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> 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 removeInstrumentAnnotationLink(InstrumentAnnotationLink link, boolean bothSides)
public void clearAnnotationLinks()
clearAnnotationLinks
in interface IAnnotated
public Map<Long,Long> getAnnotationLinksCountPerOwner()
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 Instrument.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.public Instrument newInstance()
public Instrument proxy()
public boolean acceptFilter(Filter __filter)
acceptFilter
in interface Filterable
public Set<String> fields()
IObject
public Object retrieve(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(String field, 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(String propertyName)
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.