Class AnnotationLoader
java.lang.Object
net.sf.basedb.util.overview.loader.AbstractNodeLoader<I>
net.sf.basedb.util.overview.loader.BasicItemNodeLoader<Annotation>
net.sf.basedb.util.overview.loader.AnnotationLoader
- All Implemented Interfaces:
NodeLoader<Annotation>
Node loader implementation for annotations. Annotations are
loaded as an end-point folder node with one child entry
for each annotation. It can never be root node or a forward/reverse-loading
node.
- Version:
- 2.10
- Author:
- Nicklas
- Last modified
- $Date$
-
Field Summary
Fields inherited from class net.sf.basedb.util.overview.loader.BasicItemNodeLoader
ALLOW_ROOT_NODE, allowAsRootNode, DENY_ROOT_NODE, factoryKey, nameGenerator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreatePropertyNode
(DbControl dc, OverviewContext context, Node parentNode) Create a property node for the given parent node.static Annotatable
getAnnotatableFromNode
(DbControl dc, Node node) Get the annotatable item from the node.Methods inherited from class net.sf.basedb.util.overview.loader.BasicItemNodeLoader
createItemNode, createRootNode, getNodeFactory, getNodeFactory, getNodeLoader, getNodeLoaderFactory, getNodeNameGenerator, getNodeValidator, getNodeValidatorFactory, postValidateFolder
Methods inherited from class net.sf.basedb.util.overview.loader.AbstractNodeLoader
createForwardNode, createReverseNode, loadChildNodes, loadChildNodesOfFolderNode, loadChildNodesOfItemNode, loadForwardChildNodes, loadPropertyChildNodes, loadReverseChildNodes
-
Constructor Details
-
AnnotationLoader
public AnnotationLoader()
-
-
Method Details
-
getAnnotatableFromNode
Get the annotatable item from the node. This is in most cases theNode.getItem()
item, but can also be the target item of anAnyToAny
node or the file of aFileSetMember
node.- Since:
- 3.17
-
createPropertyNode
Description copied from interface:NodeLoader
Create a property node for the given parent node. A property node is a node that is not on the main parent-child path. It is typically a node that can't be used a root node (for example, a protocol or software). If the parent node can have many properties of this type the loader can decide if it should first create a folder-type node and put the children inside the folder, or if all child nodes should be created directly in the parent node. In the first case, the folder node should be returned. In the latter case, null should be returned.The direction of the node(s) should usually be
ChildNodeDirection.NONE
, but it may also beChildNodeDirection.PROPERTY
in case the property has sub-properties. One example is theProtocolLoader
which loads the protocol parameters as child nodes.In case there is an error (permission denied, etc.)
ChildNodeDirection.NONE
should be used. If there is no property item null should be returned (but this may also indicate that more than one node was created).Errors, missing items, etc. should be reported as failures to the
OverviewContext
.- Specified by:
createPropertyNode
in interfaceNodeLoader<Annotation>
- Overrides:
createPropertyNode
in classAbstractNodeLoader<Annotation>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node- Returns:
- A node (may be a folder-type node with many subnodes), or null
-