Project

General

Profile

Download (3.23 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
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.
9
*/
10

    
11
package eu.etaxonomy.cdm.io.markup;
12

    
13
import java.util.HashSet;
14
import java.util.Set;
15

    
16
import org.apache.log4j.Logger;
17

    
18
import eu.etaxonomy.cdm.io.common.XmlImportState;
19
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
20
import eu.etaxonomy.cdm.model.common.Language;
21
import eu.etaxonomy.cdm.model.description.FeatureNode;
22
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
23
import eu.etaxonomy.cdm.model.taxon.Taxon;
24

    
25
/**
26
 * @author a.mueller
27
 * @created 11.05.2009
28
 * @version 1.0
29
 */
30
public class MarkupImportState extends XmlImportState<MarkupImportConfigurator, MarkupImportBase>{
31
	@SuppressWarnings("unused")
32
	private static final Logger logger = Logger.getLogger(MarkupImportState.class);
33
	
34

    
35
	private UnmatchedLeads unmatchedLeads;
36

    
37
	private Set<FeatureNode> featureNodesToSave = new HashSet<FeatureNode>();
38
	
39
	private Set<PolytomousKeyNode> polytomousKeyNodesToSave = new HashSet<PolytomousKeyNode>();
40
	
41
	private Language defaultLanguage;
42
	
43
	private Taxon currentTaxon;
44
	
45
	private boolean isCitation = false;
46
	private boolean isNameType = false;
47
		
48
//**************************** CONSTRUCTOR ******************************************/
49
	
50
	public MarkupImportState(MarkupImportConfigurator config) {
51
		super(config);
52
		if (getTransformer() == null){
53
			IInputTransformer newTransformer = config.getTransformer();
54
			if (newTransformer == null){
55
				newTransformer = new MarkupTransformer();
56
			}
57
			setTransformer(newTransformer);
58
		}
59
	}
60

    
61
// ********************************** GETTER / SETTER *************************************/	
62
	
63
	public UnmatchedLeads getUnmatchedLeads() {
64
		return unmatchedLeads;
65
	}
66

    
67
	public void setUnmatchedLeads(UnmatchedLeads unmatchedKeys) {
68
		this.unmatchedLeads = unmatchedKeys;
69
	}
70

    
71
	public void setFeatureNodesToSave(Set<FeatureNode> featureNodesToSave) {
72
		this.featureNodesToSave = featureNodesToSave;
73
	}
74

    
75
	public Set<FeatureNode> getFeatureNodesToSave() {
76
		return featureNodesToSave;
77
	}
78

    
79
	public Set<PolytomousKeyNode> getPolytomousKeyNodesToSave() {
80
		return polytomousKeyNodesToSave;
81
	}
82
	
83
	public void setPolytomousKeyNodesToSave(Set<PolytomousKeyNode> polytomousKeyNodesToSave) {
84
		this.polytomousKeyNodesToSave = polytomousKeyNodesToSave;
85
	}
86
	
87
	public Language getDefaultLanguage() {
88
		return this.defaultLanguage;
89
	}
90

    
91
	public void setDefaultLanguage(Language defaultLanguage){
92
		this.defaultLanguage = defaultLanguage;
93
	}
94

    
95
	
96
	public void setCurrentTaxon(Taxon currentTaxon) {
97
		this.currentTaxon = currentTaxon;
98
	}
99

    
100
	public Taxon getCurrentTaxon() {
101
		return currentTaxon;
102
	}
103

    
104

    
105
	/**
106
	 * Is the import currently handling a citation?
107
	 * @return
108
	 */
109
	public boolean isCitation() {
110
		return isCitation;
111
	}
112
	
113
	public void setCitation(boolean isCitation) {
114
		this.isCitation = isCitation;
115
	}
116

    
117

    
118
	public boolean isNameType() {
119
		return isNameType;
120
	}
121
	
122
	public void setNameType(boolean isNameType) {
123
		this.isNameType = isNameType;
124
	}
125

    
126

    
127

    
128

    
129

    
130

    
131
}
(5-5/8)