Deleting empty compareTo methods from DefinedTerms
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / common / AnnotationType.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.common;
11
12
13 import java.util.UUID;
14
15 import javax.persistence.Entity;
16 import javax.xml.bind.annotation.XmlAccessType;
17 import javax.xml.bind.annotation.XmlAccessorType;
18 import javax.xml.bind.annotation.XmlRootElement;
19 import javax.xml.bind.annotation.XmlType;
20
21 import org.apache.log4j.Logger;
22 import org.hibernate.envers.Audited;
23
24 /**
25 * Annotation types ...
26 * @author a.mueller
27 * @version 1.0
28 * @created 12-Nov-2008 15:37:33
29 */
30 @XmlAccessorType(XmlAccessType.FIELD)
31 @XmlType(name = "AnnotationType")
32 @XmlRootElement(name = "AnnotationType")
33 @Entity
34 @Audited
35 public class AnnotationType extends DefinedTermBase<AnnotationType> {
36 private static final long serialVersionUID = 49629121282854575L;
37 @SuppressWarnings("unused")
38 private static final Logger logger = Logger.getLogger(AnnotationType.class);
39
40 private static final UUID uuidTechnical = UUID.fromString("6a5f9ea4-1bdd-4906-89ad-6e669f982d69");
41 private static final UUID uuidEditorial = UUID.fromString("34204192-b41d-4857-a1d4-28992bef2a2a");
42
43 private static AnnotationType TECHNICAL;
44 private static AnnotationType EDITORIAL;
45
46 public static AnnotationType NewInstance(String term, String label, String labelAbbrev){
47 return new AnnotationType(term, label, labelAbbrev);
48 }
49
50 /**
51 * Constructor
52 * @param term
53 * @param label
54 */
55 public AnnotationType() {
56 super();
57 }
58
59 /**
60 * Constructor
61 * @param term
62 * @param label
63 */
64 protected AnnotationType(String term, String label, String labelAbbrev) {
65 super(term, label, labelAbbrev);
66 }
67
68 public static final AnnotationType TECHNICAL(){
69 return AnnotationType.TECHNICAL;
70 }
71
72 public static final AnnotationType EDITORIAL(){
73 return AnnotationType.EDITORIAL;
74 }
75
76 protected void setDefaultTerms(TermVocabulary<AnnotationType> termVocabulary) {
77 AnnotationType.TECHNICAL = termVocabulary.findTermByUuid(uuidTechnical);
78 AnnotationType.EDITORIAL = termVocabulary.findTermByUuid(uuidEditorial);
79 }
80
81 }