Project

General

Profile

Download (3.57 KB) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.cdm.model.description;
2

    
3
import java.util.List;
4
import java.util.Map;
5
import java.util.UUID;
6

    
7
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
8
import eu.etaxonomy.cdm.model.common.Language;
9
import eu.etaxonomy.cdm.model.common.TermVocabulary;
10
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
11

    
12
public class NameFeature extends DefinedTermBase<NameFeature>{
13

    
14
	private static NameFeature PROTOLOGUE;
15
	private static NameFeature ADDITIONAL_PUBLICATION;
16
	
17
	
18
	private static final UUID uuidProtologue = UUID.fromString("7f1fd111-fc52-49f0-9e75-d0097f576b2d");
19
	private static final UUID uuidAdditionalPublication = UUID.fromString("cb2eab09-6d9d-4e43-8ad2-873f23400930");
20
	
21
/* ***************** CONSTRUCTOR AND FACTORY METHODS **********************************/
22
	
23

    
24
	/** 
25
	 * Class constructor: creates a new empty namefeature instance.
26
	 * 
27
	 * @see #NameFeature(String, String, String)
28
	 */
29
	public NameFeature() {
30
	}
31
	
32
	/** 
33
	 * Class constructor: creates a new namefeature instance with a description (in the {@link Language#DEFAULT() default language}),
34
	 * a label and a label abbreviation.
35
	 * 
36
	 * @param	term  		 the string (in the default language) describing the
37
	 * 						 new feature to be created 
38
	 * @param	label  		 the string identifying the new feature to be created
39
	 * @param	labelAbbrev  the string identifying (in abbreviated form) the
40
	 * 						 new feature to be created
41
	 * @see 				 #Feature()
42
	 */
43
	protected NameFeature(String term, String label, String labelAbbrev) {
44
		super(term, label, labelAbbrev);
45
	}
46

    
47
	/** 
48
	 * Creates a new empty namefeature instance.
49
	 * 
50
	 * @see #NewInstance(String, String, String)
51
	 */
52
	public static NameFeature NewInstance() {
53
		return new NameFeature();
54
	}
55
	
56
	/** 
57
	 * Creates a new namefeature instance with a description (in the {@link Language#DEFAULT() default language}),
58
	 * a label and a label abbreviation.
59
	 * 
60
	 * @param	term  		 the string (in the default language) describing the
61
	 * 						 new namefeature to be created 
62
	 * @param	label  		 the string identifying the new namefeature to be created
63
	 * @param	labelAbbrev  the string identifying (in abbreviated form) the
64
	 * 						 new namefeature to be created
65
	 * @see 				 #readCsvLine(List, Language)
66
	 * @see 				 #NewInstance()
67
	 */
68
	public static NameFeature NewInstance(String term, String label, String labelAbbrev){
69
		return new NameFeature(term, label, labelAbbrev);
70
	}
71

    
72
/* *************************************************************************************/
73
	
74
	@Override
75
	protected void setDefaultTerms(TermVocabulary<NameFeature> termVocabulary) {
76
		NameFeature.ADDITIONAL_PUBLICATION = termVocabulary.findTermByUuid(NameFeature.uuidAdditionalPublication);
77
		NameFeature.PROTOLOGUE = termVocabulary.findTermByUuid(NameFeature.uuidProtologue);
78
	}
79
	
80
	/**
81
	 * Returns the "protologue" feature. This feature can only be described
82
	 * with {@link TextData text data} reproducing the content of the protologue 
83
	 * (or some information about it) of the taxon name. 
84
	 * 
85
	 * 
86
	 */
87
	public static final NameFeature PROTOLOGUE(){
88
		return PROTOLOGUE;
89
	}
90

    
91
	/**
92
	 * Returns the "additional_publication" feature. This feature can only be
93
	 * described with {@link TextData text data} with information about a
94
	 * publication where a {@link TaxonNameBase taxon name} has also been published
95
	 * but which is not the {@link TaxonNameBase#getNomenclaturalReference() nomenclatural reference}.
96
	 *  
97
	 * 
98
	 */
99
	public static final NameFeature ADDITIONAL_PUBLICATION(){
100
		return ADDITIONAL_PUBLICATION;
101
	}
102

    
103
}
(16-16/36)