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 java
.util
.UUID
;
15 import org
.apache
.log4j
.Logger
;
17 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
18 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
19 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
21 import javax
.persistence
.*;
22 import javax
.xml
.bind
.annotation
.XmlAccessType
;
23 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
24 import javax
.xml
.bind
.annotation
.XmlRootElement
;
25 import javax
.xml
.bind
.annotation
.XmlType
;
28 * This class represents terms describing different types of absence
29 * (like "extinct" or just "absent") of a {@link Taxon taxon} in a {@link NamedArea particular area}.
33 * @created 08-Nov-2007 13:06:08
35 @XmlAccessorType(XmlAccessType
.FIELD
)
36 @XmlType(name
= "AbsenceTerm")
37 @XmlRootElement(name
= "AbsenceTerm")
39 public class AbsenceTerm
extends PresenceAbsenceTermBase
<AbsenceTerm
> {
40 private static final Logger logger
= Logger
.getLogger(AbsenceTerm
.class);
43 * Creates a new empty absence term.
45 * @see #NewInstance(String, String, String)
47 public static AbsenceTerm
NewInstance(){
48 return new AbsenceTerm();
52 * Creates a new absence term with a description (in the {@link Language#DEFAULT() default language}),
53 * a label and a label abbreviation.
55 * @param term the string (in the default language) describing the
56 * new absence term to be created
57 * @param label the string identifying the new absence term to be created
58 * @param labelAbbrev the string identifying (in abbreviated form) the
59 * new absence term to be created
62 public static AbsenceTerm
NewInstance(String term
, String label
, String labelAbbrev
){
63 return new AbsenceTerm(term
, label
, labelAbbrev
);
66 // ************* CONSTRUCTORS *************/
68 * Class constructor: creates a new empty absence term.
70 * @see #AbsenceTerm(String, String, String)
72 public AbsenceTerm() {
77 * Class constructor: creates a new absence term with a description (in the {@link Language#DEFAULT() default language}),
78 * a label and a label abbreviation.
80 * @param term the string (in the default language) describing the
81 * new absence term to be created
82 * @param label the string identifying the new absence term to be created
83 * @param labelAbbrev the string identifying (in abbreviated form) the
84 * new absence term to be created
87 public AbsenceTerm(String term
, String label
, String labelAbbrev
) {
88 super(term
, label
, labelAbbrev
);
91 //********* METHODS **************************************/
93 private static final UUID uuidAbsence
=UUID
.fromString("59709861-f7d9-41f9-bb21-92559cedd598");
97 public static final AbsenceTerm
getByUuid(UUID uuid
){
98 return (AbsenceTerm
)findByUuid(uuid
);
101 public static final AbsenceTerm
ABSENT(){return getByUuid(uuidAbsence
);}