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
;
12 import java
.util
.UUID
;
14 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
15 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
16 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
18 import org
.apache
.log4j
.Logger
;
19 import javax
.persistence
.*;
23 * This class represents terms describing different statistical measures (such
24 * as "sample size", "minimum" or "average") for {@link Feature features} that can be
25 * described with numerical values (like for instance weights or temperature).
29 * @created 08-Nov-2007 13:06:54
32 public class StatisticalMeasure
extends DefinedTermBase
{
34 private static final Logger logger
= Logger
.getLogger(StatisticalMeasure
.class);
36 private static final UUID uuidMin
= UUID
.fromString("2c8b42e5-154c-42bd-a301-03b483275dd6");
37 private static final UUID uuidMax
= UUID
.fromString("8955815b-7d21-4149-b1b7-d37af3c2046c");
38 private static final UUID uuidAverage
= UUID
.fromString("264c3979-d551-4795-9e25-24c6b533fbb1");
39 private static final UUID uuidSampleSize
= UUID
.fromString("571f86ca-a44c-4484-9981-11fd82138a7a");
40 private static final UUID uuidVariance
= UUID
.fromString("4d22cf5e-89ff-4de3-a9ae-12dbeda3faba");
41 private static final UUID uuidTypicalLowerBoundary
= UUID
.fromString("8372a89a-35ad-4755-a881-7edae6c37c8f");
42 private static final UUID uuidTypicalUpperBoundary
= UUID
.fromString("9eff88ba-b8e7-4631-9e55-a50bd16ba79d");
44 // ************* CONSTRUCTORS *************/
46 * Class constructor: creates a new empty statistical measure instance.
48 * @see #StatisticalMeasure(String, String, String)
50 public StatisticalMeasure() {
53 public StatisticalMeasure(String term
, String label
, String labelAbbrev
) {
54 super(term
, label
, labelAbbrev
);
57 //********* METHODS **************************************/
59 * Creates a new empty statistical measure instance.
61 * @see #NewInstance(String, String, String)
63 public static StatisticalMeasure
NewInstance(){
64 return new StatisticalMeasure();
67 * Creates a new statistical measure instance with a description
68 * (in the {@link Language#DEFAULT() default language}), a label and a label abbreviation.
70 * @param term the string (in the default language) describing the
71 * new statistical measure to be created
72 * @param label the string identifying the new statistical measure
74 * @param labelAbbrev the string identifying (in abbreviated form) the
75 * new statistical measure to be created
78 public static StatisticalMeasure
NewInstance(String term
, String label
, String labelAbbrev
){
79 return new StatisticalMeasure(term
, label
, labelAbbrev
);
82 public static final StatisticalMeasure
getByUuid(UUID uuid
){
83 return (StatisticalMeasure
) findByUuid(uuid
);
86 public static final StatisticalMeasure
MIN(){
87 return getByUuid(uuidMin
);
90 public static final StatisticalMeasure
MAX(){
91 return getByUuid(uuidMax
);
94 public static final StatisticalMeasure
AVERAGE(){
95 return getByUuid(uuidAverage
);
98 public static final StatisticalMeasure
SAMPLE_SIZE(){
99 return getByUuid(uuidSampleSize
);
102 public static final StatisticalMeasure
VARIANCE(){
103 return getByUuid(uuidVariance
);
106 public static final StatisticalMeasure
TYPICAL_LOWER_BOUNDARY(){
107 return getByUuid(uuidTypicalLowerBoundary
);
110 public static final StatisticalMeasure
TYPICAL_UPPER_BOUNDARY(){
111 return getByUuid(uuidTypicalUpperBoundary
);