more Matching and bugfix in IdentifiableEntity.clone()
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / agent / InstitutionType.java
index 9c7968c7e273b541519eaecd12d0571e8d74a4d8..cefac051a20da333c5d073a0830944d2f37d7f8e 100644 (file)
@@ -9,29 +9,40 @@
 
 package eu.etaxonomy.cdm.model.agent;
 
-import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import javax.persistence.Entity;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
 import org.apache.log4j.Logger;
-import javax.persistence.*;
+import org.hibernate.envers.Audited;
+
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
 
 /**
- * Represents an element of a controlled {@link common.TermVocabulary vocabulary} for different kinds of institutions.
- * Each {@link common.DefinedTermBase element} belongs to one vocabulary.
+ * Represents an element of a controlled {@link eu.etaxonomy.cdm.model.common.TermVocabulary vocabulary} for different kinds of institutions.
+ * Each {@link DefinedTermBase element} belongs to one vocabulary.
  * <p>
- * See also the <a href="http://rs.tdwg.org/ontology/voc/InstitutionType">TDWG Ontology</a>
- * 
+ * This class corresponds to: InstitutionTypeTerm according to the TDWG ontology.
  * 
  * @author m.doering
  * @version 1.0
  * @created 08-Nov-2007 13:06:30
  */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "InstitutionType")
 @Entity
-public class InstitutionType extends DefinedTermBase {
-       static Logger logger = Logger.getLogger(InstitutionType.class);
+@Audited
+public class InstitutionType extends DefinedTermBase<InstitutionType> {
+       private static final long serialVersionUID = 8714866112728127219L;
+       public static final Logger logger = Logger.getLogger(InstitutionType.class);
 
+       // ************* CONSTRUCTORS *************/    
        /** 
-        * Class constructor.
+        * Class constructor: creates a new empty institution type.
         * 
-        * @see #InstitutionType(String, String)
+        * @see #InstitutionType(String, String, String)
         */
        public InstitutionType() {
                super();
@@ -39,19 +50,27 @@ public class InstitutionType extends DefinedTermBase {
        }
 
        /** 
-        * Class constructor using both term and label strings.
+        * Class constructor using a description (in the {@link eu.etaxonomy.cdm.model.common.Language#DEFAULT() default language}),
+        * a label and a label abbreviation.
         *
-        * @param  term   the string describing this vocabulary element
-        *                                in the default language
-        * @param  label  the string which identifies this vocabulary element
-        *                                irrespective of the language
-        * @see           common.Representation
-        * @see           common.TermBase#TermBase(String, String)
+        * @param       term             the string describing this new vocabulary element
+        * @param       label            the string which identifies this new vocabulary element
+        * @param       labelAbbrev  the string identifying (in abbreviated form) this
+        *                                               new vocabulary element
+        * @see                          #InstitutionType()
+        * @see                          eu.etaxonomy.cdm.model.common.Representation
+        * @see                          eu.etaxonomy.cdm.model.common.TermBase#TermBase(String, String, String)
         */
-       public InstitutionType(String term, String label) {
-               super(term, label);
+       public InstitutionType(String term, String label, String labelAbbrev) {
+               super(term, label, labelAbbrev);
                // TODO Auto-generated constructor stub
        }
 
+       @Override
+       protected void setDefaultTerms(TermVocabulary<InstitutionType> termVocabulary) {
+               // TODO Auto-generated method stub
+               
+       }
+
        
 }
\ No newline at end of file