2.17.2: 2011-06-17

Class ProtocolLoader

  extended by net.sf.basedb.util.overview.loader.AbstractNodeLoader<I>
      extended by net.sf.basedb.util.overview.loader.BasicItemNodeLoader<Protocol>
          extended by net.sf.basedb.util.overview.loader.ProtocolLoader
All Implemented Interfaces:

public class ProtocolLoader
extends BasicItemNodeLoader<Protocol>

Node loader implementation for protocols. Protocols must be loaded as property nodes. It can't be a root node or a forward/reverse-loading node. The property node itself is created as a property-loading node that loads the protocol parameters when asked to load it's children.

Last modified
$Date: 2009-05-20 07:45:22 +0200 (Wed, 20 May 2009) $

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
 Node createPropertyNode(DbControl dc, OverviewContext context, Node parentNode)
          Create a property node for the given parent node.
protected  void loadPropertyChildNodes(DbControl dc, OverviewContext context, Node protocolNode)
          Loads annotations and protocol parameters for the given protocol node.
Methods inherited from class net.sf.basedb.util.overview.loader.BasicItemNodeLoader
createItemNode, createRootNode, getNodeFactory, getNodeFactory, getNodeLoader, getNodeLoaderFactory, getNodeValidator, getNodeValidatorFactory, postValidateFolder
Methods inherited from class net.sf.basedb.util.overview.loader.AbstractNodeLoader
createForwardNode, createReverseNode, loadChildNodes, loadChildNodesOfFolderNode, loadChildNodesOfItemNode, loadForwardChildNodes, loadReverseChildNodes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ProtocolLoader()
Method Detail


public Node createPropertyNode(DbControl dc,
                               OverviewContext context,
                               Node parentNode)
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 be ChildNodeDirection.PROPERTY in case the property has sub-properties. One example is the ProtocolLoader 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 interface NodeLoader<Protocol>
createPropertyNode in class AbstractNodeLoader<Protocol>
dc - The DbControl to use for database access
context - The overview context
parentNode - The parent node
A node (may be a folder-type node with many subnodes), or null


protected void loadPropertyChildNodes(DbControl dc,
                                      OverviewContext context,
                                      Node protocolNode)
Loads annotations and protocol parameters for the given protocol node.

loadPropertyChildNodes in class AbstractNodeLoader<Protocol>
See Also:
RawBioAssayLoader.createForwardNode(DbControl, OverviewContext, Node)

2.17.2: 2011-06-17