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 eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
14 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
15 import org
.apache
.log4j
.Logger
;
19 import javax
.persistence
.*;
20 import javax
.xml
.bind
.annotation
.XmlType
;
23 * Individual property of observed phenomena able to be described or measured.
24 * Experts do not use the word feature for the actual description but only for
25 * the property itself. Naming this class FeatureType would create confusion.
26 * NEEDS TO BE COMPLEMENTED SPM / TDWG http://rs.tdwg.
27 * org/ontology/voc/SpeciesProfileModel
31 * @created 08-Nov-2007 13:06:24
33 @XmlType(name
="Feature", factoryMethod
="NewInstance")
35 public class Feature
extends DefinedTermBase
{
36 static Logger logger
= Logger
.getLogger(Feature
.class);
38 private boolean supportsQuantitativeData
;
39 private boolean supportsTextData
;
40 private boolean supportsDistribution
;
41 private boolean supportsIndividualAssociation
;
42 private boolean supportsTaxonInteraction
;
43 private boolean supportsCommonTaxonName
;
44 private Set
<TermVocabulary
> recommendedModifierEnumeration
= new HashSet
<TermVocabulary
>();
45 private Set
<StatisticalMeasure
> recommendedStatisticalMeasures
= new HashSet
<StatisticalMeasure
>();
46 private Set
<TermVocabulary
> supportedCategoricalEnumerations
= new HashSet
<TermVocabulary
>();
48 /* ***************** CONSTRUCTOR AND FACTORY METHODS **********************************/
51 public static Feature
NewInstance() {
54 public static Feature
NewInstance(String term
, String label
, String labelAbbrev
){
55 return new Feature(term
, label
, labelAbbrev
);
65 protected Feature(String term
, String label
, String labelAbbrev
) {
66 super(term
, label
, labelAbbrev
);
69 /* *************************************************************************************/
70 public boolean isSupportsQuantitativeData() {
71 return supportsQuantitativeData
;
74 public void setSupportsQuantitativeData(boolean supportsQuantitativeData
) {
75 this.supportsQuantitativeData
= supportsQuantitativeData
;
78 public boolean isSupportsTextData() {
79 return supportsTextData
;
82 public void setSupportsTextData(boolean supportsTextData
) {
83 this.supportsTextData
= supportsTextData
;
86 public boolean isSupportsDistribution() {
87 return supportsDistribution
;
90 public void setSupportsDistribution(boolean supportsDistribution
) {
91 this.supportsDistribution
= supportsDistribution
;
94 public boolean isSupportsIndividualAssociation() {
95 return supportsIndividualAssociation
;
98 public void setSupportsIndividualAssociation(
99 boolean supportsIndividualAssociation
) {
100 this.supportsIndividualAssociation
= supportsIndividualAssociation
;
103 public boolean isSupportsTaxonInteraction() {
104 return supportsTaxonInteraction
;
107 public void setSupportsTaxonInteraction(boolean supportsTaxonInteraction
) {
108 this.supportsTaxonInteraction
= supportsTaxonInteraction
;
111 public boolean isSupportsCommonTaxonName() {
112 return supportsCommonTaxonName
;
115 public void setSupportsCommonTaxonName(boolean supportsCommonTaxonName
) {
116 this.supportsCommonTaxonName
= supportsCommonTaxonName
;
120 public Set
<TermVocabulary
> getRecommendedModifierEnumeration() {
121 return recommendedModifierEnumeration
;
124 protected void setRecommendedModifierEnumeration(
125 Set
<TermVocabulary
> recommendedModifierEnumeration
) {
126 this.recommendedModifierEnumeration
= recommendedModifierEnumeration
;
129 public void addRecommendedModifierEnumeration(
130 TermVocabulary recommendedModifierEnumeration
) {
131 this.recommendedModifierEnumeration
.add(recommendedModifierEnumeration
);
133 public void removeRecommendedModifierEnumeration(
134 TermVocabulary recommendedModifierEnumeration
) {
135 this.recommendedModifierEnumeration
.remove(recommendedModifierEnumeration
);
139 public Set
<StatisticalMeasure
> getRecommendedStatisticalMeasures() {
140 return recommendedStatisticalMeasures
;
143 protected void setRecommendedStatisticalMeasures(
144 Set
<StatisticalMeasure
> recommendedStatisticalMeasures
) {
145 this.recommendedStatisticalMeasures
= recommendedStatisticalMeasures
;
148 public void addRecommendedStatisticalMeasure(
149 StatisticalMeasure recommendedStatisticalMeasure
) {
150 this.recommendedStatisticalMeasures
.add(recommendedStatisticalMeasure
);
152 public void removeRecommendedStatisticalMeasure(
153 StatisticalMeasure recommendedStatisticalMeasure
) {
154 this.recommendedStatisticalMeasures
.remove(recommendedStatisticalMeasure
);
158 public Set
<TermVocabulary
> getSupportedCategoricalEnumerations() {
159 return supportedCategoricalEnumerations
;
162 protected void setSupportedCategoricalEnumerations(
163 Set
<TermVocabulary
> supportedCategoricalEnumerations
) {
164 this.supportedCategoricalEnumerations
= supportedCategoricalEnumerations
;
166 public void addSupportedCategoricalEnumeration(
167 TermVocabulary supportedCategoricalEnumeration
) {
168 this.supportedCategoricalEnumerations
.add(supportedCategoricalEnumeration
);
170 public void removeSupportedCategoricalEnumeration(
171 TermVocabulary supportedCategoricalEnumeration
) {
172 this.supportedCategoricalEnumerations
.remove(supportedCategoricalEnumeration
);
175 public static final Feature
DISTRIBUTION(){
177 logger
.warn("DISTRIBUTION not yet implemented");
182 * special kind of OrganismInteraction
184 public static final Feature
HYBRID_PARENT(){
186 logger
.warn("HYBRID_PARENT not yet implemented");
190 public static final Feature
COMMON_NAME(){
192 logger
.warn("COMMON_NAME not yet implemented");