3 * Copyright (C) 2009 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.api
.service
.config
;
12 import org
.apache
.log4j
.Logger
;
14 import eu
.etaxonomy
.cdm
.api
.service
.INameService
;
17 * This class is used to configure name deletion.
19 * @see INameService#delete(eu.etaxonomy.cdm.model.name.TaxonNameBase)
25 public class NameDeletionConfigurator
extends DeleteConfiguratorBase
{
26 @SuppressWarnings("unused")
27 private static final Logger logger
= Logger
.getLogger(NameDeletionConfigurator
.class);
30 private boolean removeAllNameRelationships
= false;
32 private boolean ignoreIsBasionymFor
= false;
34 private boolean ignoreIsReplacedSynonymFor
= false;
36 private boolean ignoreHasBasionym
= true;
38 private boolean ignoreHasReplacedSynonym
= true;
40 private boolean removeAllNameTypeDesignations
= true;
42 * If true, all name relationships will be deleted prior to deleting the name.
43 * Exceptions will not be thrown due to existing name relationships.
44 * @return the removeAllNameRelationships
46 public boolean isRemoveAllNameRelationships() {
47 return removeAllNameRelationships
;
51 * @param removeAllNameRelationships the removeAllNameRelationships to set
53 public void setRemoveAllNameRelationships(boolean removeAllNameRelationships
) {
54 this.removeAllNameRelationships
= removeAllNameRelationships
;
58 * If true, all basionym relationships in which this name is the basionym/original name will be removed.
59 * Exceptions will not be thrown due to existing basionym relationships.
60 * This value is neglected if {@link #isRemoveAllNameRelationships()} is true.
61 * @see #setIgnoreIsBasionymFor(boolean)
62 * @return the ignoreIsBasionymFor
64 public boolean isIgnoreIsBasionymFor() {
65 return ignoreIsBasionymFor
;
69 * @see #isIgnoreIsBasionymFor()
70 * @param ignoreIsBasionymFor the ignoreIsBasionymFor to set
72 public void setIgnoreIsBasionymFor(boolean ignoreIsBasionymFor
) {
73 this.ignoreIsBasionymFor
= ignoreIsBasionymFor
;
77 * If true, all name relationships in which this name is a replaced synonym will be removed.
78 * Exceptions will not be thrown due to existing isReplacedSynonym relationships.
79 * This value is neglected if {@link #isRemoveAllNameRelationships()} is true.
80 * @see #setIgnoreIsReplacedSynonymFor(boolean)
81 * @return the ignoreIsReplacedSynonymFor
83 public boolean isIgnoreIsReplacedSynonymFor() {
84 return ignoreIsReplacedSynonymFor
;
88 * @see #isIgnoreIsReplacedSynonymFor()
89 * @param ignoreIsReplacedSynonymFor the ignoreIsReplacedSynonymFor to set
91 public void setIgnoreIsReplacedSynonymFor(boolean ignoreIsReplacedSynonymFor
) {
92 this.ignoreIsReplacedSynonymFor
= ignoreIsReplacedSynonymFor
;
96 * If true, all basionym relationships in which this name has a basionym/original name will
98 * Exceptions will not be thrown due to existing hasBasionym relationships.<BR>
99 * This value is neglected if {@link #isRemoveAllNameRelationships()} is true.<BR>
100 * Default value is <code>true</code>.<BR>
101 * @see #setIgnoreHasBasionym(boolean)
102 * @return the ignoreHasBasionym
104 public boolean isIgnoreHasBasionym() {
105 return ignoreHasBasionym
;
109 * @see #isIgnoreHasBasionym()
110 * @param ignoreHasBasionym the ignoreHasBasionym to set
112 public void setIgnoreHasBasionym(boolean ignoreHasBasionym
) {
113 this.ignoreHasBasionym
= ignoreHasBasionym
;
117 * If true, all replaced synonym relationships in which this name has a
118 * replaced synonym will be removed.<BR>
119 * Exceptions will not be thrown due to existing hasReplacedSynonym relationships.<BR>
120 * This value is neglected if {@link #isRemoveAllNameRelationships()} is true.<BR>
121 * Default value is <code>true</code>.<BR>
122 * @see #setIgnoreHasBasionym(boolean)
123 * @return the ignoreHasReplacedSynonym
125 public boolean isIgnoreHasReplacedSynonym() {
126 return ignoreHasReplacedSynonym
;
130 * @see #isIgnoreHasReplacedSynonym()
131 * @param ignoreHasReplacedSynonym the ignoreHasReplacedSynonym to set
133 public void setIgnoreHasReplacedSynonym(boolean ignoreHasReplacedSynonym
) {
134 this.ignoreHasReplacedSynonym
= ignoreHasReplacedSynonym
;
137 public boolean isRemoveAllNameTypeDesignations() {
138 return removeAllNameTypeDesignations
;