@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Project extends Object implements Serializable, IObject, IMutable, IAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
Project.Details |
Modifier | Constructor and Description |
---|---|
|
Project() |
protected |
Project(Long id) |
|
Project(Long id,
boolean loaded)
Main constructor.
|
|
Project(String _name) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addProjectAnnotationLink(ProjectAnnotationLink target)
use instead of setAnnotationLinks .
|
void |
addProjectAnnotationLink(ProjectAnnotationLink link,
boolean bothSides)
Adds a ome.model.annotations.ProjectAnnotationLink to annotationLinks, allowing for recursion -- whether
or not addProjectAnnotationLink will be called on the addition if it is loaded
|
void |
addProjectAnnotationLinkSet(Collection<ProjectAnnotationLink> targets)
use like addProjectAnnotationLink.
|
void |
addProjectDatasetLink(ProjectDatasetLink target)
use instead of setDatasetLinks .
|
void |
addProjectDatasetLink(ProjectDatasetLink link,
boolean bothSides)
Adds a ome.model.containers.ProjectDatasetLink to datasetLinks, allowing for recursion -- whether
or not addProjectDatasetLink will be called on the addition if it is loaded
|
void |
addProjectDatasetLinkSet(Collection<ProjectDatasetLink> targets)
use like addProjectDatasetLink.
|
void |
clearAnnotationLinks()
clears the set.
|
void |
clearDatasetLinks()
clears the set.
|
<E> List<E> |
collectAnnotationLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.ProjectAnnotationLink while
collecting the results.
|
<E> List<E> |
collectDatasetLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.containers.ProjectDatasetLink 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> |
eachLinkedDataset(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.containers.Dataset while
collecting the results.
|
protected void |
errorIfUnloaded() |
Set<String> |
fields()
returns a Set of field names that belong to this class
|
Set<ProjectAnnotationLink> |
findProjectAnnotationLink(Annotation target)
find all ome.model.annotations.ProjectAnnotationLink which have the argument as their child.
|
Set<ProjectDatasetLink> |
findProjectDatasetLink(Dataset target)
find all ome.model.containers.ProjectDatasetLink which have the argument as their child.
|
protected Set<ProjectAnnotationLink> |
getAnnotationLinks()
returns annotationLinks .
|
Map<Long,Long> |
getAnnotationLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.annotations.ProjectAnnotationLink that a user has.
|
protected Set<ProjectDatasetLink> |
getDatasetLinks()
returns datasetLinks .
|
Map<Long,Long> |
getDatasetLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.containers.ProjectDatasetLink that a user has.
|
String |
getDescription()
Simple field ome.model.containers.Project.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.
|
String |
getName()
Simple field ome.model.containers.Project.name (java.lang.String)
|
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<ProjectAnnotationLink> |
iterateAnnotationLinks()
should be used rather than accessing the annotationLinks set directly.
|
Iterator<ProjectDatasetLink> |
iterateDatasetLinks()
should be used rather than accessing the datasetLinks set directly.
|
ProjectAnnotationLink |
linkAnnotation(Annotation addition)
Adds a ome.model.annotations.ProjectAnnotationLink to annotationLinks .
|
ProjectDatasetLink |
linkDataset(Dataset addition)
Adds a ome.model.containers.ProjectDatasetLink to datasetLinks .
|
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<Dataset> |
linkedDatasetIterator()
provides an iterator over the parent values of the datasetLinks.
|
List<Dataset> |
linkedDatasetList()
produces a
List -copy of the underlying collection. |
Project |
newInstance() |
Project |
proxy() |
void |
putAt(String field,
Object value)
stores a value in this instance.
|
void |
removeProjectAnnotationLink(ProjectAnnotationLink target)
removes a single element from this set and makes the inverse call on ome.model.annotations.ProjectAnnotationLink
|
void |
removeProjectAnnotationLink(ProjectAnnotationLink link,
boolean bothSides)
removes the given ProjectAnnotationLink from annotationLinks, allowing for recursion -- whether
or not the removal will call unlinkProject again if loaded.
|
void |
removeProjectAnnotationLinkSet(Collection<ProjectAnnotationLink> targets)
use like removeProjectAnnotationLink
|
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 datasetLinks, allowing for recursion -- whether
or not the removal will call unlinkProject again if loaded.
|
void |
removeProjectDatasetLinkSet(Collection<ProjectDatasetLink> targets)
use like removeProjectDatasetLink
|
Object |
retrieve(String field)
retrieves a value from this instance.
|
protected void |
setAnnotationLinks(Set<ProjectAnnotationLink> annotationLinks)
setter for annotationLinks should be avoided.
|
protected void |
setAnnotationLinksCountPerOwner(Map<Long,Long> map) |
protected void |
setDatasetLinks(Set<ProjectDatasetLink> datasetLinks)
setter for datasetLinks should be avoided.
|
protected void |
setDatasetLinksCountPerOwner(Map<Long,Long> map) |
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 Project.Details instance instead. |
void |
setId(Long id)
usually unneeded.
|
void |
setName(String name) |
void |
setVersion(Integer version)
use with caution.
|
int |
sizeOfAnnotationLinks()
returns the size of annotationLinks.
|
int |
sizeOfDatasetLinks()
returns the size of datasetLinks.
|
protected void |
throwNullCollectionException(String propertyName) |
String |
toString() |
void |
unlinkAnnotation(Annotation removal)
unlinks all ome.model.annotations.Annotation instances from this instance.
|
void |
unlinkDataset(Dataset removal)
unlinks all ome.model.containers.Dataset instances from this instance.
|
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
Collection<ProjectAnnotationLink> |
unmodifiableAnnotationLinks()
Returns an unmodifiable collection-view
|
Collection<ProjectDatasetLink> |
unmodifiableDatasetLinks()
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<ProjectDatasetLink> datasetLinks
public static final String OWNER_FILTER_DATASETLINKS
public static final String GROUP_FILTER_DATASETLINKS
public static final String EVENT_FILTER_DATASETLINKS
public static final String PERMS_FILTER_DATASETLINKS
protected Set<ProjectAnnotationLink> 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 DATASETLINKSCOUNTPEROWNER
public static final String DATASETLINKS
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 Project()
protected Project(Long id)
public Project(Long id, boolean loaded)
public Project(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<ProjectDatasetLink> getDatasetLinks()
protected void setDatasetLinks(Set<ProjectDatasetLink> datasetLinks)
public int sizeOfDatasetLinks()
public Iterator<ProjectDatasetLink> iterateDatasetLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfDatasetLinks()
is less than zero.public Collection<ProjectDatasetLink> unmodifiableDatasetLinks()
public <E> List<E> collectDatasetLinks(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateDatasetLinks()
internally and so will return a value
even if the underlying collection is null.public void addProjectDatasetLink(ProjectDatasetLink target)
public void addProjectDatasetLinkSet(Collection<ProjectDatasetLink> targets)
public void removeProjectDatasetLink(ProjectDatasetLink target)
public void removeProjectDatasetLinkSet(Collection<ProjectDatasetLink> targets)
public ProjectDatasetLink linkDataset(Dataset addition)
public void addProjectDatasetLink(ProjectDatasetLink link, boolean bothSides)
public Iterator<Dataset> linkedDatasetIterator()
ConcurrentModificationException
.
Use linkedDatasetList()
instead.public Set<ProjectDatasetLink> findProjectDatasetLink(Dataset target)
public List<Dataset> linkedDatasetList()
List
-copy of the underlying collection. Unlike,
linkedDatasetIterator()
, while using the returned List
,
modifications can be made to the underlying collection without throwing
ConcurrentModificationException
.public <E> List<E> eachLinkedDataset(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.public void unlinkDataset(Dataset removal)
public void removeProjectDatasetLink(ProjectDatasetLink link, boolean bothSides)
public void clearDatasetLinks()
public Map<Long,Long> getDatasetLinksCountPerOwner()
protected Set<ProjectAnnotationLink> getAnnotationLinks()
protected void setAnnotationLinks(Set<ProjectAnnotationLink> annotationLinks)
public int sizeOfAnnotationLinks()
sizeOfAnnotationLinks
in interface IAnnotated
public Iterator<ProjectAnnotationLink> iterateAnnotationLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfAnnotationLinks()
is less than zero.iterateAnnotationLinks
in interface IAnnotated
public Collection<ProjectAnnotationLink> 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 addProjectAnnotationLink(ProjectAnnotationLink target)
public void addProjectAnnotationLinkSet(Collection<ProjectAnnotationLink> targets)
public void removeProjectAnnotationLink(ProjectAnnotationLink target)
public void removeProjectAnnotationLinkSet(Collection<ProjectAnnotationLink> targets)
public ProjectAnnotationLink linkAnnotation(Annotation addition)
linkAnnotation
in interface IAnnotated
public void addProjectAnnotationLink(ProjectAnnotationLink link, boolean bothSides)
public Iterator<Annotation> linkedAnnotationIterator()
ConcurrentModificationException
.
Use linkedAnnotationList()
instead.linkedAnnotationIterator
in interface IAnnotated
public Set<ProjectAnnotationLink> findProjectAnnotationLink(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 removeProjectAnnotationLink(ProjectAnnotationLink 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 Project.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.public Project newInstance()
public Project 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.5-ice35-b73
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.