@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Fileset extends Object implements Serializable, IObject, IMutable, IAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
Fileset.Details |
Modifier | Constructor and Description |
---|---|
|
Fileset() |
protected |
Fileset(Long id) |
|
Fileset(Long id,
boolean loaded)
Main constructor.
|
|
Fileset(String _templatePrefix) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addFilesetAnnotationLink(FilesetAnnotationLink target)
use instead of setAnnotationLinks .
|
void |
addFilesetAnnotationLink(FilesetAnnotationLink link,
boolean bothSides)
Adds a ome.model.annotations.FilesetAnnotationLink to annotationLinks, allowing for recursion -- whether
or not addFilesetAnnotationLink will be called on the addition if it is loaded
|
void |
addFilesetAnnotationLinkSet(Collection<FilesetAnnotationLink> targets)
use like addFilesetAnnotationLink.
|
void |
addFilesetEntry(FilesetEntry target)
use instead of setUsedFiles .
|
void |
addFilesetEntrySet(Collection<FilesetEntry> targets)
use like addFilesetEntry.
|
void |
addFilesetJobLink(FilesetJobLink target)
use instead of setJobLinks .
|
void |
addFilesetJobLink(FilesetJobLink link,
boolean bothSides)
Adds a ome.model.fs.FilesetJobLink to jobLinks, allowing for recursion -- whether
or not addFilesetJobLink will be called on the addition if it is loaded
|
void |
addFilesetJobLinkSet(Collection<FilesetJobLink> targets)
use like addFilesetJobLink.
|
void |
addImage(Image target)
use instead of setImages .
|
void |
addImageSet(Collection<Image> targets)
use like addImage.
|
void |
clearAnnotationLinks()
clears the set.
|
void |
clearImages()
clears the set.
|
void |
clearJobLinks()
clears the set.
|
void |
clearUsedFiles()
clears the set.
|
<E> List<E> |
collectAnnotationLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.FilesetAnnotationLink while
collecting the results.
|
<E> List<E> |
collectImages(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.core.Image while
collecting the results.
|
<E> List<E> |
collectJobLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.fs.FilesetJobLink while
collecting the results.
|
<E> List<E> |
collectUsedFiles(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.fs.FilesetEntry 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.
|
<E> List<E> |
eachLinkedJob(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.jobs.Job while
collecting the results.
|
protected void |
errorIfUnloaded() |
Set<String> |
fields()
returns a Set of field names that belong to this class
|
Set<FilesetAnnotationLink> |
findFilesetAnnotationLink(Annotation target)
find all ome.model.annotations.FilesetAnnotationLink which have the argument as their child.
|
Set<FilesetJobLink> |
findFilesetJobLink(Job target)
find all ome.model.fs.FilesetJobLink which have the argument as their child.
|
protected Set<FilesetAnnotationLink> |
getAnnotationLinks()
returns annotationLinks .
|
Map<Long,Long> |
getAnnotationLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.annotations.FilesetAnnotationLink that a user has.
|
Details |
getDetails()
The details of this object correspond to low-level system
information.
|
FilesetEntry |
getFilesetEntry(int index)
Gets the ome.model.fs.FilesetEntry at the given index.
|
FilesetJobLink |
getFilesetJobLink(int index)
Gets the ome.model.fs.FilesetJobLink at the given index.
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
Long |
getId()
The DB unique identifier for this object.
|
protected Set<Image> |
getImages()
returns images .
|
protected List<FilesetJobLink> |
getJobLinks()
returns jobLinks .
|
Map<Long,Long> |
getJobLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.fs.FilesetJobLink that a user has.
|
FilesetEntry |
getPrimaryFilesetEntry()
Gets the first element of usedFiles which can be interpreted as the
primary or default element in some situations.
|
FilesetJobLink |
getPrimaryFilesetJobLink()
Gets the first element of jobLinks which can be interpreted as the
primary or default element in some situations.
|
String |
getTemplatePrefix()
Simple field ome.model.fs.Fileset.templatePrefix (java.lang.String)
|
protected List<FilesetEntry> |
getUsedFiles()
returns usedFiles .
|
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<FilesetAnnotationLink> |
iterateAnnotationLinks()
should be used rather than accessing the annotationLinks set directly.
|
Iterator<Image> |
iterateImages()
should be used rather than accessing the images set directly.
|
Iterator<FilesetJobLink> |
iterateJobLinks()
should be used rather than accessing the jobLinks set directly.
|
Iterator<FilesetEntry> |
iterateUsedFiles()
should be used rather than accessing the usedFiles set directly.
|
FilesetAnnotationLink |
linkAnnotation(Annotation addition)
Adds a ome.model.annotations.FilesetAnnotationLink 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. |
Iterator<Job> |
linkedJobIterator()
provides an iterator over the parent values of the jobLinks.
|
List<Job> |
linkedJobList()
produces a
List -copy of the underlying collection. |
FilesetJobLink |
linkJob(Job addition)
Adds a ome.model.fs.FilesetJobLink to jobLinks .
|
Fileset |
newInstance() |
Fileset |
proxy() |
void |
putAt(String field,
Object value)
stores a value in this instance.
|
void |
removeFilesetAnnotationLink(FilesetAnnotationLink target)
removes a single element from this set and makes the inverse call on ome.model.annotations.FilesetAnnotationLink
|
void |
removeFilesetAnnotationLink(FilesetAnnotationLink link,
boolean bothSides)
removes the given FilesetAnnotationLink from annotationLinks, allowing for recursion -- whether
or not the removal will call unlinkFileset again if loaded.
|
void |
removeFilesetAnnotationLinkSet(Collection<FilesetAnnotationLink> targets)
use like removeFilesetAnnotationLink
|
void |
removeFilesetEntry(FilesetEntry target)
removes a single element from this set and makes the inverse call on ome.model.fs.FilesetEntry
|
void |
removeFilesetEntrySet(Collection<FilesetEntry> targets)
use like removeFilesetEntry
|
void |
removeFilesetJobLink(FilesetJobLink target)
removes a single element from this set and makes the inverse call on ome.model.fs.FilesetJobLink
|
void |
removeFilesetJobLink(FilesetJobLink link,
boolean bothSides)
removes the given FilesetJobLink from jobLinks, allowing for recursion -- whether
or not the removal will call unlinkFileset again if loaded.
|
void |
removeFilesetJobLinkSet(Collection<FilesetJobLink> targets)
use like removeFilesetJobLink
|
void |
removeImage(Image target)
removes a single element from this set and makes the inverse call on ome.model.core.Image
|
void |
removeImageSet(Collection<Image> targets)
use like removeImage
|
Object |
retrieve(String field)
retrieves a value from this instance.
|
protected void |
setAnnotationLinks(Set<FilesetAnnotationLink> 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 Fileset.Details instance instead. |
FilesetEntry |
setFilesetEntry(int index,
FilesetEntry element)
Sets the ome.model.fs.FilesetEntry at the given index.
|
FilesetJobLink |
setFilesetJobLink(int index,
FilesetJobLink element)
Sets the ome.model.fs.FilesetJobLink at the given index.
|
void |
setId(Long id)
usually unneeded.
|
protected void |
setImages(Set<Image> images)
setter for images should be avoided.
|
protected void |
setJobLinks(List<FilesetJobLink> jobLinks)
setter for jobLinks should be avoided.
|
protected void |
setJobLinksCountPerOwner(Map<Long,Long> map) |
FilesetEntry |
setPrimaryFilesetEntry(FilesetEntry element)
Swaps the first element of usedFiles with the first instance of the
given element.
|
FilesetJobLink |
setPrimaryFilesetJobLink(FilesetJobLink element)
Swaps the first element of jobLinks with the first instance of the
given element.
|
void |
setTemplatePrefix(String templatePrefix) |
protected void |
setUsedFiles(List<FilesetEntry> usedFiles)
setter for usedFiles should be avoided.
|
void |
setVersion(Integer version)
use with caution.
|
int |
sizeOfAnnotationLinks()
returns the size of annotationLinks.
|
int |
sizeOfImages()
returns the size of images.
|
int |
sizeOfJobLinks()
returns the size of jobLinks.
|
int |
sizeOfUsedFiles()
returns the size of usedFiles.
|
protected void |
throwNullCollectionException(String propertyName) |
String |
toString() |
void |
unlinkAnnotation(Annotation removal)
unlinks all ome.model.annotations.Annotation instances from this instance.
|
void |
unlinkJob(Job removal)
unlinks all ome.model.jobs.Job instances from this instance.
|
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
Collection<FilesetAnnotationLink> |
unmodifiableAnnotationLinks()
Returns an unmodifiable collection-view
|
Collection<Image> |
unmodifiableImages()
Returns an unmodifiable collection-view
|
Collection<FilesetJobLink> |
unmodifiableJobLinks()
Returns an unmodifiable collection-view
|
Collection<FilesetEntry> |
unmodifiableUsedFiles()
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 List<FilesetEntry> usedFiles
public static final String OWNER_FILTER_USEDFILES
public static final String GROUP_FILTER_USEDFILES
public static final String EVENT_FILTER_USEDFILES
public static final String PERMS_FILTER_USEDFILES
public static final String OWNER_FILTER_IMAGES
public static final String GROUP_FILTER_IMAGES
public static final String EVENT_FILTER_IMAGES
public static final String PERMS_FILTER_IMAGES
protected List<FilesetJobLink> jobLinks
public static final String OWNER_FILTER_JOBLINKS
public static final String GROUP_FILTER_JOBLINKS
public static final String EVENT_FILTER_JOBLINKS
public static final String PERMS_FILTER_JOBLINKS
protected String templatePrefix
protected Set<FilesetAnnotationLink> 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 USEDFILES
public static final String IMAGES
public static final String JOBLINKSCOUNTPEROWNER
public static final String JOBLINKS
public static final String TEMPLATEPREFIX
public static final String ANNOTATIONLINKSCOUNTPEROWNER
public static final String ANNOTATIONLINKS
public static final String DETAILS
protected boolean _loaded
public Fileset()
protected Fileset(Long id)
public Fileset(Long id, boolean loaded)
public Fileset(String _templatePrefix)
@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.protected List<FilesetEntry> getUsedFiles()
protected void setUsedFiles(List<FilesetEntry> usedFiles)
public int sizeOfUsedFiles()
public Iterator<FilesetEntry> iterateUsedFiles()
EmptyIterator
. To test for a null collection,
see of sizeOfUsedFiles()
is less than zero.public Collection<FilesetEntry> unmodifiableUsedFiles()
public <E> List<E> collectUsedFiles(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateUsedFiles()
internally and so will return a value
even if the underlying collection is null.public void addFilesetEntry(FilesetEntry target)
public void addFilesetEntrySet(Collection<FilesetEntry> targets)
public void removeFilesetEntry(FilesetEntry target)
public void removeFilesetEntrySet(Collection<FilesetEntry> targets)
public void clearUsedFiles()
public FilesetEntry getFilesetEntry(int index) throws IndexOutOfBoundsException
IndexOutOfBoundsException
public FilesetEntry setFilesetEntry(int index, FilesetEntry element) throws IndexOutOfBoundsException
List.set(int, Object)
contract. To extend the list, use addFilesetEntry(FilesetEntry)
.IndexOutOfBoundsException
List.set(int, Object)
public FilesetEntry getPrimaryFilesetEntry() throws IndexOutOfBoundsException
IndexOutOfBoundsException
is throws. This method
will also throw an ApiUsageException
if the collection is
unloaded. See sizeOfUsedFiles()
for more information.IndexOutOfBoundsException
public FilesetEntry setPrimaryFilesetEntry(FilesetEntry element) throws IndexOutOfBoundsException
IndexOutOfBoundsException
will be thrown. Returns the swapped
element. This method
will also throw an ApiUsageException
if the collection is
unloaded. See sizeOfUsedFiles()
for more information.IndexOutOfBoundsException
protected Set<Image> getImages()
protected void setImages(Set<Image> images)
public int sizeOfImages()
public Iterator<Image> iterateImages()
EmptyIterator
. To test for a null collection,
see of sizeOfImages()
is less than zero.public Collection<Image> unmodifiableImages()
public <E> List<E> collectImages(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateImages()
internally and so will return a value
even if the underlying collection is null.public void addImage(Image target)
public void addImageSet(Collection<Image> targets)
public void removeImage(Image target)
public void removeImageSet(Collection<Image> targets)
public void clearImages()
protected List<FilesetJobLink> getJobLinks()
protected void setJobLinks(List<FilesetJobLink> jobLinks)
public int sizeOfJobLinks()
public Iterator<FilesetJobLink> iterateJobLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfJobLinks()
is less than zero.public Collection<FilesetJobLink> unmodifiableJobLinks()
public <E> List<E> collectJobLinks(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateJobLinks()
internally and so will return a value
even if the underlying collection is null.public void addFilesetJobLink(FilesetJobLink target)
public void addFilesetJobLinkSet(Collection<FilesetJobLink> targets)
public void removeFilesetJobLink(FilesetJobLink target)
public void removeFilesetJobLinkSet(Collection<FilesetJobLink> targets)
public FilesetJobLink getFilesetJobLink(int index) throws IndexOutOfBoundsException
IndexOutOfBoundsException
public FilesetJobLink setFilesetJobLink(int index, FilesetJobLink element) throws IndexOutOfBoundsException
List.set(int, Object)
contract. To extend the list, use addFilesetJobLink(FilesetJobLink)
.IndexOutOfBoundsException
List.set(int, Object)
public FilesetJobLink getPrimaryFilesetJobLink() throws IndexOutOfBoundsException
IndexOutOfBoundsException
is throws. This method
will also throw an ApiUsageException
if the collection is
unloaded. See sizeOfJobLinks()
for more information.IndexOutOfBoundsException
public FilesetJobLink setPrimaryFilesetJobLink(FilesetJobLink element) throws IndexOutOfBoundsException
IndexOutOfBoundsException
will be thrown. Returns the swapped
element. This method
will also throw an ApiUsageException
if the collection is
unloaded. See sizeOfJobLinks()
for more information.IndexOutOfBoundsException
public FilesetJobLink linkJob(Job addition)
public void addFilesetJobLink(FilesetJobLink link, boolean bothSides)
public Iterator<Job> linkedJobIterator()
ConcurrentModificationException
.
Use linkedJobList()
instead.public Set<FilesetJobLink> findFilesetJobLink(Job target)
public List<Job> linkedJobList()
List
-copy of the underlying collection. Unlike,
linkedJobIterator()
, while using the returned List
,
modifications can be made to the underlying collection without throwing
ConcurrentModificationException
.public <E> List<E> eachLinkedJob(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.public void unlinkJob(Job removal)
public void removeFilesetJobLink(FilesetJobLink link, boolean bothSides)
public void clearJobLinks()
public Map<Long,Long> getJobLinksCountPerOwner()
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getTemplatePrefix()
public void setTemplatePrefix(String templatePrefix)
protected Set<FilesetAnnotationLink> getAnnotationLinks()
protected void setAnnotationLinks(Set<FilesetAnnotationLink> annotationLinks)
public int sizeOfAnnotationLinks()
sizeOfAnnotationLinks
in interface IAnnotated
public Iterator<FilesetAnnotationLink> iterateAnnotationLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfAnnotationLinks()
is less than zero.iterateAnnotationLinks
in interface IAnnotated
public Collection<FilesetAnnotationLink> 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 addFilesetAnnotationLink(FilesetAnnotationLink target)
public void addFilesetAnnotationLinkSet(Collection<FilesetAnnotationLink> targets)
public void removeFilesetAnnotationLink(FilesetAnnotationLink target)
public void removeFilesetAnnotationLinkSet(Collection<FilesetAnnotationLink> targets)
public FilesetAnnotationLink linkAnnotation(Annotation addition)
linkAnnotation
in interface IAnnotated
public void addFilesetAnnotationLink(FilesetAnnotationLink link, boolean bothSides)
public Iterator<Annotation> linkedAnnotationIterator()
ConcurrentModificationException
.
Use linkedAnnotationList()
instead.linkedAnnotationIterator
in interface IAnnotated
public Set<FilesetAnnotationLink> findFilesetAnnotationLink(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 removeFilesetAnnotationLink(FilesetAnnotationLink 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 Fileset.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.public Fileset newInstance()
public Fileset 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.4.0-ice35-b74
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.