3.2.4: 2013-12-06

net.sf.basedb.util.overview.node
Class BioPlateNameGenerator

java.lang.Object
  extended by net.sf.basedb.util.overview.node.NameableNameGenerator<BioPlate>
      extended by net.sf.basedb.util.overview.node.BioPlateNameGenerator
All Implemented Interfaces:
NodeNameGenerator<BioPlate>

public class BioPlateNameGenerator
extends NameableNameGenerator<BioPlate>

Name generator implementation for BioPlate items. The implementation use the NameableNameGenerator but appends the coordinate of the biomaterial if the parent node is a biomaterial node. Eg. My plate [A2].

Since:
3.2
Author:
Nicklas
Last modified
$Date$

Constructor Summary
BioPlateNameGenerator(String namePrefix, String titlePrefix)
          Create a new name generator.
 
Method Summary
 String getNodeTitle(BioPlate item, Node parentNode)
          The base of the title is generated by the superclass.
 
Methods inherited from class net.sf.basedb.util.overview.node.NameableNameGenerator
getDeniedNodeName, getDeniedNodeTitle, getMissingNodeName, getMissingNodeTitle, getNodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BioPlateNameGenerator

public BioPlateNameGenerator(String namePrefix,
                             String titlePrefix)
Create a new name generator.

Parameters:
namePrefix - The prefix to use in node names
titlePrefix - The prefix to use in node titles
Method Detail

getNodeTitle

public String getNodeTitle(BioPlate item,
                           Node parentNode)
The base of the title is generated by the superclass. This implementation adds a suffix to the title with the coordinate of the biomaterial if the parent node is a biomaterial node.

Specified by:
getNodeTitle in interface NodeNameGenerator<BioPlate>
Overrides:
getNodeTitle in class NameableNameGenerator<BioPlate>
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

3.2.4: 2013-12-06