@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Node extends Object implements Serializable, IObject, IGlobal, IMutable, IAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
Node.Details |
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
_dynamicFields |
protected boolean |
_loaded |
protected Set<NodeAnnotationLink> |
annotationLinks |
static String |
ANNOTATIONLINKS |
static String |
ANNOTATIONLINKSCOUNTPEROWNER |
protected String |
conn |
static String |
CONN |
protected Details |
details |
static String |
DETAILS |
protected Timestamp |
down |
static String |
DOWN |
static String |
EVENT_FILTER_ANNOTATIONLINKS |
static Set<String> |
FIELDS |
static String |
GROUP_FILTER_ANNOTATIONLINKS |
protected Long |
id |
static String |
ID |
static String |
OWNER_FILTER_ANNOTATIONLINKS |
static String |
PERMS_FILTER_ANNOTATIONLINKS |
protected Integer |
scale |
static String |
SCALE |
protected Set<Session> |
sessions |
static String |
SESSIONS |
protected Timestamp |
up |
static String |
UP |
protected String |
uuid |
static String |
UUID |
protected Integer |
version |
static String |
VERSION |
Modifier | Constructor and Description |
---|---|
|
Node() |
protected |
Node(Long id) |
|
Node(Long id,
boolean loaded)
Main constructor.
|
|
Node(String _uuid,
String _conn,
Timestamp _up) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addNodeAnnotationLink(NodeAnnotationLink target)
use instead of setAnnotationLinks .
|
void |
addNodeAnnotationLink(NodeAnnotationLink link,
boolean bothSides)
Adds a ome.model.annotations.NodeAnnotationLink to annotationLinks, allowing for recursion -- whether
or not addNodeAnnotationLink will be called on the addition if it is loaded
|
void |
addNodeAnnotationLinkSet(Collection<NodeAnnotationLink> targets)
use like addNodeAnnotationLink.
|
void |
addSession(Session target)
use instead of setSessions .
|
void |
addSessionSet(Collection<Session> targets)
use like addSession.
|
void |
clearAnnotationLinks()
clears the set.
|
void |
clearSessions()
clears the set.
|
<E> List<E> |
collectAnnotationLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.NodeAnnotationLink while
collecting the results.
|
<E> List<E> |
collectSessions(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.meta.Session 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<NodeAnnotationLink> |
findNodeAnnotationLink(Annotation target)
find all ome.model.annotations.NodeAnnotationLink which have the argument as their child.
|
protected Set<NodeAnnotationLink> |
getAnnotationLinks()
returns annotationLinks .
|
Map<Long,Long> |
getAnnotationLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.annotations.NodeAnnotationLink that a user has.
|
String |
getConn()
Simple field ome.model.meta.Node.conn (java.lang.String)
|
Details |
getDetails()
The details of this object correspond to low-level system
information.
|
Timestamp |
getDown()
Simple field ome.model.meta.Node.down (java.sql.Timestamp)
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
Long |
getId()
The DB unique identifier for this object.
|
Integer |
getScale()
Simple field ome.model.meta.Node.scale (java.lang.Integer)
|
protected Set<Session> |
getSessions()
returns sessions .
|
Timestamp |
getUp()
Simple field ome.model.meta.Node.up (java.sql.Timestamp)
|
String |
getUuid()
Simple field ome.model.meta.Node.uuid (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<NodeAnnotationLink> |
iterateAnnotationLinks()
should be used rather than accessing the annotationLinks set directly.
|
Iterator<Session> |
iterateSessions()
should be used rather than accessing the sessions set directly.
|
NodeAnnotationLink |
linkAnnotation(Annotation addition)
Adds a ome.model.annotations.NodeAnnotationLink 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. |
Node |
newInstance() |
Node |
proxy() |
void |
putAt(String field,
Object value)
stores a value in this instance.
|
void |
removeNodeAnnotationLink(NodeAnnotationLink target)
removes a single element from this set and makes the inverse call on ome.model.annotations.NodeAnnotationLink
|
void |
removeNodeAnnotationLink(NodeAnnotationLink link,
boolean bothSides)
removes the given NodeAnnotationLink from annotationLinks, allowing for recursion -- whether
or not the removal will call unlinkNode again if loaded.
|
void |
removeNodeAnnotationLinkSet(Collection<NodeAnnotationLink> targets)
use like removeNodeAnnotationLink
|
void |
removeSession(Session target)
removes a single element from this set and makes the inverse call on ome.model.meta.Session
|
void |
removeSessionSet(Collection<Session> targets)
use like removeSession
|
Object |
retrieve(String field)
retrieves a value from this instance.
|
protected void |
setAnnotationLinks(Set<NodeAnnotationLink> annotationLinks)
setter for annotationLinks should be avoided.
|
protected void |
setAnnotationLinksCountPerOwner(Map<Long,Long> map) |
void |
setConn(String conn) |
protected void |
setDetails(Details details)
Use the
Details.copy(ome.model.internal.Details)
or Details.shallowCopy(ome.model.internal.Details)
methods to set the Node.Details instance instead. |
void |
setDown(Timestamp down) |
void |
setId(Long id)
usually unneeded.
|
void |
setScale(Integer scale) |
protected void |
setSessions(Set<Session> sessions)
setter for sessions should be avoided.
|
void |
setUp(Timestamp up) |
void |
setUuid(String uuid) |
void |
setVersion(Integer version)
use with caution.
|
int |
sizeOfAnnotationLinks()
returns the size of annotationLinks.
|
int |
sizeOfSessions()
returns the size of sessions.
|
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<NodeAnnotationLink> |
unmodifiableAnnotationLinks()
Returns an unmodifiable collection-view
|
Collection<Session> |
unmodifiableSessions()
Returns an unmodifiable collection-view
|
Validation |
validate()
calls the class-specific validator for this instance and returns the
Validation object. |
public static final String ID
protected Long id
public static final String VERSION
protected Integer version
protected String uuid
protected String conn
protected Timestamp up
protected Timestamp down
protected Integer scale
protected Set<NodeAnnotationLink> 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 SESSIONS
public static final String UUID
public static final String CONN
public static final String UP
public static final String DOWN
public static final String SCALE
public static final String ANNOTATIONLINKSCOUNTPEROWNER
public static final String ANNOTATIONLINKS
public static final String DETAILS
protected boolean _loaded
public Node()
protected Node(Long id)
public Node(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<Session> getSessions()
protected void setSessions(Set<Session> sessions)
public int sizeOfSessions()
public Iterator<Session> iterateSessions()
EmptyIterator
. To test for a null collection,
see of sizeOfSessions()
is less than zero.public Collection<Session> unmodifiableSessions()
public <E> List<E> collectSessions(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateSessions()
internally and so will return a value
even if the underlying collection is null.public void addSession(Session target)
public void addSessionSet(Collection<Session> targets)
public void removeSession(Session target)
public void removeSessionSet(Collection<Session> targets)
public void clearSessions()
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getUuid()
public void setUuid(String uuid)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getConn()
public void setConn(String conn)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public Timestamp getUp()
public void setUp(Timestamp up)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public Timestamp getDown()
public void setDown(Timestamp down)
@Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public Integer getScale()
public void setScale(Integer scale)
protected Set<NodeAnnotationLink> getAnnotationLinks()
protected void setAnnotationLinks(Set<NodeAnnotationLink> annotationLinks)
public int sizeOfAnnotationLinks()
sizeOfAnnotationLinks
in interface IAnnotated
public Iterator<NodeAnnotationLink> iterateAnnotationLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfAnnotationLinks()
is less than zero.iterateAnnotationLinks
in interface IAnnotated
public Collection<NodeAnnotationLink> 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 addNodeAnnotationLink(NodeAnnotationLink target)
public void addNodeAnnotationLinkSet(Collection<NodeAnnotationLink> targets)
public void removeNodeAnnotationLink(NodeAnnotationLink target)
public void removeNodeAnnotationLinkSet(Collection<NodeAnnotationLink> targets)
public NodeAnnotationLink linkAnnotation(Annotation addition)
linkAnnotation
in interface IAnnotated
public void addNodeAnnotationLink(NodeAnnotationLink link, boolean bothSides)
public Iterator<Annotation> linkedAnnotationIterator()
ConcurrentModificationException
.
Use linkedAnnotationList()
instead.linkedAnnotationIterator
in interface IAnnotated
public Set<NodeAnnotationLink> findNodeAnnotationLink(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 removeNodeAnnotationLink(NodeAnnotationLink 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 Node.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.public Node newInstance()
public Node 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.2.8-ice35-b57
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.