Class BioWellNameGenerator

java.lang.Object
net.sf.basedb.util.overview.node.BioWellNameGenerator
All Implemented Interfaces:
NodeNameGenerator<MeasuredBioMaterial>

public class BioWellNameGenerator extends Object implements NodeNameGenerator<MeasuredBioMaterial>
Name generator implementation for biomaterial items that are located on a biowell. This name generator is used when loading biomaterial on a bioplate.
Since:
3.2
Author:
Nicklas
Last modified
$Date$
  • Field Details

    • currentWell

      private BioWell currentWell
  • Constructor Details

    • BioWellNameGenerator

      public BioWellNameGenerator()
      Create a new biowell name generator.
  • Method Details

    • getNodeTitle

      public String getNodeTitle(MeasuredBioMaterial item, Node parentNode)
      Description copied from interface: NodeNameGenerator
      Generate a title for the new node that is about to be created.
      Specified by:
      getNodeTitle in interface NodeNameGenerator<MeasuredBioMaterial>
      Parameters:
      item - The item that is attached to the node (never null)
      parentNode - The parent node of the new node
      Returns:
      A title for the node
    • getNodeName

      public String getNodeName(MeasuredBioMaterial item, Node parentNode)
      Description copied from interface: NodeNameGenerator
      Generate a name for the new node that is about to be created.
      Specified by:
      getNodeName in interface NodeNameGenerator<MeasuredBioMaterial>
      Parameters:
      item - The item that is attached to the node (never null)
      parentNode - The parent node of the new node
      Returns:
      A name for the node
    • getMissingNodeTitle

      public String getMissingNodeTitle(Node parentNode)
      Description copied from interface: NodeNameGenerator
      Generate a title for a node when the item is missing.
      Specified by:
      getMissingNodeTitle in interface NodeNameGenerator<MeasuredBioMaterial>
      Parameters:
      parentNode - The parent node
      Returns:
      A title for the node
    • getMissingNodeName

      public String getMissingNodeName(Node parentNode)
      Description copied from interface: NodeNameGenerator
      Generate a name for a node when the item is missing.
      Specified by:
      getMissingNodeName in interface NodeNameGenerator<MeasuredBioMaterial>
      Parameters:
      parentNode - The parent node
      Returns:
      A name for the node
    • getDeniedNodeTitle

      public String getDeniedNodeTitle(Node parentNode)
      Description copied from interface: NodeNameGenerator
      Generate a title for a node when the item exists, but the current user doesn't have permission to access read the item.
      Specified by:
      getDeniedNodeTitle in interface NodeNameGenerator<MeasuredBioMaterial>
      Parameters:
      parentNode - The parent node
      Returns:
      A name for the node
    • getDeniedNodeName

      public String getDeniedNodeName(Node parentNode)
      Description copied from interface: NodeNameGenerator
      Generate a name for a node when the item exists, but the current user doesn't have permission to access read the item.
      Specified by:
      getDeniedNodeName in interface NodeNameGenerator<MeasuredBioMaterial>
      Parameters:
      parentNode - The parent node
      Returns:
      A name for the node
    • setCurrentWell

      public void setCurrentWell(BioWell well)
      Set the well we are currently working with. The name generator need to know this before trying to generate node names and titles since it is possible that access to the biomaterial in the well is denied.
      Parameters:
      well - The current biowell
    • getCurrentNodeName

      private String getCurrentNodeName()
    • getCurrentTitlePrefix

      private String getCurrentTitlePrefix()