Delete warnings in description
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / description / MeasurementUnit.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 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 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;
22
23 /**
24 * This class represents measurement units such as "centimeter" or "degree
25 * Celsius".
26 *
27 * @author m.doering
28 * @version 1.0
29 * @created 08-Nov-2007 13:06:34
30 */
31 @XmlAccessorType(XmlAccessType.FIELD)
32 @XmlType(name = "MeasurementUnit")
33 @XmlRootElement(name = "MeasurementUnit")
34 @Entity
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);
39
40 /**
41 * Class constructor: creates a new empty measurement unit instance.
42 *
43 * @see #MeasurementUnit(String, String, String)
44 */
45 protected MeasurementUnit(){
46 super();
47 }
48
49 /**
50 * Creates a new measurement unit with a description
51 * (in the {@link Language#DEFAULT() default language}), a label and a label abbreviation.
52 *
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
56 * to be created
57 * @param labelAbbrev the string identifying (in abbreviated form) the
58 * new measurement unit to be created
59 * @see #NewInstance()
60 */
61 public MeasurementUnit(String term, String label, String labelAbbrev) {
62 super(term, label, labelAbbrev);
63 }
64
65
66 /**
67 * Creates a new empty measurement unit instance.
68 *
69 * @see #MeasurementUnit(String, String, String)
70 */
71 public static MeasurementUnit NewInstance(){
72 return new MeasurementUnit();
73 }
74
75 /**
76 * Creates a new empty measurement unit instance.
77 *
78 * @see #MeasurementUnit(String, String, String)
79 */
80 public static MeasurementUnit NewInstance(String term, String label, String labelAbbrev){
81 return new MeasurementUnit(term, label, labelAbbrev);
82 }
83 }