Project

General

Profile

Download (1.9 KB) Statistics
| Branch: | Tag: | Revision:
1 7ae8a962 Andreas Müller
/**
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 org.apache.log4j.Logger;
14
15
import java.util.*;
16
17
import javax.persistence.*;
18
import javax.xml.bind.annotation.XmlAccessType;
19
import javax.xml.bind.annotation.XmlAccessorType;
20 efbd1acc a.babadshanjan
import javax.xml.bind.annotation.XmlRootElement;
21 7ae8a962 Andreas Müller
import javax.xml.bind.annotation.XmlType;
22
23
/**
24
 * Annotation types ...
25
 * @author a.mueller
26
 * @version 1.0
27
 * @created 12-Nov-2008 15:37:33
28
 */
29
@XmlAccessorType(XmlAccessType.FIELD)
30 efbd1acc a.babadshanjan
@XmlType(name = "AnnotationType")
31
@XmlRootElement(name = "AnnotationType")
32 7ae8a962 Andreas Müller
@Entity
33
public class AnnotationType extends DefinedTermBase {
34 0d575644 Andreas Müller
	private static final long serialVersionUID = 49629121282854575L;
35
	@SuppressWarnings("unused")
36
	private static final Logger logger = Logger.getLogger(AnnotationType.class);
37 7ae8a962 Andreas Müller
38
	private static final UUID uuidTechnical = UUID.fromString("6a5f9ea4-1bdd-4906-89ad-6e669f982d69");
39
	private static final UUID uuidEditorial = UUID.fromString("34204192-b41d-4857-a1d4-28992bef2a2a");
40
	
41
	public static AnnotationType NewInstance(String term, String label, String labelAbbrev){
42
		return new AnnotationType(term, label, labelAbbrev);
43
	}
44
	
45
	/**
46
	 * Constructor
47
	 * @param term
48
	 * @param label
49
	 */
50
	public AnnotationType() {
51
		super();
52
	}
53
	
54
	/**
55
	 * Constructor
56
	 * @param term
57
	 * @param label
58
	 */
59
	protected AnnotationType(String term, String label, String labelAbbrev) {
60
		super(term, label, labelAbbrev);
61
	}
62
	
63
64
	public static final AnnotationType getByUuid(UUID uuid){
65
		return (AnnotationType) findByUuid(uuid);
66
	}	
67
68
69
	public static final AnnotationType TECHNICAL(){
70
		return getByUuid(uuidTechnical);
71
	}
72
73
	public static final AnnotationType EDITORIAL(){
74
		return getByUuid(uuidEditorial);
75
	}
76
77
}