2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.io
.eflora
;
12 import java
.util
.HashSet
;
15 import org
.apache
.log4j
.Logger
;
17 import eu
.etaxonomy
.cdm
.io
.common
.ImportStateBase
;
18 import eu
.etaxonomy
.cdm
.io
.common
.mapping
.IInputTransformer
;
19 import eu
.etaxonomy
.cdm
.io
.eflora
.EfloraImportBase
;
20 import eu
.etaxonomy
.cdm
.io
.eflora
.EfloraTransformer
;
21 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
22 import eu
.etaxonomy
.cdm
.model
.description
.FeatureNode
;
23 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKeyNode
;
30 public class EfloraImportState
extends ImportStateBase
<EfloraImportConfigurator
, EfloraImportBase
>{
31 @SuppressWarnings("unused")
32 private static final Logger logger
= Logger
.getLogger(EfloraImportState
.class);
35 private UnmatchedLeads unmatchedLeads
;
37 private Set
<FeatureNode
> featureNodesToSave
= new HashSet
<FeatureNode
>();
39 private Set
<PolytomousKeyNode
> polytomousKeyNodesToSave
= new HashSet
<PolytomousKeyNode
>();
42 private Language defaultLanguage
;
44 //**************************** CONSTRUCTOR ******************************************/
46 public EfloraImportState(EfloraImportConfigurator config
) {
48 if (getTransformer() == null){
49 IInputTransformer newTransformer
= config
.getTransformer();
50 if (newTransformer
== null){
51 newTransformer
= new EfloraTransformer();
53 setTransformer(newTransformer
);
57 // ********************************** GETTER / SETTER *************************************/
59 public UnmatchedLeads
getUnmatchedLeads() {
60 return unmatchedLeads
;
63 public void setUnmatchedLeads(UnmatchedLeads unmatchedKeys
) {
64 this.unmatchedLeads
= unmatchedKeys
;
67 public void setFeatureNodesToSave(Set
<FeatureNode
> featureNodesToSave
) {
68 this.featureNodesToSave
= featureNodesToSave
;
71 public Set
<FeatureNode
> getFeatureNodesToSave() {
72 return featureNodesToSave
;
75 public Set
<PolytomousKeyNode
> getPolytomousKeyNodesToSave() {
76 return polytomousKeyNodesToSave
;
79 public void setPolytomousKeyNodesToSave(Set
<PolytomousKeyNode
> polytomousKeyNodesToSave
) {
80 this.polytomousKeyNodesToSave
= polytomousKeyNodesToSave
;
83 public Language
getDefaultLanguage() {
84 return this.defaultLanguage
;
87 public void setDefaultLanguage(Language defaultLanguage
){
88 this.defaultLanguage
= defaultLanguage
;