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
.DefinedTermBase
;
14 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
16 import org
.apache
.log4j
.Logger
;
17 import javax
.persistence
.*;
18 import javax
.xml
.bind
.annotation
.XmlAccessType
;
19 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
20 import javax
.xml
.bind
.annotation
.XmlRootElement
;
21 import javax
.xml
.bind
.annotation
.XmlType
;
24 * This class represents measurement units such as "centimeter" or "degree
29 * @created 08-Nov-2007 13:06:34
31 @XmlAccessorType(XmlAccessType
.FIELD
)
32 @XmlType(name
= "MeasurementUnit")
33 @XmlRootElement(name
= "MeasurementUnit")
35 public class MeasurementUnit
extends DefinedTermBase
<MeasurementUnit
> {
36 private static final long serialVersionUID
= 4904519152652248312L;
37 @SuppressWarnings("unused")
38 private static final Logger logger
= Logger
.getLogger(MeasurementUnit
.class);
41 * Class constructor: creates a new empty measurement unit instance.
43 * @see #MeasurementUnit(String, String, String)
45 protected MeasurementUnit(){
50 * Creates a new measurement unit with a description
51 * (in the {@link Language#DEFAULT() default language}), a label and a label abbreviation.
53 * @param term the string (in the default language) describing the
54 * new measurement unit to be created
55 * @param label the string identifying the new measurement unit
57 * @param labelAbbrev the string identifying (in abbreviated form) the
58 * new measurement unit to be created
61 public MeasurementUnit(String term
, String label
, String labelAbbrev
) {
62 super(term
, label
, labelAbbrev
);
67 * Creates a new empty measurement unit instance.
69 * @see #MeasurementUnit(String, String, String)
71 public static MeasurementUnit
NewInstance(){
72 return new MeasurementUnit();
76 * Creates a new empty measurement unit instance.
78 * @see #MeasurementUnit(String, String, String)
80 public static MeasurementUnit
NewInstance(String term
, String label
, String labelAbbrev
){
81 return new MeasurementUnit(term
, label
, labelAbbrev
);