Revision 44f8b525
Added by Andreas Müller almost 7 years ago
cdm-eflora/src/main/java/eu/etaxonomy/cdm/io/eflora/centralAfrica/ferns/CentralAfricaFernsTaxonRelationImport.java | ||
---|---|---|
47 | 47 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
48 | 48 |
import eu.etaxonomy.cdm.model.location.NamedAreaLevel; |
49 | 49 |
import eu.etaxonomy.cdm.model.location.NamedAreaType; |
50 |
import eu.etaxonomy.cdm.model.name.BotanicalName; |
|
51 | 50 |
import eu.etaxonomy.cdm.model.name.IBotanicalName; |
52 | 51 |
import eu.etaxonomy.cdm.model.name.INonViralName; |
53 | 52 |
import eu.etaxonomy.cdm.model.name.Rank; |
54 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
|
|
53 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
|
55 | 54 |
import eu.etaxonomy.cdm.model.name.TaxonNameFactory; |
56 | 55 |
import eu.etaxonomy.cdm.model.reference.Reference; |
57 | 56 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
... | ... | |
528 | 527 |
*/ |
529 | 528 |
private Taxon checkIsGrandParent(Taxon childTaxon, Taxon grandParentTaxon) { |
530 | 529 |
IBotanicalName lowerName = childTaxon.getName(); |
531 |
IBotanicalName higherName = CdmBase.deproxy(grandParentTaxon.getName(), BotanicalName.class);
|
|
530 |
IBotanicalName higherName = CdmBase.deproxy(grandParentTaxon.getName()); |
|
532 | 531 |
|
533 | 532 |
//TODO was wenn lowerTaxon constructed ist |
534 | 533 |
logger.warn("checkIsGrandParent not yet fully implemented"); |
... | ... | |
925 | 924 |
String province = rs.getString("Distribution - Province"); |
926 | 925 |
String distributionDetailed = rs.getString("Distribution - detailed"); |
927 | 926 |
if (taxonBase != null){ |
928 |
TaxonNameBase<?,?> nameUsedInSource = taxonBase.getName();
|
|
927 |
TaxonName nameUsedInSource = taxonBase.getName(); |
|
929 | 928 |
Taxon taxon = getAcceptedTaxon(taxonBase); |
930 | 929 |
if (taxon != null){ |
931 | 930 |
|
... | ... | |
1000 | 999 |
* @param taxonBase |
1001 | 1000 |
* @param countriesString |
1002 | 1001 |
*/ |
1003 |
private void makeCountries(CentralAfricaFernsImportState state, String taxonNumber, Taxon taxon, TaxonNameBase nameUsedInSource, String countriesString, String province, String distributionDetailed) {
|
|
1002 |
private void makeCountries(CentralAfricaFernsImportState state, String taxonNumber, Taxon taxon, TaxonName nameUsedInSource, String countriesString, String province, String distributionDetailed) { |
|
1004 | 1003 |
countriesString = countriesString.replaceAll("\\*", ""); |
1005 | 1004 |
countriesString = countriesString.replace(" ", " "); |
1006 | 1005 |
countriesString = countriesString.replace(", endemic", " - endemic"); |
... | ... | |
1028 | 1027 |
} |
1029 | 1028 |
|
1030 | 1029 |
|
1031 |
private void makeSingleCountry(CentralAfricaFernsImportState state, String taxonNumber, Taxon taxon, TaxonNameBase nameUsedInSource, String country) throws UndefinedTransformerMethodException {
|
|
1030 |
private void makeSingleCountry(CentralAfricaFernsImportState state, String taxonNumber, Taxon taxon, TaxonName nameUsedInSource, String country) throws UndefinedTransformerMethodException { |
|
1032 | 1031 |
boolean areaDoubtful = false; |
1033 | 1032 |
Distribution distribution = Distribution.NewInstance(null, PresenceAbsenceTerm.PRESENT()); |
1034 | 1033 |
Reference sourceReference = this.sourceReference; |
... | ... | |
1118 | 1117 |
} |
1119 | 1118 |
|
1120 | 1119 |
|
1121 |
private String makeCountryBrackets(CentralAfricaFernsImportState state, String taxonNumber, Taxon taxon, TaxonNameBase<?,?> nameUsedInSource, String country) { |
|
1120 |
private String makeCountryBrackets(CentralAfricaFernsImportState state, String taxonNumber, Taxon taxon, |
|
1121 |
TaxonName nameUsedInSource, String country) { |
|
1122 | 1122 |
String[] split = (country + " ").split("\\(.*\\)"); |
1123 | 1123 |
if (split.length == 2){ |
1124 | 1124 |
String bracket = country.substring(split[0].length()+1, country.indexOf(")")); |
Also available in: Unified diff
ref #6368 , ref #6671, ref #6630 adapt eflora to no taxon name model