Revision bb38665e
Added by Andreas Müller over 10 years ago
cdm-eflora/src/main/java/eu/etaxonomy/cdm/io/eflora/centralAfrica/ferns/CentralAfricaFernsTaxonRelationImport.java | ||
---|---|---|
26 | 26 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
27 | 27 |
import eu.etaxonomy.cdm.common.CdmUtils; |
28 | 28 |
import eu.etaxonomy.cdm.io.common.IOValidator; |
29 |
import eu.etaxonomy.cdm.io.common.TdwgAreaProvider; |
|
29 | 30 |
import eu.etaxonomy.cdm.io.common.mapping.DbImportMapping; |
30 | 31 |
import eu.etaxonomy.cdm.io.common.mapping.DbImportMethodMapper; |
31 | 32 |
import eu.etaxonomy.cdm.io.common.mapping.DbImportTaxIncludedInMapper; |
... | ... | |
35 | 36 |
import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor; |
36 | 37 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
37 | 38 |
import eu.etaxonomy.cdm.model.common.Language; |
39 |
import eu.etaxonomy.cdm.model.common.OriginalSourceType; |
|
38 | 40 |
import eu.etaxonomy.cdm.model.description.CommonTaxonName; |
39 | 41 |
import eu.etaxonomy.cdm.model.description.Distribution; |
40 | 42 |
import eu.etaxonomy.cdm.model.description.Feature; |
... | ... | |
45 | 47 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
46 | 48 |
import eu.etaxonomy.cdm.model.location.NamedAreaLevel; |
47 | 49 |
import eu.etaxonomy.cdm.model.location.NamedAreaType; |
48 |
import eu.etaxonomy.cdm.model.location.TdwgArea; |
|
49 |
import eu.etaxonomy.cdm.model.location.WaterbodyOrCountry; |
|
50 |
import eu.etaxonomy.cdm.model.location.Country; |
|
50 | 51 |
import eu.etaxonomy.cdm.model.name.BotanicalName; |
51 | 52 |
import eu.etaxonomy.cdm.model.name.NonViralName; |
52 | 53 |
import eu.etaxonomy.cdm.model.name.Rank; |
... | ... | |
756 | 757 |
if (parent != null){ |
757 | 758 |
childNode = tree.addParentChild(parent, child, citation, microCitation); |
758 | 759 |
}else{ |
759 |
childNode = tree.addChildTaxon(child, citation, microCitation, null);
|
|
760 |
childNode = tree.addChildTaxon(child, citation, microCitation); |
|
760 | 761 |
} |
761 | 762 |
return (childNode != null); |
762 | 763 |
} |
... | ... | |
1040 | 1041 |
boolean areaDoubtful = false; |
1041 | 1042 |
Distribution distribution = Distribution.NewInstance(null, PresenceTerm.PRESENT()); |
1042 | 1043 |
Reference<?> sourceReference = this.sourceReference; |
1043 |
distribution.addSource(taxonNumber, "Distribution_Country", sourceReference, null, nameUsedInSource, null); |
|
1044 |
distribution.addSource(OriginalSourceType.Import, taxonNumber, "Distribution_Country", sourceReference, null, nameUsedInSource, null);
|
|
1044 | 1045 |
NamedArea area = null; |
1045 | 1046 |
//empty |
1046 | 1047 |
if (StringUtils.isBlank(country)){ |
... | ... | |
1074 | 1075 |
|
1075 | 1076 |
|
1076 | 1077 |
//areas |
1077 |
if (TdwgArea.isTdwgAreaLabel(country)){ |
|
1078 |
if (TdwgAreaProvider.isTdwgAreaLabel(country)){
|
|
1078 | 1079 |
//tdwg |
1079 |
area = TdwgArea.getAreaByTdwgLabel(country); |
|
1080 |
}else if (TdwgArea.isTdwgAreaLabel(countryWithoutIslands)){ |
|
1080 |
area = TdwgAreaProvider.getAreaByTdwgLabel(country);
|
|
1081 |
}else if (TdwgAreaProvider.isTdwgAreaLabel(countryWithoutIslands)){
|
|
1081 | 1082 |
//tdwg |
1082 |
area = TdwgArea.getAreaByTdwgLabel(countryWithoutIslands); |
|
1083 |
}else if (TdwgArea.isTdwgAreaLabel(countryWithoutDot)){ |
|
1083 |
area = TdwgAreaProvider.getAreaByTdwgLabel(countryWithoutIslands);
|
|
1084 |
}else if (TdwgAreaProvider.isTdwgAreaLabel(countryWithoutDot)){
|
|
1084 | 1085 |
//tdwg |
1085 |
area = TdwgArea.getAreaByTdwgLabel(countryWithoutDot); |
|
1086 |
area = TdwgAreaProvider.getAreaByTdwgLabel(countryWithoutDot);
|
|
1086 | 1087 |
}else if ( (area = state.getTransformer().getNamedAreaByKey(country)) != null) { |
1087 | 1088 |
//area already set |
1088 |
}else if (WaterbodyOrCountry.isWaterbodyOrCountryLabel(country)){
|
|
1089 |
}else if (Country.isCountryLabel(country)){
|
|
1089 | 1090 |
//iso |
1090 |
area = WaterbodyOrCountry.getWaterbodyOrCountryByLabel(country);
|
|
1091 |
area = Country.getCountryByLabel(country);
|
|
1091 | 1092 |
}else{ |
1092 | 1093 |
//others |
1093 | 1094 |
NamedAreaLevel level = null; |
Also available in: Unified diff
reintegrate cdmlib-app-3.3 branch into trunk