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 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
|
import javax.xml.bind.annotation.XmlType;
|
21
|
|
22
|
/**
|
23
|
* Marker types similar to dynamically defined attributes. These content types
|
24
|
* like "IS_DOUBTFUL", "COMPLETE" or specific local flags.
|
25
|
* @author m.doering
|
26
|
* @version 1.0
|
27
|
* @created 08-Nov-2007 13:06:33
|
28
|
*/
|
29
|
@XmlAccessorType(XmlAccessType.FIELD)
|
30
|
@XmlType(name = "MarkerType")
|
31
|
@Entity
|
32
|
public class MarkerType extends DefinedTermBase {
|
33
|
private static final long serialVersionUID = -9117424749919907396L;
|
34
|
public static final Logger logger = Logger.getLogger(MarkerType.class);
|
35
|
|
36
|
private static final UUID uuidImported = UUID.fromString("96878790-4ceb-42a2-9738-a2242079b679");
|
37
|
private static final UUID uuidToBeChecked = UUID.fromString("34204192-b41d-4857-a1d4-28992bef2a2a");
|
38
|
private static final UUID uuidIsDoubtful = UUID.fromString("b51325c8-05fe-421a-832b-d86fc249ef6e");
|
39
|
private static final UUID uuidComplete = UUID.fromString("b4b1b2ab-89a8-4ce6-8110-d60b8b1bc433");
|
40
|
|
41
|
public static MarkerType NewInstance(String term, String label, String labelAbbrev){
|
42
|
return new MarkerType(term, label, labelAbbrev);
|
43
|
}
|
44
|
|
45
|
/**
|
46
|
* Constructor
|
47
|
* @param term
|
48
|
* @param label
|
49
|
*/
|
50
|
public MarkerType() {
|
51
|
super();
|
52
|
}
|
53
|
|
54
|
/**
|
55
|
* Constructor
|
56
|
* @param term
|
57
|
* @param label
|
58
|
*/
|
59
|
protected MarkerType(String term, String label, String labelAbbrev) {
|
60
|
super(term, label, labelAbbrev);
|
61
|
}
|
62
|
|
63
|
|
64
|
public static final MarkerType getByUuid(UUID uuid){
|
65
|
return (MarkerType) findByUuid(uuid);
|
66
|
}
|
67
|
|
68
|
|
69
|
public static final MarkerType IMPORTED(){
|
70
|
return getByUuid(uuidImported);
|
71
|
}
|
72
|
|
73
|
public static final MarkerType TO_BE_CHECKED(){
|
74
|
return getByUuid(uuidToBeChecked);
|
75
|
}
|
76
|
|
77
|
public static final MarkerType IS_DOUBTFUL(){
|
78
|
return getByUuid(uuidIsDoubtful);
|
79
|
}
|
80
|
|
81
|
public static final MarkerType COMPLETE(){
|
82
|
return getByUuid(uuidComplete);
|
83
|
}
|
84
|
|
85
|
}
|