Project

General

Profile

Download (2.8 KB) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.cdm.strategy.parser;
2

    
3
import eu.etaxonomy.cdm.model.name.BotanicalName;
4
import eu.etaxonomy.cdm.model.name.Rank;
5
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
6
import eu.etaxonomy.cdm.strategy.IStrategy;
7

    
8

    
9
/**
10
 * @author a.mueller
11
 *
12
 */
13
public interface ITaxonNameParser<T extends TaxonNameBase> extends IStrategy {
14
	
15

    
16
	/**
17
	 * Parses the taxonname String and returns a TaxonNameBase. 
18
	 * If the String is not parseable the "hasProblem" bit is set to true.
19
 	 * Returns null if fullName == null.
20
	 * @param fullName TaxonNameBase with Author, Year, Reference etc.,
21
	 * @return TaxonNameBase, with rank = Rank.GENUS for all Uninomials. 
22
	 */
23
	public T parseFullName(String fullName);
24

    
25
	/**
26
	 * Parses the taxonname String and returns a TaxonNameBase. 
27
	 * If the String is not parseable the "hasProblem" bit is set to true.
28
 	 * Returns null if fullName == null.
29
	 * @param fullName TaxonNameBase with Author, Year, Reference etc.,
30
	 * @param rank
31
	 * @return TaxonNameBase name, with name.rank = rank for all Uninomials and name.rank = Rank.GENUS for rank = null  
32
	 */
33
	public T parseFullName(String fullName, Rank rank);
34

    
35
	/**
36
 	 * Parses the taxonname String and fills the result into the existing TaxonNameBase nameToBeFilled. 
37
	 * Name related fields are set to default (null for Strings and other objects like Authors and References and false for booleans).
38
	 * NameRelations are not changed.
39
	 * If the String is not parseable the "hasProblem" bit is set to true.
40
 	 * No change is done to nameToBeFilled if fullName == null.
41
	 * @param fullName TaxonNameBase with Author, Year, Reference etc.,
42
	 * @param rank
43
	 * @param nameToBeFilled The TaxonNameBaseToBeFilled
44
	 */
45
	public void parseFullName(T nameToBeFilled, String fullName, Rank rank, boolean makeEmpty);
46

    
47
	public T parseFullReference(String fullReference, Rank rank);
48

    
49
	public void parseFullReference(T nameToBeFilled, String fullReference, Rank rank, boolean makeEmpty);
50
	
51
	
52
	/**
53
	 * Parses the taxonname String and returns a TaxonNameBase. 
54
	 * If the String is not parseable the "hasProblem" bit is set to true.
55
 	 * Returns null if fullName == null.
56
	 * @param fullName TaxonNameBase without Author, Year, Reference etc.
57
	 * @param rank
58
	 * @return TaxonNameBase, with rank = Rank.GENUS for all Uninomials  
59
	 */
60
	public T parseSimpleName(String simpleName, Rank rank);
61

    
62
	/**
63
	 * Parses the taxonname String and returns a TaxonNameBase. 
64
	 * If the String is not parseable the "hasProblem" bit is set to true.
65
 	 * Returns null if fullName == null.
66
	 * @param fullName TaxonNameBase without Author, Year, Reference etc.
67
	 * @return TaxonNameBase name, with name.rank = rank for all Uninomials and name.rank = Rank.GENUS for rank = null  
68
	 */
69
	public T parseSimpleName(String simpleName);
70
	
71

    
72
	
73
	
74
}
(1-1/3)