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 eu.etaxonomy.cdm.model.common.DefinedTermBase;
|
14
|
import eu.etaxonomy.cdm.model.common.Language;
|
15
|
|
16
|
import org.apache.log4j.Logger;
|
17
|
import javax.persistence.*;
|
18
|
|
19
|
/**
|
20
|
* This class represents measurement units such as "centimeter" or "degree
|
21
|
* Celsius".
|
22
|
*
|
23
|
* @author m.doering
|
24
|
* @version 1.0
|
25
|
* @created 08-Nov-2007 13:06:34
|
26
|
*/
|
27
|
@Entity
|
28
|
public class MeasurementUnit extends DefinedTermBase {
|
29
|
static Logger logger = Logger.getLogger(MeasurementUnit.class);
|
30
|
|
31
|
/**
|
32
|
* Class constructor: creates a new empty measurement unit instance.
|
33
|
*
|
34
|
* @see #MeasurementUnit(String, String, String)
|
35
|
*/
|
36
|
protected MeasurementUnit(){
|
37
|
super();
|
38
|
}
|
39
|
|
40
|
/**
|
41
|
* Creates a new measurement unit with a description
|
42
|
* (in the {@link Language#DEFAULT() default language}), a label and a label abbreviation.
|
43
|
*
|
44
|
* @param term the string (in the default language) describing the
|
45
|
* new measurement unit to be created
|
46
|
* @param label the string identifying the new measurement unit
|
47
|
* to be created
|
48
|
* @param labelAbbrev the string identifying (in abbreviated form) the
|
49
|
* new measurement unit to be created
|
50
|
* @see #NewInstance()
|
51
|
*/
|
52
|
public MeasurementUnit(String term, String label, String labelAbbrev) {
|
53
|
super(term, label, labelAbbrev);
|
54
|
}
|
55
|
|
56
|
|
57
|
/**
|
58
|
* Creates a new empty measurement unit instance.
|
59
|
*
|
60
|
* @see #MeasurementUnit(String, String, String)
|
61
|
*/
|
62
|
public static MeasurementUnit NewInstance(){
|
63
|
return new MeasurementUnit();
|
64
|
}
|
65
|
|
66
|
}
|