@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Folder extends Object implements Serializable, IObject, IMutable, IAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
Folder.Details |
Modifier | Constructor and Description |
---|---|
|
Folder() |
protected |
Folder(Long id) |
|
Folder(Long id,
boolean loaded)
Main constructor.
|
|
Folder(String _name) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addChildFolders(Folder target)
use instead of setChildFolders .
|
void |
addChildFoldersSet(Collection<Folder> targets)
use like addFolder.
|
void |
addFolderAnnotationLink(FolderAnnotationLink target)
use instead of setAnnotationLinks .
|
void |
addFolderAnnotationLink(FolderAnnotationLink link,
boolean bothSides)
Adds a ome.model.annotations.FolderAnnotationLink to annotationLinks, allowing for recursion -- whether
or not addFolderAnnotationLink will be called on the addition if it is loaded
|
void |
addFolderAnnotationLinkSet(Collection<FolderAnnotationLink> targets)
use like addFolderAnnotationLink.
|
void |
addFolderImageLink(FolderImageLink target)
use instead of setImageLinks .
|
void |
addFolderImageLink(FolderImageLink link,
boolean bothSides)
Adds a ome.model.containers.FolderImageLink to imageLinks, allowing for recursion -- whether
or not addFolderImageLink will be called on the addition if it is loaded
|
void |
addFolderImageLinkSet(Collection<FolderImageLink> targets)
use like addFolderImageLink.
|
void |
addFolderRoiLink(FolderRoiLink target)
use instead of setRoiLinks .
|
void |
addFolderRoiLink(FolderRoiLink link,
boolean bothSides)
Adds a ome.model.containers.FolderRoiLink to roiLinks, allowing for recursion -- whether
or not addFolderRoiLink will be called on the addition if it is loaded
|
void |
addFolderRoiLinkSet(Collection<FolderRoiLink> targets)
use like addFolderRoiLink.
|
void |
clearAnnotationLinks()
clears the set.
|
void |
clearChildFolders()
clears the set.
|
void |
clearImageLinks()
clears the set.
|
void |
clearRoiLinks()
clears the set.
|
<E> List<E> |
collectAnnotationLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.FolderAnnotationLink while
collecting the results.
|
<E> List<E> |
collectChildFolders(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.containers.Folder while
collecting the results.
|
<E> List<E> |
collectImageLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.containers.FolderImageLink while
collecting the results.
|
<E> List<E> |
collectRoiLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.containers.FolderRoiLink 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> |
eachLinkedImage(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.core.Image while
collecting the results.
|
<E> List<E> |
eachLinkedRoi(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.roi.Roi while
collecting the results.
|
protected void |
errorIfUnloaded() |
Set<String> |
fields()
returns a Set of field names that belong to this class
|
Set<FolderAnnotationLink> |
findFolderAnnotationLink(Annotation target)
find all ome.model.annotations.FolderAnnotationLink which have the argument as their child.
|
Set<FolderImageLink> |
findFolderImageLink(Image target)
find all ome.model.containers.FolderImageLink which have the argument as their child.
|
Set<FolderRoiLink> |
findFolderRoiLink(Roi target)
find all ome.model.containers.FolderRoiLink which have the argument as their child.
|
protected Set<FolderAnnotationLink> |
getAnnotationLinks()
returns annotationLinks .
|
Map<Long,Long> |
getAnnotationLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.annotations.FolderAnnotationLink that a user has.
|
protected Set<Folder> |
getChildFolders()
returns childFolders .
|
String |
getDescription()
Simple field ome.model.containers.Folder.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. |
Long |
getId()
The DB unique identifier for this object.
|
protected Set<FolderImageLink> |
getImageLinks()
returns imageLinks .
|
Map<Long,Long> |
getImageLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.containers.FolderImageLink that a user has.
|
String |
getName()
Simple field ome.model.containers.Folder.name (java.lang.String)
|
Folder |
getParentFolder()
Many-to-one field ome.model.containers.Folder.parentFolder (ome.model.containers.Folder)
|
protected Set<FolderRoiLink> |
getRoiLinks()
returns roiLinks .
|
Map<Long,Long> |
getRoiLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.containers.FolderRoiLink that a user has.
|
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<FolderAnnotationLink> |
iterateAnnotationLinks()
should be used rather than accessing the annotationLinks set directly.
|
Iterator<Folder> |
iterateChildFolders()
should be used rather than accessing the childFolders set directly.
|
Iterator<FolderImageLink> |
iterateImageLinks()
should be used rather than accessing the imageLinks set directly.
|
Iterator<FolderRoiLink> |
iterateRoiLinks()
should be used rather than accessing the roiLinks set directly.
|
FolderAnnotationLink |
linkAnnotation(Annotation addition)
Adds a ome.model.annotations.FolderAnnotationLink 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<Image> |
linkedImageIterator()
provides an iterator over the parent values of the imageLinks.
|
List<Image> |
linkedImageList()
produces a
List -copy of the underlying collection. |
Iterator<Roi> |
linkedRoiIterator()
provides an iterator over the parent values of the roiLinks.
|
List<Roi> |
linkedRoiList()
produces a
List -copy of the underlying collection. |
FolderImageLink |
linkImage(Image addition)
Adds a ome.model.containers.FolderImageLink to imageLinks .
|
FolderRoiLink |
linkRoi(Roi addition)
Adds a ome.model.containers.FolderRoiLink to roiLinks .
|
Folder |
newInstance() |
Folder |
proxy() |
void |
putAt(String field,
Object value)
stores a value in this instance.
|
void |
removeChildFolders(Folder target)
removes a single element from this set and makes the inverse call on ome.model.containers.Folder
|
void |
removeChildFoldersSet(Collection<Folder> targets)
use like removeFolder
|
void |
removeFolderAnnotationLink(FolderAnnotationLink target)
removes a single element from this set and makes the inverse call on ome.model.annotations.FolderAnnotationLink
|
void |
removeFolderAnnotationLink(FolderAnnotationLink link,
boolean bothSides)
removes the given FolderAnnotationLink from annotationLinks, allowing for recursion -- whether
or not the removal will call unlinkFolder again if loaded.
|
void |
removeFolderAnnotationLinkSet(Collection<FolderAnnotationLink> targets)
use like removeFolderAnnotationLink
|
void |
removeFolderImageLink(FolderImageLink target)
removes a single element from this set and makes the inverse call on ome.model.containers.FolderImageLink
|
void |
removeFolderImageLink(FolderImageLink link,
boolean bothSides)
removes the given FolderImageLink from imageLinks, allowing for recursion -- whether
or not the removal will call unlinkFolder again if loaded.
|
void |
removeFolderImageLinkSet(Collection<FolderImageLink> targets)
use like removeFolderImageLink
|
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 roiLinks, allowing for recursion -- whether
or not the removal will call unlinkFolder again if loaded.
|
void |
removeFolderRoiLinkSet(Collection<FolderRoiLink> targets)
use like removeFolderRoiLink
|
Object |
retrieve(String field)
retrieves a value from this instance.
|
protected void |
setAnnotationLinks(Set<FolderAnnotationLink> annotationLinks)
setter for annotationLinks should be avoided.
|
protected void |
setAnnotationLinksCountPerOwner(Map<Long,Long> map) |
protected void |
setChildFolders(Set<Folder> childFolders)
setter for childFolders should be avoided.
|
void |
setDescription(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 Folder.Details instance instead. |
void |
setId(Long id)
usually unneeded.
|
protected void |
setImageLinks(Set<FolderImageLink> imageLinks)
setter for imageLinks should be avoided.
|
protected void |
setImageLinksCountPerOwner(Map<Long,Long> map) |
void |
setName(String name) |
void |
setParentFolder(Folder parentFolder) |
protected void |
setRoiLinks(Set<FolderRoiLink> roiLinks)
setter for roiLinks should be avoided.
|
protected void |
setRoiLinksCountPerOwner(Map<Long,Long> map) |
void |
setVersion(Integer version)
use with caution.
|
int |
sizeOfAnnotationLinks()
returns the size of annotationLinks.
|
int |
sizeOfChildFolders()
returns the size of childFolders.
|
int |
sizeOfImageLinks()
returns the size of imageLinks.
|
int |
sizeOfRoiLinks()
returns the size of roiLinks.
|
protected void |
throwNullCollectionException(String propertyName) |
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 |
unlinkRoi(Roi removal)
unlinks all ome.model.roi.Roi instances from this instance.
|
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
Collection<FolderAnnotationLink> |
unmodifiableAnnotationLinks()
Returns an unmodifiable collection-view
|
Collection<Folder> |
unmodifiableChildFolders()
Returns an unmodifiable collection-view
|
Collection<FolderImageLink> |
unmodifiableImageLinks()
Returns an unmodifiable collection-view
|
Collection<FolderRoiLink> |
unmodifiableRoiLinks()
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
public static final String OWNER_FILTER_CHILDFOLDERS
public static final String GROUP_FILTER_CHILDFOLDERS
public static final String EVENT_FILTER_CHILDFOLDERS
public static final String PERMS_FILTER_CHILDFOLDERS
protected Folder parentFolder
protected Set<FolderImageLink> imageLinks
public static final String OWNER_FILTER_IMAGELINKS
public static final String GROUP_FILTER_IMAGELINKS
public static final String EVENT_FILTER_IMAGELINKS
public static final String PERMS_FILTER_IMAGELINKS
protected Set<FolderRoiLink> roiLinks
public static final String OWNER_FILTER_ROILINKS
public static final String GROUP_FILTER_ROILINKS
public static final String EVENT_FILTER_ROILINKS
public static final String PERMS_FILTER_ROILINKS
protected Set<FolderAnnotationLink> 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 String name
protected String description
protected Details details
public static final String CHILDFOLDERS
public static final String PARENTFOLDER
public static final String IMAGELINKSCOUNTPEROWNER
public static final String IMAGELINKS
public static final String ROILINKSCOUNTPEROWNER
public static final String ROILINKS
public static final String ANNOTATIONLINKSCOUNTPEROWNER
public static final String ANNOTATIONLINKS
public static final String NAME
public static final String DESCRIPTION
public static final String DETAILS
protected boolean _loaded
public Folder()
protected Folder(Long id)
public Folder(Long id, boolean loaded)
public Folder(String _name)
@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 Set<Folder> getChildFolders()
protected void setChildFolders(Set<Folder> childFolders)
public int sizeOfChildFolders()
public Iterator<Folder> iterateChildFolders()
EmptyIterator
. To test for a null collection,
see of sizeOfChildFolders()
is less than zero.public Collection<Folder> unmodifiableChildFolders()
public <E> List<E> collectChildFolders(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateChildFolders()
internally and so will return a value
even if the underlying collection is null.public void addChildFolders(Folder target)
public void addChildFoldersSet(Collection<Folder> targets)
public void removeChildFolders(Folder target)
public void removeChildFoldersSet(Collection<Folder> targets)
public void clearChildFolders()
public Folder getParentFolder()
public void setParentFolder(Folder parentFolder)
protected Set<FolderImageLink> getImageLinks()
protected void setImageLinks(Set<FolderImageLink> imageLinks)
public int sizeOfImageLinks()
public Iterator<FolderImageLink> iterateImageLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfImageLinks()
is less than zero.public Collection<FolderImageLink> unmodifiableImageLinks()
public <E> 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 addFolderImageLink(FolderImageLink target)
public void addFolderImageLinkSet(Collection<FolderImageLink> targets)
public void removeFolderImageLink(FolderImageLink target)
public void removeFolderImageLinkSet(Collection<FolderImageLink> targets)
public FolderImageLink linkImage(Image addition)
public void addFolderImageLink(FolderImageLink link, boolean bothSides)
public Iterator<Image> linkedImageIterator()
ConcurrentModificationException
.
Use linkedImageList()
instead.public Set<FolderImageLink> findFolderImageLink(Image target)
public 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> List<E> eachLinkedImage(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.public void unlinkImage(Image removal)
public void removeFolderImageLink(FolderImageLink link, boolean bothSides)
public void clearImageLinks()
public Map<Long,Long> getImageLinksCountPerOwner()
protected Set<FolderRoiLink> getRoiLinks()
protected void setRoiLinks(Set<FolderRoiLink> roiLinks)
public int sizeOfRoiLinks()
public Iterator<FolderRoiLink> iterateRoiLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfRoiLinks()
is less than zero.public Collection<FolderRoiLink> unmodifiableRoiLinks()
public <E> List<E> collectRoiLinks(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateRoiLinks()
internally and so will return a value
even if the underlying collection is null.public void addFolderRoiLink(FolderRoiLink target)
public void addFolderRoiLinkSet(Collection<FolderRoiLink> targets)
public void removeFolderRoiLink(FolderRoiLink target)
public void removeFolderRoiLinkSet(Collection<FolderRoiLink> targets)
public FolderRoiLink linkRoi(Roi addition)
public void addFolderRoiLink(FolderRoiLink link, boolean bothSides)
public Iterator<Roi> linkedRoiIterator()
ConcurrentModificationException
.
Use linkedRoiList()
instead.public Set<FolderRoiLink> findFolderRoiLink(Roi target)
public List<Roi> linkedRoiList()
List
-copy of the underlying collection. Unlike,
linkedRoiIterator()
, while using the returned List
,
modifications can be made to the underlying collection without throwing
ConcurrentModificationException
.public <E> List<E> eachLinkedRoi(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.public void unlinkRoi(Roi removal)
public void removeFolderRoiLink(FolderRoiLink link, boolean bothSides)
public void clearRoiLinks()
public Map<Long,Long> getRoiLinksCountPerOwner()
protected Set<FolderAnnotationLink> getAnnotationLinks()
protected void setAnnotationLinks(Set<FolderAnnotationLink> annotationLinks)
public int sizeOfAnnotationLinks()
sizeOfAnnotationLinks
in interface IAnnotated
public Iterator<FolderAnnotationLink> iterateAnnotationLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfAnnotationLinks()
is less than zero.iterateAnnotationLinks
in interface IAnnotated
public Collection<FolderAnnotationLink> 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 addFolderAnnotationLink(FolderAnnotationLink target)
public void addFolderAnnotationLinkSet(Collection<FolderAnnotationLink> targets)
public void removeFolderAnnotationLink(FolderAnnotationLink target)
public void removeFolderAnnotationLinkSet(Collection<FolderAnnotationLink> targets)
public FolderAnnotationLink linkAnnotation(Annotation addition)
linkAnnotation
in interface IAnnotated
public void addFolderAnnotationLink(FolderAnnotationLink link, boolean bothSides)
public Iterator<Annotation> linkedAnnotationIterator()
ConcurrentModificationException
.
Use linkedAnnotationList()
instead.linkedAnnotationIterator
in interface IAnnotated
public Set<FolderAnnotationLink> findFolderAnnotationLink(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 removeFolderAnnotationLink(FolderAnnotationLink link, boolean bothSides)
public void clearAnnotationLinks()
clearAnnotationLinks
in interface IAnnotated
public Map<Long,Long> getAnnotationLinksCountPerOwner()
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getName()
public void setName(String name)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getDescription()
public void setDescription(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 Folder.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.public Folder newInstance()
public Folder 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.