Project

General

Profile

Download (3.13 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2016 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.io.common;
10

    
11
import eu.etaxonomy.cdm.database.ICdmDataSource;
12
import eu.etaxonomy.cdm.model.reference.Reference;
13

    
14
/**
15
 * @author k.luther
16
 * @date 08.07.2016
17
 *
18
 */
19
public class SortIndexUpdaterConfigurator extends ImportConfiguratorBase<DefaultImportState<SortIndexUpdaterConfigurator>, Object> implements IImportConfigurator{
20

    
21

    
22
    private boolean doTaxonNode = true;
23
    private boolean doFeatureNode = true;
24
    private boolean doPolytomousKeyNode = true;
25

    
26
    private String subTreeIndex = null;
27

    
28
    private SortIndexUpdaterConfigurator(ICdmDataSource destination){
29
        super(null);
30
        this.setDestination(destination);
31
    }
32

    
33
    /**
34
     * @param destination
35
     * @return
36
     */
37
    public static SortIndexUpdaterConfigurator NewInstance(ICdmDataSource destination) {
38
        SortIndexUpdaterConfigurator result = new SortIndexUpdaterConfigurator(destination);
39
        return result;
40
    }
41

    
42
    /**
43
     * @param destination
44
     * @return
45
     */
46
    public static SortIndexUpdaterConfigurator NewInstance(ICdmDataSource destination, boolean doTaxonNode, boolean doFeatureNode, boolean doPolytomousKeyNode) {
47
        SortIndexUpdaterConfigurator result = new SortIndexUpdaterConfigurator(destination);
48
        result.doFeatureNode = doFeatureNode;
49
        result.doTaxonNode = doTaxonNode;
50
        result.doPolytomousKeyNode = doPolytomousKeyNode;
51
        return result;
52
    }
53

    
54

    
55
 // **************** GETTER / SETTER ************************************
56

    
57

    
58
    /**
59
     * @return the doTaxonNode
60
     */
61
    public boolean isDoTaxonNode() {
62
        return doTaxonNode;
63
    }
64
    /**
65
     * @param doTaxonNode the doTaxonNode to set
66
     */
67
    public void setDoTaxonNode(boolean doTaxonNode) {
68
        this.doTaxonNode = doTaxonNode;
69
    }
70
    /**
71
     * @return the doPolytomousKeyNode
72
     */
73
    public boolean isDoPolytomousKeyNode() {
74
        return doPolytomousKeyNode;
75
    }
76
    /**
77
     * @param doPolytomousKeyNode the doPolytomousKeyNode to set
78
     */
79
    public void setDoPolytomousKeyNode(boolean doPolytomousKeyNode) {
80
        this.doPolytomousKeyNode = doPolytomousKeyNode;
81
    }
82
    /**
83
     * @return the doFeatureNode
84
     */
85
    public boolean isDoFeatureNode() {
86
        return doFeatureNode;
87
    }
88
    /**
89
     * @param doFeatureNode the doFeatureNode to set
90
     */
91
    public void setDoFeatureNode(boolean doFeatureNode) {
92
        this.doFeatureNode = doFeatureNode;
93
    }
94

    
95
    @Override
96
    public <STATE extends ImportStateBase> STATE getNewState() {
97
        return (STATE) new DefaultImportState(this);
98
    }
99

    
100

    
101
    @Override
102
    protected void makeIoClassList() {
103
        ioClassList = new Class[]{
104
                     SortIndexUpdaterWrapper.class
105
        };
106

    
107

    
108
    }
109

    
110

    
111
    @Override
112
    public Reference getSourceReference() {
113
        return null;
114
    }
115

    
116

    
117
    @Override
118
    public boolean isValid() {
119
        //as no source needs to exist
120
        return true;
121
    }
122

    
123

    
124
}
(52-52/61)