Project

General

Profile

Download (1.78 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.strategy.cache.taxon;
10

    
11
import java.util.List;
12

    
13
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
14
import eu.etaxonomy.cdm.strategy.cache.HTMLTagRules;
15
import eu.etaxonomy.cdm.strategy.cache.TaggedText;
16
import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;
17

    
18
/**
19
 * A name cache rendering strategy for all TaxonNameBase subclasses.
20
 * Different TaxonNameBase subclasses could have different strategies.
21
 *
22
 * @author a.mueller
23
 *
24
 * @param <T> The concrete TaxonName class this strategy applies for
25
 */
26
public interface ITaxonCacheStrategy<T extends TaxonBase> extends IIdentifiableEntityCacheStrategy<T> {
27

    
28
    /**
29
     * Returns a list of name typified tokens that together make up the name (including authorship etc.).
30
     * A token (taggedText) is a string and a type which indicates which part of a name the text
31
     * belongs to. Types may be name (indicating a core part of the name, e.g. a name epithet),
32
     * author (indicating an authorship part), rank, reference, etc.).
33
     * <BR>
34
     * Example: ["Abies"/name,"alba"/name,Rank.SUBSPECIES/rank,"alpina"/name,
35
     * "Greuther (L.)"/authorship]
36
     *
37
     * @param taxonNameBase
38
     * @return the tagged list, <code>null</code> if taxonName is <code>null</code>
39
     */
40
    public List<TaggedText> getTaggedTitle(T taxonBase);
41

    
42

    
43
	/**
44
	 * Returns the title cache tagged by html tags according to tag rules.
45
	 * @param nonViralName
46
	 * @param htmlTagRules
47
	 * @return
48
	 */
49
	public String getTitleCache(T taxonBase, HTMLTagRules htmlTagRules);
50

    
51
}
(1-1/3)