@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Node extends java.lang.Object implements java.io.Serializable, IObject, IGlobal, IMutable, IAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
Node.Details |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
_dynamicFields |
protected boolean |
_loaded |
protected java.util.Set<NodeAnnotationLink> |
annotationLinks |
static java.lang.String |
ANNOTATIONLINKS |
static java.lang.String |
ANNOTATIONLINKSCOUNTPEROWNER |
protected java.lang.String |
conn |
static java.lang.String |
CONN |
protected Details |
details |
static java.lang.String |
DETAILS |
protected java.sql.Timestamp |
down |
static java.lang.String |
DOWN |
static java.lang.String |
EVENT_FILTER_ANNOTATIONLINKS |
static java.util.Set<java.lang.String> |
FIELDS |
static java.lang.String |
GROUP_FILTER_ANNOTATIONLINKS |
protected java.lang.Long |
id |
static java.lang.String |
ID |
static java.lang.String |
OWNER_FILTER_ANNOTATIONLINKS |
static java.lang.String |
PERMS_FILTER_ANNOTATIONLINKS |
protected java.lang.Integer |
scale |
static java.lang.String |
SCALE |
protected java.util.Set<Session> |
sessions |
static java.lang.String |
SESSIONS |
protected java.sql.Timestamp |
up |
static java.lang.String |
UP |
protected java.lang.String |
uuid |
static java.lang.String |
UUID |
protected java.lang.Integer |
version |
static java.lang.String |
VERSION |
Modifier | Constructor and Description |
---|---|
|
Node() |
protected |
Node(java.lang.Long id) |
|
Node(java.lang.Long id,
boolean loaded)
Main constructor.
|
|
Node(java.lang.String _uuid,
java.lang.String _conn,
java.sql.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(java.util.Collection<NodeAnnotationLink> targets)
use like addNodeAnnotationLink.
|
void |
addSession(Session target)
use instead of setSessions .
|
void |
addSessionSet(java.util.Collection<Session> targets)
use like addSession.
|
void |
clearAnnotationLinks()
clears the set.
|
void |
clearSessions()
clears the set.
|
<E> java.util.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> java.util.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> java.util.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() |
java.util.Set<java.lang.String> |
fields()
returns a Set of field names that belong to this class
|
java.util.Set<NodeAnnotationLink> |
findNodeAnnotationLink(Annotation target)
find all ome.model.annotations.NodeAnnotationLink which have the argument as their child.
|
protected java.util.Set<NodeAnnotationLink> |
getAnnotationLinks()
returns annotationLinks .
|
java.util.Map<java.lang.Long,java.lang.Long> |
getAnnotationLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.annotations.NodeAnnotationLink that a user has.
|
java.lang.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.
|
java.sql.Timestamp |
getDown()
Simple field ome.model.meta.Node.down (java.sql.Timestamp)
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
java.lang.Long |
getId()
The DB unique identifier for this object.
|
java.lang.Integer |
getScale()
Simple field ome.model.meta.Node.scale (java.lang.Integer)
|
protected java.util.Set<Session> |
getSessions()
returns sessions .
|
java.sql.Timestamp |
getUp()
Simple field ome.model.meta.Node.up (java.sql.Timestamp)
|
java.lang.String |
getUuid()
Simple field ome.model.meta.Node.uuid (java.lang.String)
|
java.lang.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() |
java.util.Iterator<NodeAnnotationLink> |
iterateAnnotationLinks()
should be used rather than accessing the annotationLinks set directly.
|
java.util.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 .
|
java.util.Iterator<Annotation> |
linkedAnnotationIterator()
provides an iterator over the parent values of the annotationLinks.
|
java.util.List<Annotation> |
linkedAnnotationList()
produces a
List -copy of the underlying collection. |
Node |
newInstance() |
Node |
proxy() |
void |
putAt(java.lang.String field,
java.lang.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(java.util.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(java.util.Collection<Session> targets)
use like removeSession
|
java.lang.Object |
retrieve(java.lang.String field)
retrieves a value from this instance.
|
protected void |
setAnnotationLinks(java.util.Set<NodeAnnotationLink> annotationLinks)
setter for annotationLinks should be avoided.
|
protected void |
setAnnotationLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map) |
void |
setConn(java.lang.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(java.sql.Timestamp down) |
void |
setId(java.lang.Long id)
usually unneeded.
|
void |
setScale(java.lang.Integer scale) |
protected void |
setSessions(java.util.Set<Session> sessions)
setter for sessions should be avoided.
|
void |
setUp(java.sql.Timestamp up) |
void |
setUuid(java.lang.String uuid) |
void |
setVersion(java.lang.Integer version)
use with caution.
|
int |
sizeOfAnnotationLinks()
returns the size of annotationLinks.
|
int |
sizeOfSessions()
returns the size of sessions.
|
protected void |
throwNullCollectionException(java.lang.String propertyName) |
java.lang.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.
|
java.util.Collection<NodeAnnotationLink> |
unmodifiableAnnotationLinks()
Returns an unmodifiable collection-view
|
java.util.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 java.lang.String ID
protected java.lang.Long id
public static final java.lang.String VERSION
protected java.lang.Integer version
protected java.util.Set<Session> sessions
protected java.lang.String uuid
protected java.lang.String conn
protected java.sql.Timestamp up
protected java.sql.Timestamp down
protected java.lang.Integer scale
protected java.util.Set<NodeAnnotationLink> annotationLinks
public static final java.lang.String OWNER_FILTER_ANNOTATIONLINKS
public static final java.lang.String GROUP_FILTER_ANNOTATIONLINKS
public static final java.lang.String EVENT_FILTER_ANNOTATIONLINKS
public static final java.lang.String PERMS_FILTER_ANNOTATIONLINKS
protected Details details
public static final java.lang.String SESSIONS
public static final java.lang.String UUID
public static final java.lang.String CONN
public static final java.lang.String UP
public static final java.lang.String DOWN
public static final java.lang.String SCALE
public static final java.lang.String ANNOTATIONLINKSCOUNTPEROWNER
public static final java.lang.String ANNOTATIONLINKS
public static final java.lang.String DETAILS
public static final java.util.Set<java.lang.String> FIELDS
protected java.util.Map<java.lang.String,java.lang.Object> _dynamicFields
protected boolean _loaded
public Node()
protected Node(java.lang.Long id)
public Node(java.lang.Long id, boolean loaded)
public Node(java.lang.String _uuid, java.lang.String _conn, java.sql.Timestamp _up)
@DocumentId public java.lang.Long getId()
public void setId(java.lang.Long id)
IObject
public java.lang.Integer getVersion()
getVersion
in interface IMutable
public void setVersion(java.lang.Integer version)
IMutable
setVersion
in interface IMutable
version
- Value for this objects version.protected java.util.Set<Session> getSessions()
protected void setSessions(java.util.Set<Session> sessions)
public int sizeOfSessions()
public java.util.Iterator<Session> iterateSessions()
EmptyIterator
. To test for a null collection,
see of sizeOfSessions()
is less than zero.public java.util.Collection<Session> unmodifiableSessions()
public <E> java.util.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(java.util.Collection<Session> targets)
public void removeSession(Session target)
public void removeSessionSet(java.util.Collection<Session> targets)
public void clearSessions()
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public java.lang.String getUuid()
public void setUuid(java.lang.String uuid)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public java.lang.String getConn()
public void setConn(java.lang.String conn)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public java.sql.Timestamp getUp()
public void setUp(java.sql.Timestamp up)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public java.sql.Timestamp getDown()
public void setDown(java.sql.Timestamp down)
@Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public java.lang.Integer getScale()
public void setScale(java.lang.Integer scale)
protected java.util.Set<NodeAnnotationLink> getAnnotationLinks()
protected void setAnnotationLinks(java.util.Set<NodeAnnotationLink> annotationLinks)
public int sizeOfAnnotationLinks()
sizeOfAnnotationLinks
in interface IAnnotated
public java.util.Iterator<NodeAnnotationLink> iterateAnnotationLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfAnnotationLinks()
is less than zero.iterateAnnotationLinks
in interface IAnnotated
public java.util.Collection<NodeAnnotationLink> unmodifiableAnnotationLinks()
unmodifiableAnnotationLinks
in interface IAnnotated
public <E> java.util.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(java.util.Collection<NodeAnnotationLink> targets)
public void removeNodeAnnotationLink(NodeAnnotationLink target)
public void removeNodeAnnotationLinkSet(java.util.Collection<NodeAnnotationLink> targets)
public NodeAnnotationLink linkAnnotation(Annotation addition)
linkAnnotation
in interface IAnnotated
public void addNodeAnnotationLink(NodeAnnotationLink link, boolean bothSides)
public java.util.Iterator<Annotation> linkedAnnotationIterator()
ConcurrentModificationException
.
Use linkedAnnotationList()
instead.linkedAnnotationIterator
in interface IAnnotated
public java.util.Set<NodeAnnotationLink> findNodeAnnotationLink(Annotation target)
public java.util.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> java.util.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
protected void setAnnotationLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map)
public java.util.Map<java.lang.Long,java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
public java.util.Set<java.lang.String> fields()
IObject
public java.lang.Object retrieve(java.lang.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(java.lang.String field, java.lang.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(java.lang.String propertyName)
Version: 5.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.