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
.ITaxonNodeService
;
17 * This class is used to configure taxon node deletion.
19 * @see ITaxonNodeService#delete(eu.etaxonomy.cdm.model.taxon.TaxonNode)
25 public class TermDeletionConfigurator
extends DeleteConfiguratorBase
{
26 @SuppressWarnings("unused")
27 private static final Logger logger
= Logger
.getLogger(TermDeletionConfigurator
.class);
29 private boolean deleteIncludedTerms
= false;
31 private boolean deleteIncludedRelations
= false;
33 private boolean deletePartOfRelations
= true;
35 private boolean deleteGeneralizationOfRelations
= false;
37 private boolean deleteKindOfRelations
= true;
39 private boolean deleteMediaIfPossible
= false;
42 // * If <code>true</code> all included terms are also deleted (recursivly).<BR>
43 // * Default value is <code>true</code>.
45 // public boolean isDeleteIncludedTerms() {
46 // return deleteIncludedTerms;
48 // public void setDeleteIncludedTerms(boolean deleteIncludedTerms) {
49 // this.deleteIncludedTerms = deleteIncludedTerms;
53 * If <code>true</code> included terms will be attached to the parent
54 * of <code>this</code> term. If <code>this</code> term has no parent, included terms
55 * will become top level terms. <BR>
56 * Default value is <code>false</code>.
58 public boolean isDeleteIncludedRelations() {
59 return deleteIncludedRelations
;
61 public void setDeleteIncludedRelations(boolean deleteIncludedRelations
) {
62 this.deleteIncludedRelations
= deleteIncludedRelations
;
66 * If <code>true</code> <code>this</code> term will be detached from its parent
67 * term. If <code>false</code> the deletion will be aborted if <code>this</code>
68 * term is part of another term.<BR>
69 * Default value is <code>true</code>.
71 public boolean isDeletePartOfRelations() {
72 return deletePartOfRelations
;
74 public void setDeletePartOfRelations(boolean deletePartOfRelations
) {
75 this.deletePartOfRelations
= deletePartOfRelations
;
80 * If <code>true</code> more specific terms will be detached from this term prior to
81 * deletion. If <code>this</code> term has a generalization itself the specific terms will be
82 * attached to this generalization.<BR>
83 * If <code>false</code> deletion will be aborted if <code>this</code>
84 * term is a generalization of any another term.
86 * Default value is <code>false</code>.
88 public boolean isDeleteGeneralizationOfRelations() {
89 return deleteGeneralizationOfRelations
;
91 public void setDeleteGeneralizationOfRelations( boolean deleteGeneralizationOfRelations
) {
92 this.deleteGeneralizationOfRelations
= deleteGeneralizationOfRelations
;
96 * If <code>true</code> <code>this</code> term will be detached from the general term.
97 * If <code>false</code> the deletion will be aborted if <code>this</code>
98 * term is kind of another term.<BR>
99 * Default value is <code>true</code>.
101 public boolean isDeleteKindOfRelations() {
102 return deleteKindOfRelations
;
104 public void setDeleteKindOfRelations(boolean deleteKindOfRelations
) {
105 this.deleteKindOfRelations
= deleteKindOfRelations
;