2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.model
.description
;
13 import java
.util
.HashSet
;
14 import java
.util
.List
;
17 import java
.util
.UUID
;
19 import javax
.persistence
.Entity
;
20 import javax
.persistence
.FetchType
;
21 import javax
.persistence
.JoinTable
;
22 import javax
.persistence
.ManyToMany
;
23 import javax
.persistence
.OneToMany
;
24 import javax
.xml
.bind
.annotation
.XmlAccessType
;
25 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
26 import javax
.xml
.bind
.annotation
.XmlElement
;
27 import javax
.xml
.bind
.annotation
.XmlElementWrapper
;
28 import javax
.xml
.bind
.annotation
.XmlIDREF
;
29 import javax
.xml
.bind
.annotation
.XmlRootElement
;
30 import javax
.xml
.bind
.annotation
.XmlSchemaType
;
31 import javax
.xml
.bind
.annotation
.XmlType
;
33 import org
.apache
.log4j
.Logger
;
34 import org
.hibernate
.envers
.Audited
;
35 import org
.hibernate
.search
.annotations
.Indexed
;
37 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
38 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
39 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
40 import eu
.etaxonomy
.cdm
.model
.name
.BotanicalName
;
41 import eu
.etaxonomy
.cdm
.model
.name
.HybridRelationshipType
;
42 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalCode
;
43 import eu
.etaxonomy
.cdm
.model
.name
.TaxonNameBase
;
44 import eu
.etaxonomy
.cdm
.model
.occurrence
.Specimen
;
45 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
48 * The class for individual properties (also designed as character, type or
49 * category) of observed phenomena able to be described or measured. It also
50 * covers categories of informations on {@link TaxonNameBase taxon names} not
51 * taken in account in {@link NomenclaturalCode nomenclature}.<BR>
52 * Descriptions require features in order to be structured and disaggregated
53 * in {@link DescriptionElementBase description elements}.<BR>
54 * Experts do not use the word feature for the actual description
55 * but only for the property itself. Therefore naming this class FeatureType
56 * would have leaded to confusion.
58 * Since features are {@link DefinedTermBase defined terms} they have a hierarchical
59 * structure that allows to specify ("kind of") or generalize
60 * ("generalization of") features. "Kind of" / "generalization of" relations
61 * are bidirectional (a feature F1 is a "Kind of" a feature F2 if and only
62 * if the feature F2 is a "generalization of" the feature F1. This hierarchical
63 * structure has nothing in common with {@link FeatureTree feature trees} used for determination.
65 * A standard set of feature instances will be automatically
66 * created as the project starts. But this class allows to extend this standard
67 * set by creating new instances of additional features if needed.<BR>
69 * This class corresponds to DescriptionsSectionType according to the SDD
74 * @created 08-Nov-2007 13:06:24
76 @XmlAccessorType(XmlAccessType
.FIELD
)
77 @XmlType(name
="Feature", factoryMethod
="NewInstance", propOrder
= {
79 "supportsQuantitativeData",
80 "supportsDistribution",
81 "supportsIndividualAssociation",
82 "supportsTaxonInteraction",
83 "supportsCommonTaxonName",
84 "recommendedModifierEnumeration",
85 "recommendedStatisticalMeasures",
86 "supportedCategoricalEnumerations"
88 @XmlRootElement(name
= "Feature")
90 @Indexed(index
= "eu.etaxonomy.cdm.model.common.DefinedTermBase")
92 public class Feature
extends DefinedTermBase
<Feature
> {
93 private static final long serialVersionUID
= 6754598791831848704L;
94 private static final Logger logger
= Logger
.getLogger(Feature
.class);
95 private static Feature IMAGE
;
96 private static Feature CULTIVATION
;
97 private static Feature CONSERVATION
;
98 private static Feature USES
;
99 private static Feature ADDITIONAL_PUBLICATION
;
100 private static Feature CITATION
;
101 private static Feature OCCURRENCE
;
102 private static Feature PHENOLOGY
;
103 private static Feature COMMON_NAME
;
104 private static Feature PROTOLOG
;
105 private static Feature INTRODUCTION
;
106 private static Feature DIAGNOSIS
;
107 private static Feature ETYMOLOGY
;
108 private static Feature MATERIALS_METHODS
;
109 private static Feature MATERIALS_EXAMINED
;
110 private static Feature KEY
;
111 private static Feature BIOLOGY_ECOLOGY
;
112 private static Feature ECOLOGY
;
113 private static Feature DISCUSSION
;
114 private static Feature DISTRIBUTION
;
115 private static Feature DESCRIPTION
;
116 private static Feature UNKNOWN
;
118 @XmlElement(name
= "SupportsTextData")
119 private boolean supportsTextData
;
121 @XmlElement(name
= "SupportsQuantitativeData")
122 private boolean supportsQuantitativeData
;
124 @XmlElement(name
= "SupportsDistribution")
125 private boolean supportsDistribution
;
127 @XmlElement(name
= "SupportsIndividualAssociation")
128 private boolean supportsIndividualAssociation
;
130 @XmlElement(name
= "SupportsTaxonInteraction")
131 private boolean supportsTaxonInteraction
;
133 @XmlElement(name
= "SupportsCategoricalData")
134 private boolean supportsCategoricalData
;
137 * FIXME Should this be Many-To-Many or do we expect each Feature to have its own unique modifier enums?
139 @XmlElementWrapper(name
= "RecommendedModifierEnumerations")
140 @XmlElement(name
= "RecommendedModifierEnumeration")
142 @XmlSchemaType(name
= "IDREF")
143 @OneToMany(fetch
= FetchType
.LAZY
)
144 @JoinTable(name
="DefinedTermBase_RecommendedModifierEnumeration")
145 private Set
<TermVocabulary
<Modifier
>> recommendedModifierEnumeration
= new HashSet
<TermVocabulary
<Modifier
>>();
147 @XmlElementWrapper(name
= "RecommendedStatisticalMeasures")
148 @XmlElement(name
= "RecommendedStatisticalMeasure")
150 @XmlSchemaType(name
= "IDREF")
151 @ManyToMany(fetch
= FetchType
.LAZY
)
152 @JoinTable(name
="DefinedTermBase_StatisticalMeasure")
153 private Set
<StatisticalMeasure
> recommendedStatisticalMeasures
= new HashSet
<StatisticalMeasure
>();
156 * FIXME Should this be Many-To-Many or do we expect each Feature to have its own unique state enums?
158 @XmlElementWrapper(name
= "SupportedCategoricalEnumerations")
159 @XmlElement(name
= "SupportedCategoricalEnumeration")
161 @XmlSchemaType(name
= "IDREF")
162 @OneToMany(fetch
= FetchType
.LAZY
)
163 @JoinTable(name
="DefinedTermBase_SupportedCategoricalEnumeration")
164 private Set
<TermVocabulary
<State
>> supportedCategoricalEnumerations
= new HashSet
<TermVocabulary
<State
>>();
165 @XmlElement(name
= "SupportsCommonTaxonName")
166 private boolean supportsCommonTaxonName
;
168 /* ***************** CONSTRUCTOR AND FACTORY METHODS **********************************/
172 * Class constructor: creates a new empty feature instance.
174 * @see #Feature(String, String, String)
181 * Class constructor: creates a new feature instance with a description (in the {@link Language#DEFAULT() default language}),
182 * a label and a label abbreviation.
184 * @param term the string (in the default language) describing the
185 * new feature to be created
186 * @param label the string identifying the new feature to be created
187 * @param labelAbbrev the string identifying (in abbreviated form) the
188 * new feature to be created
191 protected Feature(String term
, String label
, String labelAbbrev
) {
192 super(term
, label
, labelAbbrev
);
196 * Creates a new empty feature instance.
198 * @see #NewInstance(String, String, String)
200 public static Feature
NewInstance() {
201 return new Feature();
205 * Creates a new feature instance with a description (in the {@link Language#DEFAULT() default language}),
206 * a label and a label abbreviation.
208 * @param term the string (in the default language) describing the
209 * new feature to be created
210 * @param label the string identifying the new feature to be created
211 * @param labelAbbrev the string identifying (in abbreviated form) the
212 * new feature to be created
213 * @see #readCsvLine(List, Language)
214 * @see #NewInstance()
216 public static Feature
NewInstance(String term
, String label
, String labelAbbrev
){
217 return new Feature(term
, label
, labelAbbrev
);
220 /* *************************************************************************************/
223 * Returns the boolean value of the flag indicating whether <i>this</i>
224 * feature can be described with {@link QuantitativeData quantitative data} (true)
225 * or not (false). If this flag is set <i>this</i> feature can only apply to
226 * {@link TaxonDescription taxon descriptions} or {@link SpecimenDescription specimen descriptions}.
228 * @return the boolean value of the supportsQuantitativeData flag
230 public boolean supportsQuantitativeData() {
231 return supportsQuantitativeData
;
235 * @see #isSupportsQuantitativeData()
237 public void setSupportsQuantitativeData(boolean supportsQuantitativeData
) {
238 this.supportsQuantitativeData
= supportsQuantitativeData
;
242 * Returns the boolean value of the flag indicating whether <i>this</i>
243 * feature can be described with {@link TextData text data} (true)
246 * @return the boolean value of the supportsTextData flag
248 public boolean supportsTextData() {
249 return supportsTextData
;
253 * @see #isSupportsTextData()
255 public void setSupportsTextData(boolean supportsTextData
) {
256 this.supportsTextData
= supportsTextData
;
260 * Returns the boolean value of the flag indicating whether <i>this</i>
261 * feature can be described with {@link Distribution distribution} objects
262 * (true) or not (false). This flag is set if and only if <i>this</i> feature
263 * is the {@link #DISTRIBUTION() distribution feature}.
265 * @return the boolean value of the supportsDistribution flag
267 public boolean supportsDistribution() {
268 return supportsDistribution
;
272 * @see #isSupportsDistribution()
274 public void setSupportsDistribution(boolean supportsDistribution
) {
275 this.supportsDistribution
= supportsDistribution
;
279 * Returns the boolean value of the flag indicating whether <i>this</i>
280 * feature can be described with {@link IndividualsAssociation individuals associations}
281 * (true) or not (false).
283 * @return the boolean value of the supportsIndividualAssociation flag
285 public boolean supportsIndividualAssociation() {
286 return supportsIndividualAssociation
;
290 * @see #isSupportsIndividualAssociation()
292 public void setSupportsIndividualAssociation(
293 boolean supportsIndividualAssociation
) {
294 this.supportsIndividualAssociation
= supportsIndividualAssociation
;
298 * Returns the boolean value of the flag indicating whether <i>this</i>
299 * feature can be described with {@link TaxonInteraction taxon interactions}
300 * (true) or not (false).
302 * @return the boolean value of the supportsTaxonInteraction flag
304 public boolean supportsTaxonInteraction() {
305 return supportsTaxonInteraction
;
309 * @see #isSupportsTaxonInteraction()
311 public void setSupportsTaxonInteraction(boolean supportsTaxonInteraction
) {
312 this.supportsTaxonInteraction
= supportsTaxonInteraction
;
316 * Returns the boolean value of the flag indicating whether <i>this</i>
317 * feature can be described with {@link CommonTaxonName common names}
318 * (true) or not (false). This flag is set if and only if <i>this</i> feature
319 * is the {@link #COMMON_NAME() common name feature}.
321 * @return the boolean value of the supportsCommonTaxonName flag
323 public boolean supportsCommonTaxonName() {
324 return supportsCommonTaxonName
;
328 * @see #isSupportsTaxonInteraction()
330 public void setSupportsCommonTaxonName(boolean supportsCommonTaxonName
) {
331 this.supportsCommonTaxonName
= supportsCommonTaxonName
;
335 * Returns the boolean value of the flag indicating whether <i>this</i>
336 * feature can be described with {@link CategoricalData categorical data}
337 * (true) or not (false).
339 * @return the boolean value of the supportsCategoricalData flag
341 public boolean supportsCategoricalData() {
342 return supportsCategoricalData
;
346 * @see #supportsCategoricalData()
348 public void setSupportsCategoricalData(boolean supportsCategoricalData
) {
349 this.supportsCategoricalData
= supportsCategoricalData
;
354 * Returns the set of {@link TermVocabulary term vocabularies} containing the
355 * {@link Modifier modifiers} recommended to be used for {@link DescriptionElementBase description elements}
356 * with <i>this</i> feature.
359 public Set
<TermVocabulary
<Modifier
>> getRecommendedModifierEnumeration() {
360 return recommendedModifierEnumeration
;
364 * Adds a {@link TermVocabulary term vocabulary} (with {@link Modifier modifiers}) to the set of
365 * {@link #getRecommendedModifierEnumeration() recommended modifier vocabularies} assigned
366 * to <i>this</i> feature.
368 * @param recommendedModifierEnumeration the term vocabulary to be added
369 * @see #getRecommendedModifierEnumeration()
371 public void addRecommendedModifierEnumeration(
372 TermVocabulary
<Modifier
> recommendedModifierEnumeration
) {
373 this.recommendedModifierEnumeration
.add(recommendedModifierEnumeration
);
376 * Removes one element from the set of {@link #getRecommendedModifierEnumeration() recommended modifier vocabularies}
377 * assigned to <i>this</i> feature.
379 * @param recommendedModifierEnumeration the term vocabulary which should be removed
380 * @see #getRecommendedModifierEnumeration()
381 * @see #addRecommendedModifierEnumeration(TermVocabulary)
383 public void removeRecommendedModifierEnumeration(
384 TermVocabulary
<Modifier
> recommendedModifierEnumeration
) {
385 this.recommendedModifierEnumeration
.remove(recommendedModifierEnumeration
);
389 * Returns the set of {@link StatisticalMeasure statistical measures} recommended to be used
390 * in case of {@link QuantitativeData quantitative data} with <i>this</i> feature.
392 public Set
<StatisticalMeasure
> getRecommendedStatisticalMeasures() {
393 return recommendedStatisticalMeasures
;
397 * Adds a {@link StatisticalMeasure statistical measure} to the set of
398 * {@link #getRecommendedStatisticalMeasures() recommended statistical measures} assigned
399 * to <i>this</i> feature.
401 * @param recommendedStatisticalMeasure the statistical measure to be added
402 * @see #getRecommendedStatisticalMeasures()
404 public void addRecommendedStatisticalMeasure(
405 StatisticalMeasure recommendedStatisticalMeasure
) {
406 this.recommendedStatisticalMeasures
.add(recommendedStatisticalMeasure
);
409 * Removes one element from the set of {@link #getRecommendedStatisticalMeasures() recommended statistical measures}
410 * assigned to <i>this</i> feature.
412 * @param recommendedStatisticalMeasure the statistical measure which should be removed
413 * @see #getRecommendedStatisticalMeasures()
414 * @see #addRecommendedStatisticalMeasure(StatisticalMeasure)
416 public void removeRecommendedStatisticalMeasure(
417 StatisticalMeasure recommendedStatisticalMeasure
) {
418 this.recommendedStatisticalMeasures
.remove(recommendedStatisticalMeasure
);
422 * Returns the set of {@link TermVocabulary term vocabularies} containing the list of
423 * possible {@link State states} to be used in {@link CategoricalData categorical data}
424 * with <i>this</i> feature.
427 public Set
<TermVocabulary
<State
>> getSupportedCategoricalEnumerations() {
428 return supportedCategoricalEnumerations
;
432 * Adds a {@link TermVocabulary term vocabulary} to the set of
433 * {@link #getSupportedCategoricalEnumerations() supported state vocabularies} assigned
434 * to <i>this</i> feature.
436 * @param supportedCategoricalEnumeration the term vocabulary which should be removed
437 * @see #getSupportedCategoricalEnumerations()
439 public void addSupportedCategoricalEnumeration(
440 TermVocabulary
<State
> supportedCategoricalEnumeration
) {
441 this.supportedCategoricalEnumerations
.add(supportedCategoricalEnumeration
);
444 * Removes one element from the set of {@link #getSupportedCategoricalEnumerations() supported state vocabularies}
445 * assigned to <i>this</i> feature.
447 * @param supportedCategoricalEnumeration the term vocabulary which should be removed
448 * @see #getSupportedCategoricalEnumerations()
449 * @see #addSupportedCategoricalEnumeration(TermVocabulary)
451 public void removeSupportedCategoricalEnumeration(
452 TermVocabulary
<State
> supportedCategoricalEnumeration
) {
453 this.supportedCategoricalEnumerations
.remove(supportedCategoricalEnumeration
);
456 private static final UUID uuidUnknown
= UUID
.fromString("910307f1-dc3c-452c-a6dd-af5ac7cd365c");
457 private static final UUID uuidDescription
= UUID
.fromString("9087cdcd-8b08-4082-a1de-34c9ba9fb493");
458 private static final UUID uuidDistribution
= UUID
.fromString("9fc9d10c-ba50-49ee-b174-ce83fc3f80c6");
459 private static final UUID uuidEcology
= UUID
.fromString("aa923827-d333-4cf5-9a5f-438ae0a4746b");
460 private static final UUID uuidBiologyEcology
= UUID
.fromString("9832e24f-b670-43b4-ac7c-20a7261a1d8c");
461 private static final UUID uuidKey
= UUID
.fromString("a677f827-22b9-4205-bb37-11cb48dd9106");
462 private static final UUID uuidMaterialsExamined
= UUID
.fromString("7c0c7571-a864-47c1-891d-01f59000dae1");
463 private static final UUID uuidMaterialsMethods
= UUID
.fromString("1e87d9c3-0844-4a03-9686-773e2ccb3ab6");
464 private static final UUID uuidEtymology
= UUID
.fromString("dd653d48-355c-4aec-a4e7-724f6eb29f8d");
465 private static final UUID uuidDiagnosis
= UUID
.fromString("d43d8501-ceab-4caa-9e51-e87138528fac");
466 private static final UUID uuidProtolog
= UUID
.fromString("7f1fd111-fc52-49f0-9e75-d0097f576b2d");
467 private static final UUID uuidCommonName
= UUID
.fromString("fc810911-51f0-4a46-ab97-6562fe263ae5");
468 private static final UUID uuidPhenology
= UUID
.fromString("a7786d3e-7c58-4141-8416-346d4c80c4a2");
469 private static final UUID uuidOccurrence
= UUID
.fromString("5deff505-1a32-4817-9a74-50e6936fd630");
470 private static final UUID uuidCitation
= UUID
.fromString("99b2842f-9aa7-42fa-bd5f-7285311e0101");
471 private static final UUID uuidAdditionalPublication
= UUID
.fromString("cb2eab09-6d9d-4e43-8ad2-873f23400930");
472 private static final UUID uuidUses
= UUID
.fromString("e5374d39-b210-47c7-bec1-bee05b5f1cb6");
473 private static final UUID uuidConservation
= UUID
.fromString("4518fc20-2492-47de-b345-777d2b83c9cf");
474 private static final UUID uuidCultivation
= UUID
.fromString("e28965b2-a367-48c5-b954-8afc8ac2c69b");
475 private static final UUID uuidIntroduction
= UUID
.fromString("e75255ca-8ff4-4905-baad-f842927fe1d3");
476 private static final UUID uuidDiscussion
= UUID
.fromString("d3c4cbb6-0025-4322-886b-cd0156753a25");
477 private static final UUID uuidImage
= UUID
.fromString("84193b2c-327f-4cce-90ef-c8da18fd5bb5");
480 // private static final UUID uuidDistribution = UUID.fromString("");
481 // private static final UUID uuidDistribution = UUID.fromString("");
482 // private static final UUID uuidDistribution = UUID.fromString("");
484 // "86bd920d-f8c5-48b9-af1d-03f63c31de5c",,"Abstract","Abstract"
485 // "489bf358-b78a-45e2-a691-f9f3f10446ce",,"Synopsis","Synopsis"
486 // "89d3b005-9876-4923-89d9-60eb75b9583b",,"Multiple","Multiple"
487 // "555a46bc-211a-476f-a022-c472970d6f8b",,"Acknowledgments","Acknowledgments"
491 * Creates and returns a new feature instance on the basis of a given string
492 * list (containing an UUID, an URI, a label and a description) and a given
493 * {@link Language language} to be associated with the description. Furthermore
494 * the flags concerning the supported subclasses of {@link DescriptionElementBase description elements}
495 * are set according to a particular string belonging to the given
497 * This method overrides the readCsvLine method from {@link DefinedTermBase#readCsvLine(List, Language) DefinedTermBase}.
499 * @param csvLine the string list with elementary information for attributes
500 * @param lang the language in which the description has been formulated
501 * @see #NewInstance(String, String, String)
504 public Feature
readCsvLine(Class
<Feature
> termClass
, List
<String
> csvLine
, Map
<UUID
,DefinedTermBase
> terms
) {
505 Feature newInstance
= super.readCsvLine(termClass
, csvLine
, terms
);
506 String text
= (String
)csvLine
.get(4);
507 if (text
!= null && text
.length() >= 6){
508 if ("1".equals(text
.substring(0, 1))){newInstance
.setSupportsTextData(true);};
509 if ("1".equals(text
.substring(1, 2))){newInstance
.setSupportsQuantitativeData(true);};
510 if ("1".equals(text
.substring(2, 3))){newInstance
.setSupportsDistribution(true);};
511 if ("1".equals(text
.substring(3, 4))){newInstance
.setSupportsIndividualAssociation(true);};
512 if ("1".equals(text
.substring(4, 5))){newInstance
.setSupportsTaxonInteraction(true);};
513 if ("1".equals(text
.substring(5, 6))){newInstance
.setSupportsCommonTaxonName(true);};
514 // if ("1".equals(text.substring(6, 7))){newInstance.setSupportsCategoricalData(true);};
520 * Returns the "unknown" feature. This feature allows to store values of
521 * {@link DescriptionElementBase description elements} even if it is momentarily
522 * not known what they mean.
524 public static final Feature
UNKNOWN(){
529 * Returns the "description" feature. This feature allows to handle global
530 * {@link DescriptionElementBase description elements} for a global {@link DescriptionBase description}.<BR>
531 * The "description" feature is the highest level feature.
533 public static final Feature
DESCRIPTION(){
538 * Returns the "distribution" feature. This feature allows to handle only
539 * {@link Distribution distributions}.
541 * @see #isSupportsDistribution()
543 public static final Feature
DISTRIBUTION(){
548 * Returns the "discussion" feature. This feature can only be described
549 * with {@link TextData text data}.
551 * @see #isSupportsTextData()
553 public static final Feature
DISCUSSION(){
558 * Returns the "ecology" feature. This feature only applies
559 * to {@link SpecimenDescription specimen descriptions} or to {@link TaxonDescription taxon descriptions}.<BR>
560 * The "ecology" feature generalizes all other possible features concerning
561 * ecological matters.
563 public static final Feature
ECOLOGY(){
568 * Returns the "biology_ecology" feature. This feature only applies
569 * to {@link SpecimenDescription specimen descriptions} or to {@link TaxonDescription taxon descriptions}.<BR>
570 * The "biology_ecology" feature generalizes all possible features concerning
571 * biological aspects of ecological matters.
575 public static final Feature
BIOLOGY_ECOLOGY(){
576 return BIOLOGY_ECOLOGY
;
580 * Returns the "key" feature. This feature is the "upper" feature generalizing
581 * all features being used within an identification key.
583 public static final Feature
KEY(){
589 * Returns the "materials_examined" feature. This feature can only be described
590 * with {@link TextData text data} or eventually with {@link CategoricalData categorical data}
591 * mentioning which material has been examined in order to accomplish
592 * the description. This feature applies only to
593 * {@link SpecimenDescription specimen descriptions} or to {@link TaxonDescription taxon descriptions}.
595 public static final Feature
MATERIALS_EXAMINED(){
596 return MATERIALS_EXAMINED
;
600 * Returns the "materials_methods" feature. This feature can only be described
601 * with {@link TextData text data} or eventually with {@link CategoricalData categorical data}
602 * mentioning which methods have been adopted to analyze the material in
603 * order to accomplish the description. This feature applies only to
604 * {@link SpecimenDescription specimen descriptions} or to {@link TaxonDescription taxon descriptions}.
606 public static final Feature
MATERIALS_METHODS(){
607 return MATERIALS_METHODS
;
611 * Returns the "etymology" feature. This feature can only be described
612 * with {@link TextData text data} or eventually with {@link CategoricalData categorical data}
613 * giving some information about the history of the taxon name. This feature applies only to
614 * {@link TaxonNameDescription taxon name descriptions}.
616 public static final Feature
ETYMOLOGY(){
621 * Returns the "diagnosis" feature. This feature can only be described
622 * with {@link TextData text data} or eventually with {@link CategoricalData categorical data}.
623 * This feature applies only to {@link SpecimenDescription specimen descriptions} or to
624 * {@link TaxonDescription taxon descriptions}.
626 public static final Feature
DIAGNOSIS(){
632 * Returns the "introduction" feature. This feature can only be described
633 * with {@link TextData text data}.
635 * @see #isSupportsTextData()
637 public static final Feature
INTRODUCTION(){
642 * Returns the "protologue" feature. This feature can only be described
643 * with {@link TextData text data} reproducing the content of the protologue
644 * (or some information about it) of the taxon name. This feature applies only to
645 * {@link TaxonNameDescription taxon name descriptions}.
647 * @see #isSupportsTextData()
649 public static final Feature
PROTOLOG(){
653 * Returns the "common_name" feature. This feature allows to handle only
654 * {@link CommonTaxonName common names}.
656 * @see #isSupportsCommonTaxonName()
658 public static final Feature
COMMON_NAME(){
663 * Returns the "phenology" feature. This feature can only be described
664 * with {@link CategoricalData categorical data} or eventually with {@link TextData text data}
665 * containing information time about recurring natural phenomena.
666 * This feature only applies to {@link TaxonDescription taxon descriptions}.<BR>
667 * The "phenology" feature generalizes all other possible features
668 * concerning time information about particular natural phenomena
669 * (such as "first flight of butterflies").
671 public static final Feature
PHENOLOGY(){
676 * Returns the "occurrence" feature.
678 public static final Feature
OCCURRENCE(){
683 * Returns the "citation" feature. This feature can only be described
684 * with {@link TextData text data}.
686 * @see #isSupportsTextData()
688 public static final Feature
CITATION(){
693 * Returns the "additional_publication" feature. This feature can only be
694 * described with {@link TextData text data} with information about a
695 * publication where a {@link TaxonNameBase taxon name} has also been published
696 * but which is not the {@link TaxonNameBase#getNomenclaturalReference() nomenclatural reference}.
697 * This feature applies only to {@link TaxonNameDescription taxon name descriptions}.
699 * @see #isSupportsTextData()
701 public static final Feature
ADDITIONAL_PUBLICATION(){
702 return ADDITIONAL_PUBLICATION
;
707 * Returns the "uses" feature. This feature only applies
708 * to {@link TaxonDescription taxon descriptions}.<BR>
709 * The "uses" feature generalizes all other possible features concerning
710 * particular uses (for instance "industrial use of seeds").
712 public static final Feature
USES(){
718 * Returns the "conservation" feature. This feature only applies
719 * to {@link SpecimenDescription specimen descriptions} and generalizes
720 * methods and conditions for the conservation of {@link Specimen specimens}.<BR>
722 public static final Feature
CONSERVATION(){
728 * Returns the "cultivation" feature.
730 public static final Feature
CULTIVATION(){
736 * Returns the "cultivation" feature.
738 public static final Feature
IMAGE(){
743 * Returns the "hybrid_parent" feature. This feature can only be used
744 * by {@link TaxonInteraction taxon interactions}.<BR>
746 * Note: It must be distinguished between hybrid relationships as
747 * relevant nomenclatural relationships between {@link BotanicalName plant names}
748 * on the one side and the biological relation between two {@link Taxon taxa}
749 * as it is here the case on the other one.
751 * @see #isSupportsTaxonInteraction()
752 * @see HybridRelationshipType
754 public static final Feature
HYBRID_PARENT(){
756 logger
.warn("HYBRID_PARENT not yet implemented");
761 protected void setDefaultTerms(TermVocabulary
<Feature
> termVocabulary
) {
762 Feature
.ADDITIONAL_PUBLICATION
= termVocabulary
.findTermByUuid(Feature
.uuidAdditionalPublication
);
763 Feature
.BIOLOGY_ECOLOGY
= termVocabulary
.findTermByUuid(Feature
.uuidBiologyEcology
);
764 Feature
.CITATION
= termVocabulary
.findTermByUuid(Feature
.uuidCitation
);
765 Feature
.COMMON_NAME
= termVocabulary
.findTermByUuid(Feature
.uuidCommonName
);
766 Feature
.CONSERVATION
= termVocabulary
.findTermByUuid(Feature
.uuidConservation
);
767 Feature
.CULTIVATION
= termVocabulary
.findTermByUuid(Feature
.uuidCultivation
);
768 Feature
.DESCRIPTION
= termVocabulary
.findTermByUuid(Feature
.uuidDescription
);
769 Feature
.DIAGNOSIS
= termVocabulary
.findTermByUuid(Feature
.uuidDiagnosis
);
770 Feature
.DISCUSSION
= termVocabulary
.findTermByUuid(Feature
.uuidDiscussion
);
771 Feature
.DISTRIBUTION
= termVocabulary
.findTermByUuid(Feature
.uuidDistribution
);
772 Feature
.ECOLOGY
= termVocabulary
.findTermByUuid(Feature
.uuidEcology
);
773 Feature
.ETYMOLOGY
= termVocabulary
.findTermByUuid(Feature
.uuidEtymology
);
774 Feature
.IMAGE
= termVocabulary
.findTermByUuid(Feature
.uuidImage
);
775 Feature
.INTRODUCTION
= termVocabulary
.findTermByUuid(Feature
.uuidIntroduction
);
776 Feature
.KEY
= termVocabulary
.findTermByUuid(Feature
.uuidKey
);
777 Feature
.MATERIALS_EXAMINED
= termVocabulary
.findTermByUuid(Feature
.uuidMaterialsExamined
);
778 Feature
.MATERIALS_METHODS
= termVocabulary
.findTermByUuid(Feature
.uuidMaterialsMethods
);
779 Feature
.OCCURRENCE
= termVocabulary
.findTermByUuid(Feature
.uuidOccurrence
);
780 Feature
.PHENOLOGY
= termVocabulary
.findTermByUuid(Feature
.uuidPhenology
);
781 Feature
.PROTOLOG
= termVocabulary
.findTermByUuid(Feature
.uuidProtolog
);
782 Feature
.UNKNOWN
= termVocabulary
.findTermByUuid(Feature
.uuidUnknown
);
783 Feature
.USES
= termVocabulary
.findTermByUuid(Feature
.uuidUses
);