Package net.sf.basedb.util.overview.node
Class BioPlateNameGenerator
java.lang.Object
net.sf.basedb.util.overview.node.NameableNameGenerator<BioPlate>
net.sf.basedb.util.overview.node.BioPlateNameGenerator
- All Implemented Interfaces:
NodeNameGenerator<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]
. If the parent
node is a bioplate event, it appends the BioPlateEventParticipant.getRole()
to the title.- Since:
- 3.2
- Author:
- Nicklas
- Last modified
- $Date$
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBioPlateNameGenerator
(String namePrefix, String titlePrefix) Create a new name generator. -
Method Summary
Modifier and TypeMethodDescriptiongetNodeTitle
(BioPlate item, Node parentNode) The base of the title is generated by the superclass.void
setCurrentBioWell
(BioWell well) Set the current biowell object that should be used when generating names for bioplates that are reached by navigating via a biomaterial.void
setCurrentEventParticipant
(BioPlateEventParticipant participant) Set the current bioplate event participant object that should be used when generating names for bioplates that are part of a bioplate event.Methods inherited from class net.sf.basedb.util.overview.node.NameableNameGenerator
getDeniedNodeName, getDeniedNodeTitle, getMissingNodeName, getMissingNodeTitle, getNodeName
-
Field Details
-
currentParticipant
-
currentWell
-
-
Constructor Details
-
BioPlateNameGenerator
Create a new name generator.- Parameters:
namePrefix
- The prefix to use in node namestitlePrefix
- The prefix to use in node titles
-
-
Method Details
-
getNodeTitle
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. If the parent node is a bioplate event, the role of the bioplate in the event is added.- Specified by:
getNodeTitle
in interfaceNodeNameGenerator<BioPlate>
- Overrides:
getNodeTitle
in classNameableNameGenerator<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
-
setCurrentEventParticipant
Set the current bioplate event participant object that should be used when generating names for bioplates that are part of a bioplate event.- Since:
- 3.3
-
setCurrentBioWell
Set the current biowell object that should be used when generating names for bioplates that are reached by navigating via a biomaterial.- Since:
- 3.3
-