Project

General

Profile

Download (4.57 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2009 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
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.
8
*/
9
package eu.etaxonomy.cdm.api.service.config;
10

    
11
import org.apache.log4j.Logger;
12

    
13
import eu.etaxonomy.cdm.api.service.INameService;
14

    
15
/**
16
 * This class is used to configure name deletion.
17
 * 
18
 * @see INameService#delete(eu.etaxonomy.cdm.model.name.TaxonName)
19
 * 
20
 * @author a.mueller
21
 * @since 19.09.2011
22
 *
23
 */
24
public class NameDeletionConfigurator  extends DeleteConfiguratorBase {
25
	@SuppressWarnings("unused")
26
	private static final Logger logger = Logger.getLogger(NameDeletionConfigurator.class);
27

    
28

    
29
	private boolean removeAllNameRelationships = false;
30
	
31
	private boolean ignoreIsBasionymFor = false;
32
	
33
	private boolean ignoreIsReplacedSynonymFor = false;
34

    
35
	private boolean ignoreHasBasionym = true;
36
	
37
	private boolean ignoreHasReplacedSynonym = true;
38
	
39
	private boolean removeAllNameTypeDesignations = true;
40
	/**
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
44
	 */
45
	public boolean isRemoveAllNameRelationships() {
46
		return removeAllNameRelationships;
47
	}
48

    
49
	/**
50
	 * @param removeAllNameRelationships the removeAllNameRelationships to set
51
	 */
52
	public void setRemoveAllNameRelationships(boolean removeAllNameRelationships) {
53
		this.removeAllNameRelationships = removeAllNameRelationships;
54
	}
55

    
56
	/**
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
62
	 */
63
	public boolean isIgnoreIsBasionymFor() {
64
		return ignoreIsBasionymFor;
65
	}
66

    
67
	/**
68
	 * @see #isIgnoreIsBasionymFor()
69
	 * @param ignoreIsBasionymFor the ignoreIsBasionymFor to set
70
	 */
71
	public void setIgnoreIsBasionymFor(boolean ignoreIsBasionymFor) {
72
		this.ignoreIsBasionymFor = ignoreIsBasionymFor;
73
	}
74

    
75
	/**
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
81
	 */
82
	public boolean isIgnoreIsReplacedSynonymFor() {
83
		return ignoreIsReplacedSynonymFor;
84
	}
85

    
86
	/**
87
	 * @see #isIgnoreIsReplacedSynonymFor()
88
	 * @param ignoreIsReplacedSynonymFor the ignoreIsReplacedSynonymFor to set
89
	 */
90
	public void setIgnoreIsReplacedSynonymFor(boolean ignoreIsReplacedSynonymFor) {
91
		this.ignoreIsReplacedSynonymFor = ignoreIsReplacedSynonymFor;
92
	}
93
	
94
	/**
95
	 * If true, all basionym relationships in which this name has a basionym/original name will 
96
	 * be removed.<BR>
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
102
	 */
103
	public boolean isIgnoreHasBasionym() {
104
		return ignoreHasBasionym;
105
	}
106

    
107
	/**
108
	 * @see #isIgnoreHasBasionym()
109
	 * @param ignoreHasBasionym the ignoreHasBasionym to set
110
	 */
111
	public void setIgnoreHasBasionym(boolean ignoreHasBasionym) {
112
		this.ignoreHasBasionym = ignoreHasBasionym;
113
	}
114

    
115
	/**
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
123
	 */
124
	public boolean isIgnoreHasReplacedSynonym() {
125
		return ignoreHasReplacedSynonym;
126
	}
127

    
128
	/**
129
	 * @see #isIgnoreHasReplacedSynonym()
130
	 * @param ignoreHasReplacedSynonym the ignoreHasReplacedSynonym to set
131
	 */
132
	public void setIgnoreHasReplacedSynonym(boolean ignoreHasReplacedSynonym) {
133
		this.ignoreHasReplacedSynonym = ignoreHasReplacedSynonym;
134
	}
135

    
136
	public boolean isRemoveAllNameTypeDesignations() {
137
		return removeAllNameTypeDesignations;
138
	}
139
	
140
}
(15-15/30)