@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class OriginalFile extends Object implements Serializable, IObject, IMutable, IAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
OriginalFile.Details |
Modifier | Constructor and Description |
---|---|
|
OriginalFile() |
protected |
OriginalFile(Long id) |
|
OriginalFile(Long id,
boolean loaded)
Main constructor.
|
|
OriginalFile(String _path,
String _name) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addFilesetEntry(FilesetEntry target)
use instead of setFilesetEntries .
|
void |
addFilesetEntrySet(Collection<FilesetEntry> targets)
use like addFilesetEntry.
|
void |
addOriginalFileAnnotationLink(OriginalFileAnnotationLink target)
use instead of setAnnotationLinks .
|
void |
addOriginalFileAnnotationLink(OriginalFileAnnotationLink link,
boolean bothSides)
Adds a ome.model.annotations.OriginalFileAnnotationLink to annotationLinks, allowing for recursion -- whether
or not addOriginalFileAnnotationLink will be called on the addition if it is loaded
|
void |
addOriginalFileAnnotationLinkSet(Collection<OriginalFileAnnotationLink> targets)
use like addOriginalFileAnnotationLink.
|
void |
addPixelsOriginalFileMap(PixelsOriginalFileMap target)
use instead of setPixelsFileMaps .
|
void |
addPixelsOriginalFileMap(PixelsOriginalFileMap link,
boolean bothSides)
Adds a ome.model.core.PixelsOriginalFileMap to pixelsFileMaps, allowing for recursion -- whether
or not addPixelsOriginalFileMap will be called on the addition if it is loaded
|
void |
addPixelsOriginalFileMapSet(Collection<PixelsOriginalFileMap> targets)
use like addPixelsOriginalFileMap.
|
void |
clearAnnotationLinks()
clears the set.
|
void |
clearFilesetEntries()
clears the set.
|
void |
clearPixelsLinks()
clears the set.
|
<E> List<E> |
collectAnnotationLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.OriginalFileAnnotationLink while
collecting the results.
|
<E> List<E> |
collectFilesetEntries(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.fs.FilesetEntry while
collecting the results.
|
<E> List<E> |
collectPixelsFileMaps(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.core.PixelsOriginalFileMap 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> |
eachLinkedPixels(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.core.Pixels while
collecting the results.
|
protected void |
errorIfUnloaded() |
Set<String> |
fields()
returns a Set of field names that belong to this class
|
Set<OriginalFileAnnotationLink> |
findOriginalFileAnnotationLink(Annotation target)
find all ome.model.annotations.OriginalFileAnnotationLink which have the argument as their child.
|
Set<PixelsOriginalFileMap> |
findPixelsOriginalFileMap(Pixels target)
find all ome.model.core.PixelsOriginalFileMap which have the argument as their child.
|
protected Set<OriginalFileAnnotationLink> |
getAnnotationLinks()
returns annotationLinks .
|
Map<Long,Long> |
getAnnotationLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.annotations.OriginalFileAnnotationLink that a user has.
|
Timestamp |
getAtime()
Simple field ome.model.core.OriginalFile.atime (java.sql.Timestamp)
|
Timestamp |
getCtime()
Simple field ome.model.core.OriginalFile.ctime (java.sql.Timestamp)
|
Details |
getDetails()
The details of this object correspond to low-level system
information.
|
protected Set<FilesetEntry> |
getFilesetEntries()
returns filesetEntries .
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
String |
getHash()
Simple field ome.model.core.OriginalFile.hash (java.lang.String)
|
ChecksumAlgorithm |
getHasher()
Many-to-one field ome.model.core.OriginalFile.hasher (ome.model.enums.ChecksumAlgorithm)
|
Long |
getId()
The DB unique identifier for this object.
|
String |
getMimetype()
Simple field ome.model.core.OriginalFile.mimetype (java.lang.String)
|
Timestamp |
getMtime()
Simple field ome.model.core.OriginalFile.mtime (java.sql.Timestamp)
|
String |
getName()
Simple field ome.model.core.OriginalFile.name (java.lang.String)
|
String |
getPath()
Simple field ome.model.core.OriginalFile.path (java.lang.String)
|
protected Set<PixelsOriginalFileMap> |
getPixelsFileMaps()
returns pixelsFileMaps .
|
Map<Long,Long> |
getPixelsFileMapsCountPerOwner()
If fetched, returns the count(*) of ome.model.core.PixelsOriginalFileMap that a user has.
|
Long |
getSize()
Simple field ome.model.core.OriginalFile.size (java.lang.Long)
|
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<OriginalFileAnnotationLink> |
iterateAnnotationLinks()
should be used rather than accessing the annotationLinks set directly.
|
Iterator<FilesetEntry> |
iterateFilesetEntries()
should be used rather than accessing the filesetEntries set directly.
|
Iterator<PixelsOriginalFileMap> |
iteratePixelsFileMaps()
should be used rather than accessing the pixelsFileMaps set directly.
|
OriginalFileAnnotationLink |
linkAnnotation(Annotation addition)
Adds a ome.model.annotations.OriginalFileAnnotationLink 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<Pixels> |
linkedPixelsIterator()
provides an iterator over the parent values of the pixelsFileMaps.
|
List<Pixels> |
linkedPixelsList()
produces a
List -copy of the underlying collection. |
PixelsOriginalFileMap |
linkPixels(Pixels addition)
Adds a ome.model.core.PixelsOriginalFileMap to pixelsFileMaps .
|
OriginalFile |
newInstance() |
OriginalFile |
proxy() |
void |
putAt(String field,
Object value)
stores a value in this instance.
|
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 |
removeOriginalFileAnnotationLink(OriginalFileAnnotationLink target)
removes a single element from this set and makes the inverse call on ome.model.annotations.OriginalFileAnnotationLink
|
void |
removeOriginalFileAnnotationLink(OriginalFileAnnotationLink link,
boolean bothSides)
removes the given OriginalFileAnnotationLink from annotationLinks, allowing for recursion -- whether
or not the removal will call unlinkOriginalFile again if loaded.
|
void |
removeOriginalFileAnnotationLinkSet(Collection<OriginalFileAnnotationLink> targets)
use like removeOriginalFileAnnotationLink
|
void |
removePixelsOriginalFileMap(PixelsOriginalFileMap target)
removes a single element from this set and makes the inverse call on ome.model.core.PixelsOriginalFileMap
|
void |
removePixelsOriginalFileMap(PixelsOriginalFileMap link,
boolean bothSides)
removes the given PixelsOriginalFileMap from pixelsFileMaps, allowing for recursion -- whether
or not the removal will call unlinkOriginalFile again if loaded.
|
void |
removePixelsOriginalFileMapSet(Collection<PixelsOriginalFileMap> targets)
use like removePixelsOriginalFileMap
|
Object |
retrieve(String field)
retrieves a value from this instance.
|
protected void |
setAnnotationLinks(Set<OriginalFileAnnotationLink> annotationLinks)
setter for annotationLinks should be avoided.
|
protected void |
setAnnotationLinksCountPerOwner(Map<Long,Long> map) |
void |
setAtime(Timestamp atime) |
void |
setCtime(Timestamp ctime) |
protected void |
setDetails(Details details)
Use the
Details.copy(ome.model.internal.Details)
or Details.shallowCopy(ome.model.internal.Details)
methods to set the OriginalFile.Details instance instead. |
protected void |
setFilesetEntries(Set<FilesetEntry> filesetEntries)
setter for filesetEntries should be avoided.
|
void |
setHash(String hash) |
void |
setHasher(ChecksumAlgorithm hasher) |
void |
setId(Long id)
usually unneeded.
|
void |
setMimetype(String mimetype) |
void |
setMtime(Timestamp mtime) |
void |
setName(String name) |
void |
setPath(String path) |
protected void |
setPixelsFileMaps(Set<PixelsOriginalFileMap> pixelsFileMaps)
setter for pixelsFileMaps should be avoided.
|
protected void |
setPixelsFileMapsCountPerOwner(Map<Long,Long> map) |
void |
setSize(Long size) |
void |
setVersion(Integer version)
use with caution.
|
int |
sizeOfAnnotationLinks()
returns the size of annotationLinks.
|
int |
sizeOfFilesetEntries()
returns the size of filesetEntries.
|
int |
sizeOfPixelsFileMaps()
returns the size of pixelsFileMaps.
|
protected void |
throwNullCollectionException(String propertyName) |
String |
toString() |
void |
unlinkAnnotation(Annotation removal)
unlinks all ome.model.annotations.Annotation instances from this instance.
|
void |
unlinkPixels(Pixels removal)
unlinks all ome.model.core.Pixels instances from this instance.
|
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
Collection<OriginalFileAnnotationLink> |
unmodifiableAnnotationLinks()
Returns an unmodifiable collection-view
|
Collection<FilesetEntry> |
unmodifiableFilesetEntries()
Returns an unmodifiable collection-view
|
Collection<PixelsOriginalFileMap> |
unmodifiablePixelsFileMaps()
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 Set<PixelsOriginalFileMap> pixelsFileMaps
public static final String OWNER_FILTER_PIXELSFILEMAPS
public static final String GROUP_FILTER_PIXELSFILEMAPS
public static final String EVENT_FILTER_PIXELSFILEMAPS
public static final String PERMS_FILTER_PIXELSFILEMAPS
protected String path
protected Long size
protected Timestamp atime
protected Timestamp mtime
protected Timestamp ctime
protected ChecksumAlgorithm hasher
protected String hash
protected String mimetype
protected Set<FilesetEntry> filesetEntries
public static final String OWNER_FILTER_FILESETENTRIES
public static final String GROUP_FILTER_FILESETENTRIES
public static final String EVENT_FILTER_FILESETENTRIES
public static final String PERMS_FILTER_FILESETENTRIES
protected Set<OriginalFileAnnotationLink> 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 Details details
public static final String PIXELSFILEMAPSCOUNTPEROWNER
public static final String PIXELSFILEMAPS
public static final String PATH
public static final String SIZE
public static final String ATIME
public static final String MTIME
public static final String CTIME
public static final String HASHER
public static final String HASH
public static final String MIMETYPE
public static final String FILESETENTRIES
public static final String ANNOTATIONLINKSCOUNTPEROWNER
public static final String ANNOTATIONLINKS
public static final String NAME
public static final String DETAILS
protected boolean _loaded
public OriginalFile()
protected OriginalFile(Long id)
public OriginalFile(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.protected Set<PixelsOriginalFileMap> getPixelsFileMaps()
protected void setPixelsFileMaps(Set<PixelsOriginalFileMap> pixelsFileMaps)
public int sizeOfPixelsFileMaps()
public Iterator<PixelsOriginalFileMap> iteratePixelsFileMaps()
EmptyIterator
. To test for a null collection,
see of sizeOfPixelsFileMaps()
is less than zero.public Collection<PixelsOriginalFileMap> unmodifiablePixelsFileMaps()
public <E> List<E> collectPixelsFileMaps(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iteratePixelsFileMaps()
internally and so will return a value
even if the underlying collection is null.public void addPixelsOriginalFileMap(PixelsOriginalFileMap target)
public void addPixelsOriginalFileMapSet(Collection<PixelsOriginalFileMap> targets)
public void removePixelsOriginalFileMap(PixelsOriginalFileMap target)
public void removePixelsOriginalFileMapSet(Collection<PixelsOriginalFileMap> targets)
public PixelsOriginalFileMap linkPixels(Pixels addition)
public void addPixelsOriginalFileMap(PixelsOriginalFileMap link, boolean bothSides)
public Iterator<Pixels> linkedPixelsIterator()
ConcurrentModificationException
.
Use linkedPixelsList()
instead.public Set<PixelsOriginalFileMap> findPixelsOriginalFileMap(Pixels target)
public List<Pixels> linkedPixelsList()
List
-copy of the underlying collection. Unlike,
linkedPixelsIterator()
, while using the returned List
,
modifications can be made to the underlying collection without throwing
ConcurrentModificationException
.public <E> List<E> eachLinkedPixels(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.public void unlinkPixels(Pixels removal)
public void removePixelsOriginalFileMap(PixelsOriginalFileMap link, boolean bothSides)
public void clearPixelsLinks()
public Map<Long,Long> getPixelsFileMapsCountPerOwner()
@Fields(value={@Field(index=TOKENIZED),@Field(index=TOKENIZED,name="combined_fields")}) public String getPath()
public void setPath(String path)
@Fields(value={@Field(index=UN_TOKENIZED),@Field(index=UN_TOKENIZED,name="combined_fields")}) public Long getSize()
public void setSize(Long size)
@DateBridge(resolution=MINUTE) @Fields(value={@Field(index=UN_TOKENIZED),@Field(index=UN_TOKENIZED,name="combined_fields")}) public Timestamp getAtime()
public void setAtime(Timestamp atime)
@DateBridge(resolution=MINUTE) @Fields(value={@Field(index=UN_TOKENIZED),@Field(index=UN_TOKENIZED,name="combined_fields")}) public Timestamp getMtime()
public void setMtime(Timestamp mtime)
@DateBridge(resolution=MINUTE) @Fields(value={@Field(index=UN_TOKENIZED),@Field(index=UN_TOKENIZED,name="combined_fields")}) public Timestamp getCtime()
public void setCtime(Timestamp ctime)
public ChecksumAlgorithm getHasher()
public void setHasher(ChecksumAlgorithm hasher)
@Fields(value={@Field(index=TOKENIZED),@Field(index=TOKENIZED,name="combined_fields")}) public String getHash()
public void setHash(String hash)
@Fields(value={@Field(index=TOKENIZED),@Field(index=TOKENIZED,name="combined_fields")}) public String getMimetype()
public void setMimetype(String mimetype)
protected Set<FilesetEntry> getFilesetEntries()
protected void setFilesetEntries(Set<FilesetEntry> filesetEntries)
public int sizeOfFilesetEntries()
public Iterator<FilesetEntry> iterateFilesetEntries()
EmptyIterator
. To test for a null collection,
see of sizeOfFilesetEntries()
is less than zero.public Collection<FilesetEntry> unmodifiableFilesetEntries()
public <E> List<E> collectFilesetEntries(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateFilesetEntries()
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 clearFilesetEntries()
protected Set<OriginalFileAnnotationLink> getAnnotationLinks()
protected void setAnnotationLinks(Set<OriginalFileAnnotationLink> annotationLinks)
public int sizeOfAnnotationLinks()
sizeOfAnnotationLinks
in interface IAnnotated
public Iterator<OriginalFileAnnotationLink> iterateAnnotationLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfAnnotationLinks()
is less than zero.iterateAnnotationLinks
in interface IAnnotated
public Collection<OriginalFileAnnotationLink> 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 addOriginalFileAnnotationLink(OriginalFileAnnotationLink target)
public void addOriginalFileAnnotationLinkSet(Collection<OriginalFileAnnotationLink> targets)
public void removeOriginalFileAnnotationLink(OriginalFileAnnotationLink target)
public void removeOriginalFileAnnotationLinkSet(Collection<OriginalFileAnnotationLink> targets)
public OriginalFileAnnotationLink linkAnnotation(Annotation addition)
linkAnnotation
in interface IAnnotated
public void addOriginalFileAnnotationLink(OriginalFileAnnotationLink link, boolean bothSides)
public Iterator<Annotation> linkedAnnotationIterator()
ConcurrentModificationException
.
Use linkedAnnotationList()
instead.linkedAnnotationIterator
in interface IAnnotated
public Set<OriginalFileAnnotationLink> findOriginalFileAnnotationLink(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 removeOriginalFileAnnotationLink(OriginalFileAnnotationLink link, boolean bothSides)
public void clearAnnotationLinks()
clearAnnotationLinks
in interface IAnnotated
public Map<Long,Long> getAnnotationLinksCountPerOwner()
@Fields(value={@Field(index=TOKENIZED),@Field(index=TOKENIZED,name="combined_fields")}) public String getName()
public void setName(String name)
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 OriginalFile.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.public OriginalFile newInstance()
public OriginalFile 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.1.3-ice35-b52
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.