Finished Jaxb annotations for common and description packages.
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / description / State.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.Language;
14 import eu.etaxonomy.cdm.model.common.OrderedTermBase;
15 import eu.etaxonomy.cdm.model.location.NamedArea;
16 import eu.etaxonomy.cdm.model.taxon.Taxon;
17
18 import org.apache.log4j.Logger;
19
20 import javax.persistence.*;
21 import javax.xml.bind.annotation.XmlAccessType;
22 import javax.xml.bind.annotation.XmlAccessorType;
23 import javax.xml.bind.annotation.XmlRootElement;
24 import javax.xml.bind.annotation.XmlType;
25
26 /**
27 * This class represents terms describing different states (like "oval" or
28 * "triangular") for {@link Feature features} that can be described with
29 * categorical values (like for instance shapes).
30 *
31 * @author m.doering
32 * @version 1.0
33 * @created 08-Nov-2007 13:06:53
34 */
35 @XmlAccessorType(XmlAccessType.FIELD)
36 @XmlType(name = "State")
37 @XmlRootElement(name = "State")
38 @Entity
39 public class State extends OrderedTermBase<State> {
40 static Logger logger = Logger.getLogger(State.class);
41
42 // ************* CONSTRUCTORS *************/
43 /**
44 * Class constructor: creates a new empty state.
45 *
46 * @see #State(String, String, String)
47 */
48 public State() {
49 super();
50 }
51
52 /**
53 * Class constructor: creates a new state with a description (in the {@link Language#DEFAULT() default language}),
54 * a label and a label abbreviation.
55 *
56 * @param term the string (in the default language) describing the
57 * new state to be created
58 * @param label the string identifying the new state to be created
59 * @param labelAbbrev the string identifying (in abbreviated form) the
60 * new state to be created
61 * @see #State()
62 */
63 public State(String term, String label, String labelAbbrev) {
64 super(term, label, labelAbbrev);
65 }
66
67 //********* METHODS **************************************/
68 /**
69 * Creates a new empty state.
70 *
71 * @see #NewInstance(String, String, String)
72 */
73 public static State NewInstance(){
74 return new State();
75 }
76
77 /**
78 * Creates a new state with a description (in the {@link Language#DEFAULT() default language}),
79 * a label and a label abbreviation.
80 *
81 * @param term the string (in the default language) describing the
82 * new state to be created
83 * @param label the string identifying the new state to be created
84 * @param labelAbbrev the string identifying (in abbreviated form) the
85 * new state to be created
86 * @see #NewInstance()
87 */
88 public static State NewInstance(String term, String label, String labelAbbrev){
89 return new State(term, label, labelAbbrev);
90 }
91
92
93 }