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.name;
|
10
|
|
11
|
import java.util.List;
|
12
|
|
13
|
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
|
14
|
import eu.etaxonomy.cdm.strategy.TaggedText;
|
15
|
import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;
|
16
|
|
17
|
/**
|
18
|
* A name cache rendering strategy for all TaxonNameBase subclasses.
|
19
|
* Different TaxonNameBase subclasses could have different strategies.
|
20
|
*
|
21
|
* @author a.mueller
|
22
|
*
|
23
|
* @param <T> The concrete TaxonName class this strategy applies for
|
24
|
*/
|
25
|
public interface INameCacheStrategy<T extends TaxonNameBase> extends IIdentifiableEntityCacheStrategy<T> {
|
26
|
|
27
|
|
28
|
/**
|
29
|
* Returns an array of name tokens that together make up the full name.
|
30
|
* A token can be a String (for name parts), Rank, AuthorTeam (for entire authorship string),
|
31
|
* Date or Reference
|
32
|
* Example: ["Abies","alba",Rank.SUBSPECIES,"alpina",AuthorTeam("Greuther (L.)")]
|
33
|
*
|
34
|
* @param taxonNameBase
|
35
|
* @return
|
36
|
*/
|
37
|
public List<Object> getTaggedName(T taxonNameBase);
|
38
|
|
39
|
/**
|
40
|
* Returns a list of name typified tokens that together make up the name (including authorship etc.).
|
41
|
* A token (taggedText) is a string and a type which indicates which part of a name the text
|
42
|
* belongs to. Types may be name (indicating a core part of the name, e.g. a name epithet),
|
43
|
* author (indicating an authorship part), rank, reference, etc.).
|
44
|
* <BR>
|
45
|
* Example: ["Abies"/name,"alba"/name,Rank.SUBSPECIES/rank,"alpina"/name,
|
46
|
* "Greuther (L.)"/authorship]
|
47
|
*
|
48
|
* @param taxonNameBase
|
49
|
* @return the tagged list, <code>null</code> if taxonName is <code>null</code>
|
50
|
*/
|
51
|
public List<TaggedText> getTaggedTitle(T taxonName);
|
52
|
|
53
|
/**
|
54
|
* Same as {@link #getTaggedTitle(TaxonNameBase)} but also includes the reference and
|
55
|
* the nomenclatural status in the result.
|
56
|
* @param taxonName
|
57
|
* @return
|
58
|
*/
|
59
|
public List<TaggedText> getTaggedFullTitle(T taxonName);
|
60
|
|
61
|
|
62
|
/**
|
63
|
* Returns the full title cache as a string.
|
64
|
* @param taxonNameBase
|
65
|
* @return
|
66
|
*/
|
67
|
public String getFullTitleCache(T taxonNameBase);
|
68
|
}
|