2 * Copyright (C) 2020 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.
9 package eu
.etaxonomy
.cdm
.model
.taxon
;
12 import java
.util
.UUID
;
14 import javax
.xml
.bind
.annotation
.XmlEnumValue
;
16 import org
.apache
.logging
.log4j
.LogManager
;import org
.apache
.logging
.log4j
.Logger
;
18 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
19 import eu
.etaxonomy
.cdm
.model
.term
.EnumeratedTermVoc
;
20 import eu
.etaxonomy
.cdm
.model
.term
.IEnumTerm
;
26 public enum TaxonNodeStatus
implements IEnumTerm
<TaxonNodeStatus
>{
30 * The placement of the taxon is doubtful or preliminary.
32 @XmlEnumValue("Doubtful")
33 DOUBTFUL(UUID
.fromString("022ebae2-a020-4a8d-8ee1-886d98d3a4db"), "Doubtful", "DOU", "?", null),
37 * The taxon is not placed to the correct place (yet). Instead it is placed here.
39 @XmlEnumValue("Unplaced")
40 UNPLACED(UUID
.fromString("92809dee-8b3f-4fd5-a915-638d7c86b351"), "Unplaced", "UNP", "??", null),
44 * The taxon for some reason is excluded from the treatment this {@link TaxonNode} belongs too.
46 @XmlEnumValue("Excluded")
47 EXCLUDED(UUID
.fromString("23d259b6-2d7e-4df6-8745-0e24fbe63187"), "Excluded", "EXC", Character
.toString((char)248), null)
50 // **************** END ENUM **********************/
52 @SuppressWarnings("unused")
53 private static final Logger logger
= LogManager
.getLogger(TaxonNodeStatus
.class);
55 private String symbol
;
57 private TaxonNodeStatus(UUID uuid
, String defaultString
, String key
, String symbol
){
58 this(uuid
, defaultString
, key
, symbol
, null);
61 private TaxonNodeStatus(UUID uuid
, String defaultString
, String key
, String symbol
, TaxonNodeStatus parent
){
62 delegateVocTerm
= EnumeratedTermVoc
.addTerm(getClass(), this, uuid
, defaultString
, key
, parent
);
67 // *************************** DELEGATE **************************************/
69 private static EnumeratedTermVoc
<TaxonNodeStatus
> delegateVoc
;
70 private IEnumTerm
<TaxonNodeStatus
> delegateVocTerm
;
73 delegateVoc
= EnumeratedTermVoc
.getVoc(TaxonNodeStatus
.class);
77 public String
getKey(){return delegateVocTerm
.getKey();}
80 public String
getLabel(){return delegateVocTerm
.getLabel();}
83 public String
getLabel(Language language
){return delegateVocTerm
.getLabel(language
);}
86 public UUID
getUuid() {return delegateVocTerm
.getUuid();}
89 public TaxonNodeStatus
getKindOf() {return delegateVocTerm
.getKindOf();}
92 public Set
<TaxonNodeStatus
> getGeneralizationOf() {return delegateVocTerm
.getGeneralizationOf();}
95 public boolean isKindOf(TaxonNodeStatus ancestor
) {return delegateVocTerm
.isKindOf(ancestor
); }
98 public Set
<TaxonNodeStatus
> getGeneralizationOf(boolean recursive
) {return delegateVocTerm
.getGeneralizationOf(recursive
);}
100 public static TaxonNodeStatus
getByKey(String key
){return delegateVoc
.getByKey(key
);}
101 public static TaxonNodeStatus
getByUuid(UUID uuid
) {return delegateVoc
.getByUuid(uuid
);}
103 //**************** symbol **********************/
105 public String
getSymbol(){