2 * Copyright (C) 2007 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
.name
;
13 import eu
.etaxonomy
.cdm
.model
.common
.ReferencedEntityBase
;
14 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceBase
;
16 import org
.apache
.log4j
.Logger
;
17 import org
.hibernate
.annotations
.Cascade
;
18 import org
.hibernate
.annotations
.CascadeType
;
21 import javax
.persistence
.*;
24 * {only for typified names which have a rank above "species", in this case the
25 * type has to be a "species" name}
28 * @created 08-Nov-2007 13:06:38
31 public class NameTypeDesignation
extends ReferencedEntityBase
{
32 static Logger logger
= Logger
.getLogger(NameTypeDesignation
.class);
33 private boolean isRejectedType
;
34 private boolean isConservedType
;
35 private TaxonNameBase typeSpecies
;
36 private TaxonNameBase typifiedName
;
38 public NameTypeDesignation(TaxonNameBase typifiedName
, TaxonNameBase typeSpecies
, ReferenceBase citation
, String citationMicroReference
,
39 String originalNameString
, boolean isRejectedType
, boolean isConservedType
) {
40 super(citation
, citationMicroReference
, originalNameString
);
41 this.setTypeSpecies(typeSpecies
);
42 this.setTypifiedName(typifiedName
);
43 this.isRejectedType
= isRejectedType
;
44 this.isConservedType
= isConservedType
;
48 @Cascade({CascadeType
.SAVE_UPDATE
})
49 public TaxonNameBase
getTypifiedName() {
52 private void setTypifiedName(TaxonNameBase typifiedName
) {
53 this.typifiedName
= typifiedName
;
54 typifiedName
.nameTypeDesignations
.add(this);
59 @Cascade({CascadeType
.SAVE_UPDATE
})
60 public TaxonNameBase
getTypeSpecies(){
61 return this.typeSpecies
;
63 private void setTypeSpecies(TaxonNameBase typeSpecies
){
64 this.typeSpecies
= typeSpecies
;
67 public boolean isRejectedType(){
68 return this.isRejectedType
;
70 public void setRejectedType(boolean isRejectedType
){
71 this.isRejectedType
= isRejectedType
;
74 public boolean isConservedType(){
75 return this.isConservedType
;
77 public void setConservedType(boolean isConservedType
){
78 this.isConservedType
= isConservedType
;