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