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
.common
;
13 import java
.util
.UUID
;
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
;
21 import org
.apache
.log4j
.Logger
;
22 import org
.hibernate
.envers
.Audited
;
25 * Annotation types ...
28 * @created 12-Nov-2008 15:37:33
30 @XmlAccessorType(XmlAccessType
.FIELD
)
31 @XmlType(name
= "AnnotationType")
32 @XmlRootElement(name
= "AnnotationType")
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);
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");
43 private static AnnotationType TECHNICAL
;
44 private static AnnotationType EDITORIAL
;
46 public static AnnotationType
NewInstance(String term
, String label
, String labelAbbrev
){
47 return new AnnotationType(term
, label
, labelAbbrev
);
55 public AnnotationType() {
63 protected AnnotationType(String term
, String label
, String labelAbbrev
) {
64 super(term
, label
, labelAbbrev
);
67 public static final AnnotationType
TECHNICAL(){
68 return AnnotationType
.TECHNICAL
;
71 public static final AnnotationType
EDITORIAL(){
72 return AnnotationType
.EDITORIAL
;
75 protected void setDefaultTerms(TermVocabulary
<AnnotationType
> termVocabulary
) {
76 AnnotationType
.TECHNICAL
= termVocabulary
.findTermByUuid(uuidTechnical
);
77 AnnotationType
.EDITORIAL
= termVocabulary
.findTermByUuid(uuidEditorial
);