3.0.1: 2011-11-10

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

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

public class ExtractNameGenerator
extends NameableNameGenerator<Extract>

Name generator implementation for Extract items. The implementation use the NameableNameGenerator but prefixes the node title with the name of the tag (if present). Eg. cy3: My labeled extract.

Version:
2.10
Author:
Nicklas
Last modified
$Date: 2011-09-19 12:50:09 +0200 (Mon, 19 Sep 2011) $

Constructor Summary
ExtractNameGenerator(String namePrefix, String titlePrefix)
          Create a new name generator.
 
Method Summary
 String getNodeTitle(Extract 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

ExtractNameGenerator

public ExtractNameGenerator(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(Extract item,
                           Node parentNode)
The base of the title is generated by the superclass. This implementation just prefixes the title with the name of the tag.

Specified by:
getNodeTitle in interface NodeNameGenerator<Extract>
Overrides:
getNodeTitle in class NameableNameGenerator<Extract>
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.0.1: 2011-11-10