commit after merge from trunc
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / common / AnnotationType.java
index ab47f866d3e35bf8db2f74d0759f3ec5492a3c2a..a68c732ad9aef4e4e6608e0762f4d18d210343a3 100644 (file)
@@ -27,7 +27,6 @@ import org.hibernate.search.annotations.Indexed;
 /**
  * Annotation types ...
  * @author a.mueller
- * @version 1.0
  * @created 12-Nov-2008 15:37:33
  */
 @XmlAccessorType(XmlAccessType.FIELD)
@@ -45,18 +44,17 @@ public class AnnotationType extends DefinedTermBase<AnnotationType> {
        
        private static final UUID uuidTechnical = UUID.fromString("6a5f9ea4-1bdd-4906-89ad-6e669f982d69");
        private static final UUID uuidEditorial = UUID.fromString("e780d5fd-abfc-4025-938a-46deb751d808");
-       private static final UUID uuidTreeIndex = UUID.fromString("28f4e205-1d02-4d3a-8288-775ea8413009");
 
        public static AnnotationType NewInstance(String term, String label, String labelAbbrev){
                return new AnnotationType(term, label, labelAbbrev);
        }
        
-       /**
-        * Constructor
-        * @param term
-        * @param label
-        */
-       public AnnotationType() {
+//********************************** Constructor *******************************************************************/  
+
+       //for hibernate use only
+       @Deprecated
+       protected AnnotationType() {
+               super(TermType.AnnotationType);
        }
        
        /**
@@ -65,12 +63,20 @@ public class AnnotationType extends DefinedTermBase<AnnotationType> {
         * @param label
         */
        protected AnnotationType(String term, String label, String labelAbbrev) {
-               super(term, label, labelAbbrev);
+               super(TermType.AnnotationType , term, label, labelAbbrev);
        }
 
        
 //************************** METHODS ********************************
        
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.cdm.model.common.DefinedTermBase#resetTerms()
+        */
+       @Override
+       public void resetTerms(){
+               termMap = null;
+       }
+       
        protected static AnnotationType getTermByUuid(UUID uuid){
                if (termMap == null){
                        return null;  //better return null then initialize the termMap in an unwanted way 
@@ -86,10 +92,6 @@ public class AnnotationType extends DefinedTermBase<AnnotationType> {
        public static final AnnotationType EDITORIAL(){
                return getTermByUuid(uuidEditorial);
        }
-       
-       public static final AnnotationType TREEINDEX(){
-               return getTermByUuid(uuidTreeIndex);
-       }
 
        protected void setDefaultTerms(TermVocabulary<AnnotationType> termVocabulary) {
                termMap = new HashMap<UUID, AnnotationType>();