Only documentation
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / description / Feature.java
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
10 package eu.etaxonomy.cdm.model.description;
11
12
13 import java.util.HashSet;
14 import java.util.List;
15 import java.util.Set;
16 import java.util.UUID;
17
18 import javax.persistence.Entity;
19 import javax.persistence.OneToMany;
20 import javax.xml.bind.annotation.XmlAccessType;
21 import javax.xml.bind.annotation.XmlAccessorType;
22 import javax.xml.bind.annotation.XmlElement;
23 import javax.xml.bind.annotation.XmlElementWrapper;
24 import javax.xml.bind.annotation.XmlIDREF;
25 import javax.xml.bind.annotation.XmlRootElement;
26 import javax.xml.bind.annotation.XmlSchemaType;
27 import javax.xml.bind.annotation.XmlType;
28
29 import org.apache.log4j.Logger;
30
31 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
32 import eu.etaxonomy.cdm.model.common.ILoadableTerm;
33 import eu.etaxonomy.cdm.model.common.Language;
34 import eu.etaxonomy.cdm.model.common.TermVocabulary;
35 import eu.etaxonomy.cdm.model.name.BotanicalName;
36 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
37 import eu.etaxonomy.cdm.model.name.HybridRelationshipType;
38 import eu.etaxonomy.cdm.model.name.NameRelationship;
39 import eu.etaxonomy.cdm.model.name.NameRelationshipType;
40 import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
41 import eu.etaxonomy.cdm.model.name.NonViralName;
42 import eu.etaxonomy.cdm.model.name.Rank;
43 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
44 import eu.etaxonomy.cdm.model.occurrence.Specimen;
45 import eu.etaxonomy.cdm.model.taxon.Taxon;
46
47 /**
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.
57 * <P>
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.
64 * <P>
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>
68 * <P>
69 * This class corresponds to DescriptionsSectionType according to the SDD
70 * schema.
71 *
72 * @author m.doering
73 * @version 1.0
74 * @created 08-Nov-2007 13:06:24
75 */
76 @XmlAccessorType(XmlAccessType.FIELD)
77 @XmlType(name="Feature", factoryMethod="NewInstance", propOrder = {
78 "supportsTextData",
79 "supportsQuantitativeData",
80 "supportsDistribution",
81 "supportsIndividualAssociation",
82 "supportsTaxonInteraction",
83 "supportsCommonTaxonName",
84 "recommendedModifierEnumeration",
85 "recommendedStatisticalMeasures",
86 "supportedCategoricalEnumerations"
87 })
88 @XmlRootElement(name = "Feature")
89 @Entity
90 public class Feature extends DefinedTermBase {
91 static Logger logger = Logger.getLogger(Feature.class);
92
93 @XmlElement(name = "SupportsTextData")
94 private boolean supportsTextData;
95
96 @XmlElement(name = "SupportsQuantitativeData")
97 private boolean supportsQuantitativeData;
98
99 @XmlElement(name = "SupportsDistribution")
100 private boolean supportsDistribution;
101
102 @XmlElement(name = "SupportsIndividualAssociation")
103 private boolean supportsIndividualAssociation;
104
105 @XmlElement(name = "SupportsTaxonInteraction")
106 private boolean supportsTaxonInteraction;
107
108 @XmlElement(name = "SupportsCommonTaxonName")
109 private boolean supportsCommonTaxonName;
110
111 @XmlElementWrapper(name = "RecommendedModifierEnumerations")
112 @XmlElement(name = "RecommendedModifierEnumeration")
113 @XmlIDREF
114 @XmlSchemaType(name = "IDREF")
115 private Set<TermVocabulary> recommendedModifierEnumeration = new HashSet<TermVocabulary>();
116
117 @XmlElementWrapper(name = "RecommendedStatisticalMeasures")
118 @XmlElement(name = "RecommendedStatisticalMeasure")
119 @XmlIDREF
120 @XmlSchemaType(name = "IDREF")
121 private Set<StatisticalMeasure> recommendedStatisticalMeasures = new HashSet<StatisticalMeasure>();
122
123 @XmlElementWrapper(name = "SupportedCategoricalEnumerations")
124 @XmlElement(name = "SupportedCategoricalEnumeration")
125 @XmlIDREF
126 @XmlSchemaType(name = "IDREF")
127 private Set<TermVocabulary> supportedCategoricalEnumerations = new HashSet<TermVocabulary>();
128
129 /* ***************** CONSTRUCTOR AND FACTORY METHODS **********************************/
130
131
132 /**
133 * Class constructor: creates a new empty feature instance.
134 *
135 * @see #Feature(String, String, String)
136 */
137 public Feature() {
138 super();
139 }
140
141 /**
142 * Class constructor: creates a new feature instance with a description (in the {@link Language#DEFAULT() default language}),
143 * a label and a label abbreviation.
144 *
145 * @param term the string (in the default language) describing the
146 * new feature to be created
147 * @param label the string identifying the new feature to be created
148 * @param labelAbbrev the string identifying (in abbreviated form) the
149 * new feature to be created
150 * @see #Feature()
151 */
152 protected Feature(String term, String label, String labelAbbrev) {
153 super(term, label, labelAbbrev);
154 }
155
156 /**
157 * Creates a new empty feature instance.
158 *
159 * @see #NewInstance(String, String, String)
160 */
161 public static Feature NewInstance() {
162 return new Feature();
163 }
164
165 /**
166 * Creates a new feature instance with a description (in the {@link Language#DEFAULT() default language}),
167 * a label and a label abbreviation.
168 *
169 * @param term the string (in the default language) describing the
170 * new feature to be created
171 * @param label the string identifying the new feature to be created
172 * @param labelAbbrev the string identifying (in abbreviated form) the
173 * new feature to be created
174 * @see #readCsvLine(List, Language)
175 * @see #NewInstance()
176 */
177 public static Feature NewInstance(String term, String label, String labelAbbrev){
178 return new Feature(term, label, labelAbbrev);
179 }
180
181 /* *************************************************************************************/
182
183 /**
184 * Returns the boolean value of the flag indicating whether <i>this</i>
185 * feature can be described with {@link QuantitativeData quantitative data} (true)
186 * or not (false). If this flag is set <i>this</i> feature can only apply to
187 * {@link TaxonDescription taxon descriptions} or {@link SpecimenDescription specimen descriptions}.
188 *
189 * @return the boolean value of the supportsQuantitativeData flag
190 */
191 public boolean isSupportsQuantitativeData() {
192 return supportsQuantitativeData;
193 }
194
195 /**
196 * @see #isSupportsQuantitativeData()
197 */
198 public void setSupportsQuantitativeData(boolean supportsQuantitativeData) {
199 this.supportsQuantitativeData = supportsQuantitativeData;
200 }
201
202 /**
203 * Returns the boolean value of the flag indicating whether <i>this</i>
204 * feature can be described with {@link TextData text data} (true)
205 * or not (false).
206 *
207 * @return the boolean value of the supportsTextData flag
208 */
209 public boolean isSupportsTextData() {
210 return supportsTextData;
211 }
212
213 /**
214 * @see #isSupportsTextData()
215 */
216 public void setSupportsTextData(boolean supportsTextData) {
217 this.supportsTextData = supportsTextData;
218 }
219
220 /**
221 * Returns the boolean value of the flag indicating whether <i>this</i>
222 * feature can be described with {@link Distribution distribution} objects
223 * (true) or not (false). This flag is set if and only if <i>this</i> feature
224 * is the {@link #DISTRIBUTION() distribution feature}.
225 *
226 * @return the boolean value of the supportsDistribution flag
227 */
228 public boolean isSupportsDistribution() {
229 return supportsDistribution;
230 }
231
232 /**
233 * @see #isSupportsDistribution()
234 */
235 public void setSupportsDistribution(boolean supportsDistribution) {
236 this.supportsDistribution = supportsDistribution;
237 }
238
239 /**
240 * Returns the boolean value of the flag indicating whether <i>this</i>
241 * feature can be described with {@link IndividualsAssociation individuals associations}
242 * (true) or not (false).
243 *
244 * @return the boolean value of the supportsIndividualAssociation flag
245 */
246 public boolean isSupportsIndividualAssociation() {
247 return supportsIndividualAssociation;
248 }
249
250 /**
251 * @see #isSupportsIndividualAssociation()
252 */
253 public void setSupportsIndividualAssociation(
254 boolean supportsIndividualAssociation) {
255 this.supportsIndividualAssociation = supportsIndividualAssociation;
256 }
257
258 /**
259 * Returns the boolean value of the flag indicating whether <i>this</i>
260 * feature can be described with {@link TaxonInteraction taxon interactions}
261 * (true) or not (false).
262 *
263 * @return the boolean value of the supportsTaxonInteraction flag
264 */
265 public boolean isSupportsTaxonInteraction() {
266 return supportsTaxonInteraction;
267 }
268
269 /**
270 * @see #isSupportsTaxonInteraction()
271 */
272 public void setSupportsTaxonInteraction(boolean supportsTaxonInteraction) {
273 this.supportsTaxonInteraction = supportsTaxonInteraction;
274 }
275
276 /**
277 * Returns the boolean value of the flag indicating whether <i>this</i>
278 * feature can be described with {@link CommonTaxonName common names}
279 * (true) or not (false). This flag is set if and only if <i>this</i> feature
280 * is the {@link #COMMON_NAME() common name feature}.
281 *
282 * @return the boolean value of the supportsCommonTaxonName flag
283 */
284 public boolean isSupportsCommonTaxonName() {
285 return supportsCommonTaxonName;
286 }
287
288 /**
289 * @see #isSupportsTaxonInteraction()
290 */
291 public void setSupportsCommonTaxonName(boolean supportsCommonTaxonName) {
292 this.supportsCommonTaxonName = supportsCommonTaxonName;
293 }
294
295 /**
296 * Returns the set of {@link TermVocabulary term vocabularies} containing the
297 * {@link Modifier modifiers} recommended to be used for {@link DescriptionElementBase description elements}
298 * with <i>this</i> feature.
299 */
300 @OneToMany
301 public Set<TermVocabulary> getRecommendedModifierEnumeration() {
302 return recommendedModifierEnumeration;
303 }
304
305 /**
306 * @see #getRecommendedModifierEnumeration()
307 */
308 protected void setRecommendedModifierEnumeration(
309 Set<TermVocabulary> recommendedModifierEnumeration) {
310 this.recommendedModifierEnumeration = recommendedModifierEnumeration;
311 }
312
313 /**
314 * Adds a {@link TermVocabulary term vocabulary} (with {@link Modifier modifiers}) to the set of
315 * {@link #getRecommendedModifierEnumeration() recommended modifier vocabularies} assigned
316 * to <i>this</i> feature.
317 *
318 * @param recommendedModifierEnumeration the term vocabulary to be added
319 * @see #getRecommendedModifierEnumeration()
320 */
321 public void addRecommendedModifierEnumeration(
322 TermVocabulary recommendedModifierEnumeration) {
323 this.recommendedModifierEnumeration.add(recommendedModifierEnumeration);
324 }
325 /**
326 * Removes one element from the set of {@link #getRecommendedModifierEnumeration() recommended modifier vocabularies}
327 * assigned to <i>this</i> feature.
328 *
329 * @param recommendedModifierEnumeration the term vocabulary which should be removed
330 * @see #getRecommendedModifierEnumeration()
331 * @see #addRecommendedModifierEnumeration(TermVocabulary)
332 */
333 public void removeRecommendedModifierEnumeration(
334 TermVocabulary recommendedModifierEnumeration) {
335 this.recommendedModifierEnumeration.remove(recommendedModifierEnumeration);
336 }
337
338 /**
339 * Returns the set of {@link StatisticalMeasure statistical measures} recommended to be used
340 * in case of {@link QuantitativeData quantitative data} with <i>this</i> feature.
341 */
342 @OneToMany
343 public Set<StatisticalMeasure> getRecommendedStatisticalMeasures() {
344 return recommendedStatisticalMeasures;
345 }
346
347 /**
348 * @see #getRecommendedStatisticalMeasures()
349 */
350 protected void setRecommendedStatisticalMeasures(
351 Set<StatisticalMeasure> recommendedStatisticalMeasures) {
352 this.recommendedStatisticalMeasures = recommendedStatisticalMeasures;
353 }
354
355 /**
356 * Adds a {@link StatisticalMeasure statistical measure} to the set of
357 * {@link #getRecommendedStatisticalMeasures() recommended statistical measures} assigned
358 * to <i>this</i> feature.
359 *
360 * @param recommendedStatisticalMeasure the statistical measure to be added
361 * @see #getRecommendedStatisticalMeasures()
362 */
363 public void addRecommendedStatisticalMeasure(
364 StatisticalMeasure recommendedStatisticalMeasure) {
365 this.recommendedStatisticalMeasures.add(recommendedStatisticalMeasure);
366 }
367 /**
368 * Removes one element from the set of {@link #getRecommendedStatisticalMeasures() recommended statistical measures}
369 * assigned to <i>this</i> feature.
370 *
371 * @param recommendedStatisticalMeasure the statistical measure which should be removed
372 * @see #getRecommendedStatisticalMeasures()
373 * @see #addRecommendedStatisticalMeasure(StatisticalMeasure)
374 */
375 public void removeRecommendedStatisticalMeasure(
376 StatisticalMeasure recommendedStatisticalMeasure) {
377 this.recommendedStatisticalMeasures.remove(recommendedStatisticalMeasure);
378 }
379
380 /**
381 * Returns the set of {@link TermVocabulary term vocabularies} containing the list of
382 * possible {@link State states} to be used in {@link CategoricalData categorical data}
383 * with <i>this</i> feature.
384 */
385 @OneToMany
386 public Set<TermVocabulary> getSupportedCategoricalEnumerations() {
387 return supportedCategoricalEnumerations;
388 }
389
390 /**
391 * @see #getSupportedCategoricalEnumerations()
392 */
393 protected void setSupportedCategoricalEnumerations(
394 Set<TermVocabulary> supportedCategoricalEnumerations) {
395 this.supportedCategoricalEnumerations = supportedCategoricalEnumerations;
396 }
397 /**
398 * Adds a {@link TermVocabulary term vocabulary} to the set of
399 * {@link #getSupportedCategoricalEnumerations() supported state vocabularies} assigned
400 * to <i>this</i> feature.
401 *
402 * @param supportedCategoricalEnumeration the term vocabulary which should be removed
403 * @see #getSupportedCategoricalEnumerations()
404 */
405 public void addSupportedCategoricalEnumeration(
406 TermVocabulary supportedCategoricalEnumeration) {
407 this.supportedCategoricalEnumerations.add(supportedCategoricalEnumeration);
408 }
409 /**
410 * Removes one element from the set of {@link #getSupportedCategoricalEnumerations() supported state vocabularies}
411 * assigned to <i>this</i> feature.
412 *
413 * @param supportedCategoricalEnumeration the term vocabulary which should be removed
414 * @see #getSupportedCategoricalEnumerations()
415 * @see #addSupportedCategoricalEnumeration(TermVocabulary)
416 */
417 public void removeSupportedCategoricalEnumeration(
418 TermVocabulary supportedCategoricalEnumeration) {
419 this.supportedCategoricalEnumerations.remove(supportedCategoricalEnumeration);
420 }
421
422
423 private static final UUID uuidUnknown = UUID.fromString("910307f1-dc3c-452c-a6dd-af5ac7cd365c");
424 private static final UUID uuidDescription = UUID.fromString("9087cdcd-8b08-4082-a1de-34c9ba9fb493");
425 private static final UUID uuidDistribution = UUID.fromString("9fc9d10c-ba50-49ee-b174-ce83fc3f80c6");
426 private static final UUID uuidEcology = UUID.fromString("aa923827-d333-4cf5-9a5f-438ae0a4746b");
427 private static final UUID uuidBiologyEcology = UUID.fromString("9832e24f-b670-43b4-ac7c-20a7261a1d8c");
428 private static final UUID uuidKey = UUID.fromString("a677f827-22b9-4205-bb37-11cb48dd9106");
429 private static final UUID uuidMaterialsExamined = UUID.fromString("7c0c7571-a864-47c1-891d-01f59000dae1");
430 private static final UUID uuidMaterialsMethods = UUID.fromString("1e87d9c3-0844-4a03-9686-773e2ccb3ab6");
431 private static final UUID uuidEtymology = UUID.fromString("dd653d48-355c-4aec-a4e7-724f6eb29f8d");
432 private static final UUID uuidDiagnosis = UUID.fromString("d43d8501-ceab-4caa-9e51-e87138528fac");
433 private static final UUID uuidProtolog = UUID.fromString("7f1fd111-fc52-49f0-9e75-d0097f576b2d");
434 private static final UUID uuidCommonName = UUID.fromString("fc810911-51f0-4a46-ab97-6562fe263ae5");
435 private static final UUID uuidPhenology = UUID.fromString("a7786d3e-7c58-4141-8416-346d4c80c4a2");
436 private static final UUID uuidOccurrence = UUID.fromString("5deff505-1a32-4817-9a74-50e6936fd630");
437 private static final UUID uuidCitation = UUID.fromString("99b2842f-9aa7-42fa-bd5f-7285311e0101");
438 private static final UUID uuidAdditionalPublication = UUID.fromString("cb2eab09-6d9d-4e43-8ad2-873f23400930");
439 private static final UUID uuidUses = UUID.fromString("e5374d39-b210-47c7-bec1-bee05b5f1cb6");
440 private static final UUID uuidConservation = UUID.fromString("4518fc20-2492-47de-b345-777d2b83c9cf");
441 private static final UUID uuidCultivation = UUID.fromString("e28965b2-a367-48c5-b954-8afc8ac2c69b");
442 private static final UUID uuidIntroduction = UUID.fromString("e75255ca-8ff4-4905-baad-f842927fe1d3");
443 private static final UUID uuidDiscussion = UUID.fromString("d3c4cbb6-0025-4322-886b-cd0156753a25");
444
445
446
447 // private static final UUID uuidDistribution = UUID.fromString("");
448 // private static final UUID uuidDistribution = UUID.fromString("");
449 // private static final UUID uuidDistribution = UUID.fromString("");
450
451 // "86bd920d-f8c5-48b9-af1d-03f63c31de5c",,"Abstract","Abstract"
452 // "489bf358-b78a-45e2-a691-f9f3f10446ce",,"Synopsis","Synopsis"
453 // "89d3b005-9876-4923-89d9-60eb75b9583b",,"Multiple","Multiple"
454 // "555a46bc-211a-476f-a022-c472970d6f8b",,"Acknowledgments","Acknowledgments"
455
456
457 /**
458 * Creates and returns a new feature instance on the basis of a given string
459 * list (containing an UUID, an URI, a label and a description) and a given
460 * {@link Language language} to be associated with the description. Furthermore
461 * the flags concerning the supported subclasses of {@link DescriptionElementBase description elements}
462 * are set according to a particular string belonging to the given
463 * string list.<BR>
464 * This method overrides the readCsvLine method from {@link DefinedTermBase#readCsvLine(List, Language) DefinedTermBase}.
465 *
466 * @param csvLine the string list with elementary information for attributes
467 * @param lang the language in which the description has been formulated
468 * @see #NewInstance(String, String, String)
469 */
470 @Override
471 public ILoadableTerm readCsvLine(List csvLine, Language lang) {
472 // TODO Auto-generated method stub
473 super.readCsvLine(csvLine, lang);
474 String text = (String)csvLine.get(4);
475 if (text != null && text.length() >= 6){
476 if ("1".equals(text.substring(0, 1))){this.setSupportsTextData(true);};
477 if ("1".equals(text.substring(1, 2))){this.setSupportsQuantitativeData(true);};
478 if ("1".equals(text.substring(2, 3))){this.setSupportsDistribution(true);};
479 if ("1".equals(text.substring(3, 4))){this.setSupportsIndividualAssociation(true);};
480 if ("1".equals(text.substring(4, 5))){this.setSupportsTaxonInteraction(true);};
481 if ("1".equals(text.substring(5, 6))){this.setSupportsCommonTaxonName(true);};
482 }
483 return this;
484 }
485
486 /**
487 * Returns the feature identified through its immutable universally
488 * unique identifier (UUID).
489 *
490 * @param uuid the universally unique identifier
491 * @return the feature corresponding to the given
492 * universally unique identifier
493 */
494 public static final Feature getByUuid(UUID uuid){
495 return (Feature)findByUuid(uuid);
496 }
497
498 /**
499 * Returns the "unknown" feature. This feature allows to store values of
500 * {@link DescriptionElementBase description elements} even if it is momentarily
501 * not known what they mean.
502 */
503 public static final Feature UNKNOWN(){
504 return getByUuid(uuidUnknown);
505 }
506
507 /**
508 * Returns the "description" feature. This feature allows to handle global
509 * {@link DescriptionElementBase description elements} for a global {@link DescriptionBase description}.<BR>
510 * The "description" feature is the highest level feature.
511 */
512 public static final Feature DESCRIPTION(){
513 return getByUuid(uuidDescription);
514 }
515
516 /**
517 * Returns the "distribution" feature. This feature allows to handle only
518 * {@link Distribution distributions}.
519 *
520 * @see #isSupportsDistribution()
521 */
522 public static final Feature DISTRIBUTION(){
523 return getByUuid(uuidDistribution);
524 }
525
526 /**
527 * Returns the "discussion" feature. This feature can only be described
528 * with {@link TextData text data}.
529 *
530 * @see #isSupportsTextData()
531 */
532 public static final Feature DISCUSSION(){
533 return getByUuid(uuidDiscussion);
534 }
535
536 /**
537 * Returns the "ecology" feature. This feature only applies
538 * to {@link SpecimenDescription specimen descriptions} or to {@link TaxonDescription taxon descriptions}.<BR>
539 * The "ecology" feature generalizes all other possible features concerning
540 * ecological matters.
541 */
542 public static final Feature ECOLOGY(){
543 return getByUuid(uuidEcology);
544 }
545
546 /**
547 * Returns the "biology_ecology" feature. This feature only applies
548 * to {@link SpecimenDescription specimen descriptions} or to {@link TaxonDescription taxon descriptions}.<BR>
549 * The "biology_ecology" feature generalizes all possible features concerning
550 * biological aspects of ecological matters.
551 *
552 * @see #ECOLOGY()
553 */
554 public static final Feature BIOLOGY_ECOLOGY(){
555 return getByUuid(uuidBiologyEcology);
556 }
557
558 /**
559 * Returns the "key" feature. This feature is the "upper" feature generalizing
560 * all features being used within an identification key.
561 */
562 public static final Feature KEY(){
563 return getByUuid(uuidKey);
564 }
565
566
567 /**
568 * Returns the "materials_examined" feature. This feature can only be described
569 * with {@link TextData text data} or eventually with {@link CategoricalData categorical data}
570 * mentioning which material has been examined in order to accomplish
571 * the description. This feature applies only to
572 * {@link SpecimenDescription specimen descriptions} or to {@link TaxonDescription taxon descriptions}.
573 */
574 public static final Feature MATERIALS_EXAMINED(){
575 return getByUuid(uuidMaterialsExamined);
576 }
577
578 /**
579 * Returns the "materials_methods" feature. This feature can only be described
580 * with {@link TextData text data} or eventually with {@link CategoricalData categorical data}
581 * mentioning which methods have been adopted to analyze the material in
582 * order to accomplish the description. This feature applies only to
583 * {@link SpecimenDescription specimen descriptions} or to {@link TaxonDescription taxon descriptions}.
584 */
585 public static final Feature MATERIALS_METHODS(){
586 return getByUuid(uuidMaterialsMethods);
587 }
588
589 /**
590 * Returns the "etymology" feature. This feature can only be described
591 * with {@link TextData text data} or eventually with {@link CategoricalData categorical data}
592 * giving some information about the history of the taxon name. This feature applies only to
593 * {@link TaxonNameDescription taxon name descriptions}.
594 */
595 public static final Feature ETYMOLOGY(){
596 return getByUuid(uuidEtymology);
597 }
598
599 /**
600 * Returns the "diagnosis" feature. This feature can only be described
601 * with {@link TextData text data} or eventually with {@link CategoricalData categorical data}.
602 * This feature applies only to {@link SpecimenDescription specimen descriptions} or to
603 * {@link TaxonDescription taxon descriptions}.
604 */
605 public static final Feature DIAGNOSIS(){
606 return getByUuid(uuidDiagnosis);
607 }
608
609
610 /**
611 * Returns the "introduction" feature. This feature can only be described
612 * with {@link TextData text data}.
613 *
614 * @see #isSupportsTextData()
615 */
616 public static final Feature INTRODUCTION(){
617 return getByUuid(uuidIntroduction);
618 }
619
620 /**
621 * Returns the "protologue" feature. This feature can only be described
622 * with {@link TextData text data} reproducing the content of the protologue
623 * (or some information about it) of the taxon name. This feature applies only to
624 * {@link TaxonNameDescription taxon name descriptions}.
625 *
626 * @see #isSupportsTextData()
627 */
628 public static final Feature PROTOLOG(){
629 return getByUuid(uuidProtolog);
630 }
631 /**
632 * Returns the "common_name" feature. This feature allows to handle only
633 * {@link CommonTaxonName common names}.
634 *
635 * @see #isSupportsCommonTaxonName()
636 */
637 public static final Feature COMMON_NAME(){
638 return getByUuid(uuidCommonName);
639 }
640
641 /**
642 * Returns the "phenology" feature. This feature can only be described
643 * with {@link CategoricalData categorical data} or eventually with {@link TextData text data}
644 * containing information time about recurring natural phenomena.
645 * This feature only applies to {@link TaxonDescription taxon descriptions}.<BR>
646 * The "phenology" feature generalizes all other possible features
647 * concerning time information about particular natural phenomena
648 * (such as "first flight of butterflies").
649 */
650 public static final Feature PHENOLOGY(){
651 return getByUuid(uuidPhenology);
652 }
653
654
655 /**
656 * Returns the "occurrence" feature.
657 */
658 public static final Feature OCCURRENCE(){
659 return getByUuid(uuidOccurrence);
660 }
661
662 /**
663 * Returns the "citation" feature. This feature can only be described
664 * with {@link TextData text data}.
665 *
666 * @see #isSupportsTextData()
667 */
668 public static final Feature CITATION(){
669 return getByUuid(uuidCitation);
670 }
671
672 /**
673 * Returns the "additional_publication" feature. This feature can only be
674 * described with {@link TextData text data} with information about a
675 * publication where a {@link TaxonNameBase taxon name} has also been published
676 * but which is not the {@link TaxonNameBase#getNomenclaturalReference() nomenclatural reference}.
677 * This feature applies only to {@link TaxonNameDescription taxon name descriptions}.
678 *
679 * @see #isSupportsTextData()
680 */
681 public static final Feature ADDITIONAL_PUBLICATION(){
682 return getByUuid(uuidAdditionalPublication);
683 }
684
685
686 /**
687 * Returns the "uses" feature. This feature only applies
688 * to {@link TaxonDescription taxon descriptions}.<BR>
689 * The "uses" feature generalizes all other possible features concerning
690 * particular uses (for instance "industrial use of seeds").
691 */
692 public static final Feature USES(){
693 return getByUuid(uuidUses);
694 }
695
696
697 /**
698 * Returns the "conservation" feature. This feature only applies
699 * to {@link SpecimenDescription specimen descriptions} and generalizes
700 * methods and conditions for the conservation of {@link Specimen specimens}.<BR>
701 */
702 public static final Feature CONSERVATION(){
703 return getByUuid(uuidConservation);
704 }
705
706
707 /**
708 * Returns the "cultivation" feature.
709 */
710 public static final Feature CULTIVATION(){
711 return getByUuid(uuidCultivation);
712 }
713
714
715
716 /**
717 * special kind of OrganismInteraction
718 */
719 /**
720 * Returns the "hybrid_parent" feature. This feature can only be used
721 * by {@link TaxonInteraction taxon interactions}.<BR>
722 * <P>
723 * Note: It must be distinguished between hybrid relationships as
724 * relevant nomenclatural relationships between {@link BotanicalName plant names}
725 * on the one side and the biological relation between two {@link Taxon taxa}
726 * as it is here the case on the other one.
727 *
728 * @see #isSupportsTaxonInteraction()
729 * @see HybridRelationshipType
730 */
731 public static final Feature HYBRID_PARENT(){
732 //TODO
733 logger.warn("HYBRID_PARENT not yet implemented");
734 return null;
735 }
736
737
738 }