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;
41 * If true, all name relationships will be deleted prior to deleting the name.
42 * Exceptions will not be thrown due to existing name relationships.
43 * @return the removeAllNameRelationships
45 public boolean isRemoveAllNameRelationships() {
46 return removeAllNameRelationships
;
50 * @param removeAllNameRelationships the removeAllNameRelationships to set
52 public void setRemoveAllNameRelationships(boolean removeAllNameRelationships
) {
53 this.removeAllNameRelationships
= removeAllNameRelationships
;
57 * If true, all basionym relationships in which this name is the basionym/original name will be removed.
58 * Exceptions will not be thrown due to existing basionym relationships.
59 * This value is neglected if {@link #isRemoveAllNameRelationships()} is true.
60 * @see #setIgnoreIsBasionymFor(boolean)
61 * @return the ignoreIsBasionymFor
63 public boolean isIgnoreIsBasionymFor() {
64 return ignoreIsBasionymFor
;
68 * @see #isIgnoreIsBasionymFor()
69 * @param ignoreIsBasionymFor the ignoreIsBasionymFor to set
71 public void setIgnoreIsBasionymFor(boolean ignoreIsBasionymFor
) {
72 this.ignoreIsBasionymFor
= ignoreIsBasionymFor
;
76 * If true, all name relationships in which this name is a replaced synonym will be removed.
77 * Exceptions will not be thrown due to existing isReplacedSynonym relationships.
78 * This value is neglected if {@link #isRemoveAllNameRelationships()} is true.
79 * @see #setIgnoreIsReplacedSynonymFor(boolean)
80 * @return the ignoreIsReplacedSynonymFor
82 public boolean isIgnoreIsReplacedSynonymFor() {
83 return ignoreIsReplacedSynonymFor
;
87 * @see #isIgnoreIsReplacedSynonymFor()
88 * @param ignoreIsReplacedSynonymFor the ignoreIsReplacedSynonymFor to set
90 public void setIgnoreIsReplacedSynonymFor(boolean ignoreIsReplacedSynonymFor
) {
91 this.ignoreIsReplacedSynonymFor
= ignoreIsReplacedSynonymFor
;
95 * If true, all basionym relationships in which this name has a basionym/original name will
97 * Exceptions will not be thrown due to existing hasBasionym relationships.<BR>
98 * This value is neglected if {@link #isRemoveAllNameRelationships()} is true.<BR>
99 * Default value is <code>true</code>.<BR>
100 * @see #setIgnoreHasBasionym(boolean)
101 * @return the ignoreHasBasionym
103 public boolean isIgnoreHasBasionym() {
104 return ignoreHasBasionym
;
108 * @see #isIgnoreHasBasionym()
109 * @param ignoreHasBasionym the ignoreHasBasionym to set
111 public void setIgnoreHasBasionym(boolean ignoreHasBasionym
) {
112 this.ignoreHasBasionym
= ignoreHasBasionym
;
116 * If true, all replaced synonym relationships in which this name has a
117 * replaced synonym will be removed.<BR>
118 * Exceptions will not be thrown due to existing hasReplacedSynonym relationships.<BR>
119 * This value is neglected if {@link #isRemoveAllNameRelationships()} is true.<BR>
120 * Default value is <code>true</code>.<BR>
121 * @see #setIgnoreHasBasionym(boolean)
122 * @return the ignoreHasReplacedSynonym
124 public boolean isIgnoreHasReplacedSynonym() {
125 return ignoreHasReplacedSynonym
;
129 * @see #isIgnoreHasReplacedSynonym()
130 * @param ignoreHasReplacedSynonym the ignoreHasReplacedSynonym to set
132 public void setIgnoreHasReplacedSynonym(boolean ignoreHasReplacedSynonym
) {
133 this.ignoreHasReplacedSynonym
= ignoreHasReplacedSynonym
;