Package net.sf.basedb.util.overview.node
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 Summary
Fields Modifier and Type Field Description private BioWell
currentWell
-
Constructor Summary
Constructors Constructor Description BioWellNameGenerator()
Create a new biowell name generator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String
getCurrentNodeName()
private String
getCurrentTitlePrefix()
String
getDeniedNodeName(Node parentNode)
Generate a name for a node when the item exists, but the current user doesn't have permission to access read the item.String
getDeniedNodeTitle(Node parentNode)
Generate a title for a node when the item exists, but the current user doesn't have permission to access read the item.String
getMissingNodeName(Node parentNode)
Generate a name for a node when the item is missing.String
getMissingNodeTitle(Node parentNode)
Generate a title for a node when the item is missing.String
getNodeName(MeasuredBioMaterial item, Node parentNode)
Generate a name for the new node that is about to be created.String
getNodeTitle(MeasuredBioMaterial item, Node parentNode)
Generate a title for the new node that is about to be created.void
setCurrentWell(BioWell well)
Set the well we are currently working with.
-
-
-
Field Detail
-
currentWell
private BioWell currentWell
-
-
Method Detail
-
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 interfaceNodeNameGenerator<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 interfaceNodeNameGenerator<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 interfaceNodeNameGenerator<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 interfaceNodeNameGenerator<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 interfaceNodeNameGenerator<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 interfaceNodeNameGenerator<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()
-
-