Revision 8422c0cd
Added by Andreas Müller almost 8 years ago
cdm-eflora/src/main/java/eu/etaxonomy/cdm/io/eflora/centralAfrica/ferns/CentralAfricaFernsTaxonImport.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
... | ... | |
74 | 74 |
@Component |
75 | 75 |
public class CentralAfricaFernsTaxonImport extends CentralAfricaFernsImportBase<TaxonBase> implements IMappingImport<TaxonBase, CentralAfricaFernsImportState>{ |
76 | 76 |
private static final Logger logger = Logger.getLogger(CentralAfricaFernsTaxonImport.class); |
77 |
|
|
77 |
|
|
78 | 78 |
public static final UUID TNS_EXT_UUID = UUID.fromString("41cb0450-ac84-4d73-905e-9c7773c23b05"); |
79 |
|
|
80 |
|
|
79 |
|
|
80 |
|
|
81 | 81 |
private DbImportMapping<?,?> mapping; |
82 |
|
|
82 |
|
|
83 | 83 |
//second path is not used anymore, there is now an ErmsTaxonRelationImport class instead |
84 | 84 |
// private boolean isSecondPath = false; |
85 |
|
|
85 |
|
|
86 | 86 |
private static final String pluralString = "taxa"; |
87 | 87 |
private static final String dbTableName = "[African pteridophytes]"; |
88 | 88 |
private static final Class<?> cdmTargetClass = TaxonBase.class; |
... | ... | |
90 | 90 |
public CentralAfricaFernsTaxonImport(){ |
91 | 91 |
super(pluralString, dbTableName, cdmTargetClass); |
92 | 92 |
} |
93 |
|
|
94 | 93 |
|
95 |
protected String getIdQuery() { |
|
94 |
|
|
95 |
@Override |
|
96 |
protected String getIdQuery() { |
|
96 | 97 |
String strQuery = " SELECT [Taxon number] FROM " + dbTableName ; |
97 | 98 |
return strQuery; |
98 | 99 |
} |
... | ... | |
101 | 102 |
protected DbImportMapping<?,?> getMapping() { |
102 | 103 |
if (mapping == null){ |
103 | 104 |
mapping = new DbImportMapping(); |
104 |
|
|
105 |
|
|
105 | 106 |
mapping.addMapper(DbImportObjectCreationMapper.NewInstance(this, "Taxon number", TAXON_NAMESPACE)); //id + tu_status |
106 | 107 |
|
107 | 108 |
mapping.addMapper(DbImportMethodMapper.NewInstance(this, "mapTypes", ResultSet.class, CentralAfricaFernsImportState.class)); |
... | ... | |
109 | 110 |
|
110 | 111 |
mapping.addMapper(DbImportMethodMapper.NewInstance(this, "mapReferences", ResultSet.class, CentralAfricaFernsImportState.class)); |
111 | 112 |
mapping.addMapper(DbImportMethodMapper.NewInstance(this, "mapNomRemarks", ResultSet.class, CentralAfricaFernsImportState.class)); |
112 |
|
|
113 |
|
|
113 | 114 |
mapping.addMapper(DbImportExtensionMapper.NewInstance("Illustrations - non-original", CentralAfricaFernsTransformer.uuidIllustrationsNonOriginal, "Illustrations - non-original", "Illustrations - non-original", null)); |
114 | 115 |
|
115 | 116 |
// mapping.addMapper(DbImportTextDataCreationMapper.NewInstance("Illustrations - non-original", objectToCreateNamespace, dbTaxonFkAttribute, this.TAXON_NAMESPACE, "Illustrations - non-original", Language.ENGLISH(), Feature, null); |
... | ... | |
120 | 121 |
|
121 | 122 |
mapping.addMapper(DbNotYetImplementedMapper.NewInstance("Basionym of", "Needs better understanding")); |
122 | 123 |
mapping.addMapper(DbNotYetImplementedMapper.NewInstance("Synonym of", "Needs better understanding. Strange values like ")); |
123 |
|
|
124 |
|
|
124 |
|
|
125 |
|
|
125 | 126 |
mapping.addMapper(DbNotYetImplementedMapper.NewInstance("Chromosome number" , "Wrong data. Seems to be 'reference full'")); |
126 |
|
|
127 |
|
|
127 | 128 |
mapping.addMapper(DbNotYetImplementedMapper.NewInstance("Book Publisher & Place" , "How to access the reference via String mapper?")); |
128 |
|
|
129 |
|
|
129 | 130 |
mapping.addMapper(DbNotYetImplementedMapper.NewInstance("Reprint no" , "What's this?")); |
130 | 131 |
mapping.addMapper(DbNotYetImplementedMapper.NewInstance("Date verified" , "Needed?")); |
131 |
|
|
132 |
|
|
133 |
//
|
|
132 |
|
|
133 |
|
|
134 |
// |
|
134 | 135 |
// UUID credibilityUuid = ErmsTransformer.uuidCredibility; |
135 | 136 |
// mapping.addMapper(DbImportExtensionMapper.NewInstance("tu_credibility", credibilityUuid, "credibility", "credibility", "credibility")); //Werte: null, unknown, marked for deletion |
136 |
//
|
|
137 |
// |
|
137 | 138 |
//ignore |
138 | 139 |
// mapping.addMapper(DbIgnoreMapper.NewInstance("cache_citation", "citation cache not needed in PESI")); |
139 |
|
|
140 |
|
|
140 | 141 |
//not yet implemented or ignore |
141 | 142 |
// mapping.addMapper(DbNotYetImplementedMapper.NewInstance("tu_hidden", "Needs DbImportMarkerMapper implemented")); |
142 |
|
|
143 |
|
|
143 | 144 |
} |
144 | 145 |
return mapping; |
145 | 146 |
} |
... | ... | |
164 | 165 |
// Class<?> cdmClass; |
165 | 166 |
// Set<String> idSet; |
166 | 167 |
Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<Object, Map<String, ? extends CdmBase>>(); |
167 |
|
|
168 |
|
|
168 | 169 |
try{ |
169 | 170 |
Set<String> nameIdSet = new HashSet<String>(); |
170 | 171 |
Set<String> referenceIdSet = new HashSet<String>(); |
... | ... | |
184 | 185 |
} |
185 | 186 |
return result; |
186 | 187 |
} |
187 |
|
|
188 |
|
|
188 | 189 |
private TaxonBase mapTypes(ResultSet rs, CentralAfricaFernsImportState state) throws SQLException{ |
189 | 190 |
TaxonBase<?> taxonBase = state.getRelatedObject(state.CURRENT_OBJECT_NAMESPACE, state.CURRENT_OBJECT_ID, TaxonBase.class); |
190 | 191 |
TaxonNameBase name = taxonBase.getName(); |
... | ... | |
198 | 199 |
} |
199 | 200 |
return taxonBase; |
200 | 201 |
} |
201 |
|
|
202 |
|
|
202 |
|
|
203 |
|
|
203 | 204 |
private String[] getTypeInfo(ResultSet rs, int i) throws SQLException { |
204 | 205 |
String[] typeInfo = new String[3]; |
205 | 206 |
String number; |
... | ... | |
211 | 212 |
typeInfo[0] = rs.getString("Type" + number); |
212 | 213 |
typeInfo[1] = rs.getString("Type collector and number" + number); |
213 | 214 |
typeInfo[2] = rs.getString("Type location" + number); |
214 |
|
|
215 |
|
|
215 | 216 |
return typeInfo; |
216 | 217 |
} |
217 | 218 |
|
... | ... | |
232 | 233 |
List<SpecimenTypeDesignation> designations = new ArrayList<SpecimenTypeDesignation>(); |
233 | 234 |
typeLocationString = CdmUtils.Nz(typeLocationString); |
234 | 235 |
if (typeLocationString.equalsIgnoreCase("not located")){ |
235 |
|
|
236 |
|
|
236 | 237 |
}else{ |
237 | 238 |
String[] splits = typeLocationString.split(";"); |
238 | 239 |
for (String split : splits){ |
... | ... | |
262 | 263 |
} catch (DerivedUnitFacadeNotSupportedException e) { |
263 | 264 |
throw new RuntimeException(e); |
264 | 265 |
} |
265 |
|
|
266 |
|
|
266 | 267 |
//TODO not so nice |
267 | 268 |
lastFacade.setLocality(typeString); |
268 | 269 |
makeTypeCollectorInfo(lastFacade, typeCollectorString); |
269 |
|
|
270 |
|
|
270 | 271 |
} |
271 | 272 |
} |
272 |
|
|
273 |
|
|
273 | 274 |
} |
274 | 275 |
|
275 | 276 |
|
276 | 277 |
|
277 |
private List<SpecimenTypeDesignation> handleTypeLocationPart(CentralAfricaFernsImportState state,
|
|
278 |
private List<SpecimenTypeDesignation> handleTypeLocationPart(CentralAfricaFernsImportState state, |
|
278 | 279 |
String typeString, String typeCollectorString, String typeLocationPart) { |
279 | 280 |
List<SpecimenTypeDesignation> result = new ArrayList<SpecimenTypeDesignation>(); |
280 |
String[] splits = typeLocationPart.split(",");
|
|
281 |
String[] splits = typeLocationPart.split(","); |
|
281 | 282 |
//see also SpecimenTypeParser |
282 | 283 |
String typeTypePattern = "(holo.|lecto.|iso.|isolecto.|syn.|isosyn.|neo.|isoneo.)"; |
283 | 284 |
String collectionPattern = "^[A-Z]+(\\-[A-Z]+)?"; |
... | ... | |
285 | 286 |
String addInfoPattern = "[!\\+\\?]?"; |
286 | 287 |
String typeCollectionPattern = collectionPattern + "\\s?" + numberPattern + addInfoPattern; |
287 | 288 |
SpecimenTypeDesignation lastDesignation = null; |
288 |
|
|
289 |
|
|
289 | 290 |
for (String split: splits){ |
290 | 291 |
split = split.trim(); |
291 | 292 |
if (StringUtils.isBlank(split)){ |
... | ... | |
295 | 296 |
}else if (split.trim().matches(typeTypePattern)){ |
296 | 297 |
makeSpecimentTypeStatus(lastDesignation, split); |
297 | 298 |
}else if(split.matches(typeCollectionPattern)){ |
298 |
|
|
299 |
|
|
299 | 300 |
lastDesignation = makeSpecimenTypeCollection(lastDesignation, split, collectionPattern, numberPattern, addInfoPattern); |
300 | 301 |
}else if(split.equalsIgnoreCase("not located")){ |
301 | 302 |
lastDesignation = makeCachedSpecimenDesignation(split); |
... | ... | |
311 | 312 |
logger.warn("Last Designation is null"); |
312 | 313 |
} |
313 | 314 |
} |
314 |
|
|
315 |
|
|
315 | 316 |
return result; |
316 | 317 |
} |
317 | 318 |
|
... | ... | |
336 | 337 |
SpecimenTypeDesignation result = SpecimenTypeDesignation.NewInstance(); |
337 | 338 |
DerivedUnit specimen = DerivedUnit.NewPreservedSpecimenInstance(); |
338 | 339 |
result.setTypeSpecimen(specimen); |
339 |
|
|
340 |
|
|
340 | 341 |
//collection |
341 | 342 |
Pattern collectionPattern = Pattern.compile(strCollectionPattern); |
342 | 343 |
Matcher matcher = collectionPattern.matcher(collectionString); |
... | ... | |
347 | 348 |
Collection collection = getCollection(strCollection); |
348 | 349 |
specimen.setCollection(collection); |
349 | 350 |
collectionString = collectionString.substring(strCollection.length()).trim(); |
350 |
|
|
351 |
|
|
351 |
|
|
352 |
|
|
352 | 353 |
//collection number |
353 | 354 |
Pattern numberPattern = Pattern.compile(strNumberPattern); |
354 | 355 |
matcher = numberPattern.matcher(collectionString); |
... | ... | |
361 | 362 |
}else{ |
362 | 363 |
//throw new RuntimeException("numberString doesn't match: " + collectionString); |
363 | 364 |
} |
364 |
|
|
365 |
|
|
365 | 366 |
//additional info |
366 | 367 |
Pattern addInfoPattern = Pattern.compile(strAddInfoPattern); |
367 | 368 |
matcher = addInfoPattern.matcher(collectionString); |
... | ... | |
397 | 398 |
|
398 | 399 |
|
399 | 400 |
private void makeSpecimentTypeStatus(SpecimenTypeDesignation designation, String type) { |
400 |
SpecimenTypeDesignationStatus status;
|
|
401 |
SpecimenTypeDesignationStatus status; |
|
401 | 402 |
if (type.equalsIgnoreCase("iso.")){ |
402 | 403 |
status = SpecimenTypeDesignationStatus.ISOTYPE(); |
403 | 404 |
}else if (type.equalsIgnoreCase("isolecto.")){ |
... | ... | |
452 | 453 |
}else{ |
453 | 454 |
typeString = handleDesignatedBy(nameTypeDesignation, typeString); |
454 | 455 |
} |
455 |
|
|
456 |
|
|
456 | 457 |
// String strSecondNamePattern = "([^\\(]*|\\(.*\\))+;.+"; //never ending story |
457 | 458 |
String strSecondNamePattern = ".+;.+"; |
458 | 459 |
String firstName; |
... | ... | |
491 | 492 |
} |
492 | 493 |
nameTypeDesignation.setTypeStatus(status); |
493 | 494 |
name.addTypeDesignation(nameTypeDesignation, false); |
494 |
|
|
495 |
|
|
495 | 496 |
} |
496 | 497 |
|
497 | 498 |
|
... | ... | |
509 | 510 |
|
510 | 511 |
|
511 | 512 |
private BotanicalName[] getNameTypeName(String strName) { |
512 |
//TODO implement get existing names
|
|
513 |
//TODO implement get existing names |
|
513 | 514 |
logger.info("Not yet fully implemented"); |
514 |
|
|
515 |
|
|
515 | 516 |
BotanicalName[] result = new BotanicalName[2]; |
516 | 517 |
if (strName.endsWith(",")){ |
517 | 518 |
strName = strName.substring(0, strName.length() -1); |
... | ... | |
529 | 530 |
result[1] = (BotanicalName)NonViralNameParserImpl.NewInstance().parseFullName(acceptedName, NomenclaturalCode.ICNAFP, null); |
530 | 531 |
strName = notAcceptedName; |
531 | 532 |
} |
532 |
|
|
533 |
|
|
533 | 534 |
result[0] = (BotanicalName)NonViralNameParserImpl.NewInstance().parseFullName(strName, NomenclaturalCode.ICNAFP, Rank.SPECIES()); |
534 | 535 |
return result; |
535 | 536 |
} |
... | ... | |
594 | 595 |
String reNumber = "(s\\.n\\.|\\d.*)"; |
595 | 596 |
Pattern reNumberPattern = Pattern.compile(reNumber); |
596 | 597 |
Matcher matcher = reNumberPattern.matcher(collectorAndNumberString); |
597 |
|
|
598 |
|
|
598 | 599 |
if ( matcher.find()){ |
599 | 600 |
int numberStart = matcher.start(); |
600 | 601 |
String number = collectorAndNumberString.substring(numberStart).trim(); |
... | ... | |
605 | 606 |
specimen.setFieldNumber(number); |
606 | 607 |
TeamOrPersonBase team = getTeam(collectorString); |
607 | 608 |
specimen.setCollector(team); |
608 |
|
|
609 |
|
|
609 | 610 |
}else{ |
610 | 611 |
logger.warn("collector string did not match number pattern: " + collectorAndNumberString); |
611 |
|
|
612 |
|
|
612 | 613 |
} |
613 | 614 |
} |
614 | 615 |
|
... | ... | |
631 | 632 |
String volume = rs.getString("Book / Journal volume"); |
632 | 633 |
String pages = rs.getString("Book / Journal pages"); |
633 | 634 |
String illustrations = rs.getString("Illustration/s"); |
634 |
|
|
635 |
|
|
635 | 636 |
String fascicle = rs.getString("Book / Journal fascicle"); |
636 | 637 |
String part = rs.getString("Book / Journal part"); |
637 | 638 |
String paperTitle = rs.getString("Book / Paper title"); |
638 |
|
|
639 |
|
|
639 | 640 |
String datePublishedString = rs.getString("Date published"); |
640 | 641 |
String referenceString = referenceFullString; |
641 | 642 |
if (StringUtils.isBlank(referenceString)){ |
642 | 643 |
referenceString = referenceAbbreviatedString; |
643 | 644 |
} |
644 |
|
|
645 |
|
|
645 | 646 |
TaxonBase<?> taxonBase = state.getRelatedObject(state.CURRENT_OBJECT_NAMESPACE, state.CURRENT_OBJECT_ID, TaxonBase.class); |
646 |
if (StringUtils.isNotBlank(referenceString) || StringUtils.isNotBlank(volume) ||
|
|
647 |
StringUtils.isNotBlank(pages) || StringUtils.isNotBlank(illustrations) ||
|
|
647 |
if (StringUtils.isNotBlank(referenceString) || StringUtils.isNotBlank(volume) || |
|
648 |
StringUtils.isNotBlank(pages) || StringUtils.isNotBlank(illustrations) || |
|
648 | 649 |
StringUtils.isNotBlank(datePublishedString) || StringUtils.isNotBlank(paperTitle)){ |
649 | 650 |
NonViralName<?> name = CdmBase.deproxy(taxonBase.getName(), NonViralName.class); |
650 |
Reference<?> reference = ReferenceFactory.newGeneric();
|
|
651 |
reference.setAuthorship((TeamOrPersonBase<?>)name.getCombinationAuthorship());
|
|
651 |
Reference reference = ReferenceFactory.newGeneric(); |
|
652 |
reference.setAuthorship(name.getCombinationAuthorship()); |
|
652 | 653 |
reference.setTitle(referenceString); |
653 | 654 |
reference.setVolume(volume); |
654 | 655 |
reference.setEdition(part); |
655 |
Reference<?> inrefernce = null;
|
|
656 |
Reference inrefernce = null; |
|
656 | 657 |
//TODO parser |
657 | 658 |
TimePeriod datePublished = TimePeriodParser.parseString(datePublishedString); |
658 | 659 |
reference.setDatePublished(datePublished); |
659 | 660 |
if (StringUtils.isNotBlank(paperTitle)){ |
660 |
Reference<?> innerReference = ReferenceFactory.newGeneric();
|
|
661 |
Reference innerReference = ReferenceFactory.newGeneric(); |
|
661 | 662 |
innerReference.setDatePublished(datePublished); |
662 | 663 |
name.setNomenclaturalReference(innerReference); |
663 | 664 |
innerReference.setInReference(reference); |
... | ... | |
665 | 666 |
}else{ |
666 | 667 |
name.setNomenclaturalReference(reference); |
667 | 668 |
} |
668 |
|
|
669 |
|
|
669 | 670 |
//details |
670 | 671 |
String details = CdmUtils.concat(", ", pages, illustrations); |
671 | 672 |
details = StringUtils.isBlank(details) ? null : details.trim(); |
... | ... | |
677 | 678 |
} catch (UndefinedTransformerMethodException e) { |
678 | 679 |
e.printStackTrace(); |
679 | 680 |
} |
680 |
|
|
681 |
|
|
681 | 682 |
}else{ |
682 | 683 |
logger.warn(taxonNumber + " - Taxon has no reference"); |
683 | 684 |
} |
... | ... | |
686 | 687 |
|
687 | 688 |
/** |
688 | 689 |
* for internal use only, used by MethodMapper |
689 |
* @throws Exception
|
|
690 |
* @throws Exception |
|
690 | 691 |
*/ |
691 | 692 |
private TaxonBase mapNomRemarks(ResultSet rs, CentralAfricaFernsImportState state) throws Exception{ |
692 | 693 |
try { |
693 | 694 |
String taxonNumber = state.getTaxonNumber(); |
694 | 695 |
String nomRemarksString = rs.getString("Nom remarks"); |
695 | 696 |
String taxonStatus = rs.getString("Current/Synonym"); |
696 |
|
|
697 |
|
|
697 | 698 |
TaxonBase<?> taxonBase = state.getRelatedObject(state.CURRENT_OBJECT_NAMESPACE, state.CURRENT_OBJECT_ID, TaxonBase.class); |
698 | 699 |
if (StringUtils.isNotBlank(nomRemarksString)){ |
699 | 700 |
NonViralName name = CdmBase.deproxy(taxonBase.getName(), NonViralName.class); |
... | ... | |
705 | 706 |
} |
706 | 707 |
} |
707 | 708 |
|
708 |
|
|
709 |
|
|
709 | 710 |
private void parseNomRemark(CentralAfricaFernsImportState state, NonViralName name, String nomRemarksString, String taxonStatus, String taxonNumber) { |
710 |
|
|
711 |
|
|
711 | 712 |
if (nomRemarksString.equalsIgnoreCase("comb. illeg.")){ |
712 | 713 |
name.addStatus(NomenclaturalStatus.NewInstance(NomenclaturalStatusType.COMBINATION_ILLEGITIMATE())); |
713 | 714 |
return; |
... | ... | |
752 | 753 |
return; |
753 | 754 |
} |
754 | 755 |
|
755 |
|
|
756 |
|
|
756 | 757 |
if (StringUtils.isNotBlank(nomRemarksString)){ |
757 | 758 |
ExtensionType extensionType = getExtensionType(state, CentralAfricaFernsTransformer.uuidNomenclaturalRemarks, "Nomenclatural remarks", "Nomenclatural remarks", null); |
758 | 759 |
name.addExtension(nomRemarksString, extensionType); |
759 | 760 |
} |
760 |
|
|
761 |
|
|
762 |
|
|
763 |
|
|
761 |
|
|
762 |
|
|
763 |
|
|
764 |
|
|
764 | 765 |
} |
765 | 766 |
|
766 | 767 |
|
... | ... | |
768 | 769 |
/* (non-Javadoc) |
769 | 770 |
* @see eu.etaxonomy.cdm.io.common.mapping.IMappingImport#createObject(java.sql.ResultSet) |
770 | 771 |
*/ |
771 |
public TaxonBase createObject(ResultSet rs, CentralAfricaFernsImportState state) throws SQLException { |
|
772 |
@Override |
|
773 |
public TaxonBase createObject(ResultSet rs, CentralAfricaFernsImportState state) throws SQLException { |
|
772 | 774 |
BotanicalName taxonName = BotanicalName.NewInstance(null); |
773 | 775 |
Reference sec = state.getConfig().getSourceReference(); |
774 |
|
|
776 |
|
|
775 | 777 |
String taxonNumber = rs.getString("Taxon number"); |
776 | 778 |
state.setTaxonNumber(taxonNumber); |
777 |
|
|
779 |
|
|
778 | 780 |
String orderName = rs.getString("Order name"); |
779 | 781 |
String subOrderName = rs.getString("Suborder name"); |
780 | 782 |
String familyName = rs.getString("Family name"); |
... | ... | |
792 | 794 |
String subVariety = rs.getString("Subvariery"); |
793 | 795 |
String formaName = rs.getString("Forma name"); |
794 | 796 |
String subsectionName = rs.getString("Subsection name"); |
795 |
|
|
797 |
|
|
796 | 798 |
String status = rs.getString("Current/Synonym"); |
797 |
|
|
799 |
|
|
798 | 800 |
TaxonBase taxon = makeTaxon(taxonName, sec, taxonNumber, status); |
799 |
|
|
801 |
|
|
800 | 802 |
// Integer parent3Rank = rs.getInt("parent3rank"); |
801 |
|
|
803 |
|
|
802 | 804 |
//rank and epithets |
803 | 805 |
Rank lowestRank = setLowestUninomial(taxonName, orderName, subOrderName, familyName, subFamilyName, tribusName, subTribusName,genusName); |
804 | 806 |
lowestRank = setLowestInfraGeneric(taxonName, lowestRank, subGenusName, sectionName, subsectionName, seriesName); |
... | ... | |
807 | 809 |
lowestRank = Rank.SPECIES(); |
808 | 810 |
} |
809 | 811 |
lowestRank = setLowestInfraSpecific(taxonName, lowestRank, subspeciesName, varietyName, subVariety, formaName,subFormaName); |
810 |
|
|
812 |
|
|
811 | 813 |
taxonName.setRank(lowestRank); |
812 | 814 |
state.setCurrentRank(taxonName.getRank()); |
813 | 815 |
setAuthor(taxonName, rs, taxonNumber, false); |
814 |
|
|
816 |
|
|
815 | 817 |
//add original source for taxon name (taxon original source is added in mapper |
816 | 818 |
// Reference citation = state.getConfig().getSourceReference(); |
817 | 819 |
// addOriginalSource(taxonName, taxonNumber, TAXON_NAMESPACE, citation); |
818 | 820 |
return taxon; |
819 |
|
|
821 |
|
|
820 | 822 |
} |
821 | 823 |
|
822 | 824 |
|
... | ... | |
892 | 894 |
|
893 | 895 |
private Rank setLowestUninomial(BotanicalName taxonName, String orderName, String subOrderName, String familyName, String subFamilyName, |
894 | 896 |
String tribusName, String subTribusName, String genusName) { |
895 |
|
|
897 |
|
|
896 | 898 |
if (StringUtils.isNotBlank(genusName)){ |
897 | 899 |
taxonName.setGenusOrUninomial(genusName); |
898 | 900 |
return Rank.GENUS(); |
... | ... | |
918 | 920 |
return null; |
919 | 921 |
} |
920 | 922 |
} |
921 |
|
|
923 |
|
|
922 | 924 |
|
923 | 925 |
/* (non-Javadoc) |
924 | 926 |
* @see eu.etaxonomy.cdm.io.common.CdmIoBase#doCheck(eu.etaxonomy.cdm.io.common.IoStateBase) |
... | ... | |
928 | 930 |
IOValidator<CentralAfricaFernsImportState> validator = new CentralAfricaFernsTaxonImportValidator(); |
929 | 931 |
return validator.validate(state); |
930 | 932 |
} |
931 |
|
|
932 |
|
|
933 |
|
|
934 |
|
|
933 | 935 |
/* (non-Javadoc) |
934 | 936 |
* @see eu.etaxonomy.cdm.io.common.CdmIoBase#isIgnore(eu.etaxonomy.cdm.io.common.IoStateBase) |
935 | 937 |
*/ |
Also available in: Unified diff
Remove generics from Reference in cdmlib-app #5830