2 * Copyright (C) 2009 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
.occurrence
;
12 import java
.util
.HashMap
;
14 import java
.util
.UUID
;
16 import javax
.persistence
.Entity
;
17 import javax
.xml
.bind
.annotation
.XmlAccessType
;
18 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
19 import javax
.xml
.bind
.annotation
.XmlRootElement
;
20 import javax
.xml
.bind
.annotation
.XmlType
;
22 import org
.apache
.log4j
.Logger
;
23 import org
.hibernate
.envers
.Audited
;
24 import org
.hibernate
.search
.annotations
.Indexed
;
26 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
27 import eu
.etaxonomy
.cdm
.model
.description
.Modifier
;
28 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
29 import eu
.etaxonomy
.cdm
.model
.location
.TdwgArea
;
32 * modifier for a determination.
33 * can be cf. det. rev. conf. for example
37 @XmlAccessorType(XmlAccessType
.FIELD
)
38 @XmlType(name
= "DeterminationModifier")
39 @XmlRootElement(name
= "DeterminationModifier")
41 @Indexed(index
= "eu.etaxonomy.cdm.model.common.DefinedTermBase")
43 public class DeterminationModifier
extends Modifier
{
44 private static final Logger logger
= Logger
.getLogger(DeterminationModifier
.class);
46 private static final UUID uuidUnknown
= UUID
.fromString("00000000-0000-0000-0000-000000000000");
48 protected static Map
<UUID
, DeterminationModifier
> termMap
= null;
54 public static DeterminationModifier
NewInstance() {
55 return new DeterminationModifier();
62 public static DeterminationModifier
NewInstance(String term
, String label
, String labelAbbrev
) {
63 return new DeterminationModifier(term
, label
, labelAbbrev
);
70 public DeterminationModifier() {
77 protected DeterminationModifier(String term
, String label
, String labelAbbrev
) {
78 super(term
, label
, labelAbbrev
);
82 protected void setDefaultTerms(TermVocabulary
<Modifier
> termVocabulary
) {
83 termMap
= new HashMap
<UUID
, DeterminationModifier
>();
84 for (Modifier term
: termVocabulary
.getTerms()){
85 termMap
.put(term
.getUuid(), (DeterminationModifier
)term
); //TODO casting