Revision 3a1cd9fb
Added by Andreas Müller about 11 years ago
cdmlib-ext/src/main/java/eu/etaxonomy/cdm/ext/ipni/IpniService.java | ||
---|---|---|
52 | 52 |
import eu.etaxonomy.cdm.model.reference.Reference; |
53 | 53 |
import eu.etaxonomy.cdm.model.reference.ReferenceFactory; |
54 | 54 |
import eu.etaxonomy.cdm.strategy.exceptions.UnknownCdmTypeException; |
55 |
import eu.etaxonomy.cdm.strategy.parser.TimePeriodParser; |
|
55 | 56 |
|
56 | 57 |
|
57 | 58 |
/** |
... | ... | |
372 | 373 |
|
373 | 374 |
|
374 | 375 |
//dates |
375 |
TimePeriod date = TimePeriod.parseString(valueMap.get(DATE)); |
|
376 |
TimePeriod date = TimePeriodParser.parseString(valueMap.get(DATE));
|
|
376 | 377 |
ref.setDatePublished(date); |
377 | 378 |
|
378 | 379 |
|
... | ... | |
452 | 453 |
//publication |
453 | 454 |
Reference ref = ReferenceFactory.newGeneric(); |
454 | 455 |
ref.setTitleCache(valueMap.get(PUBLICATION)); |
455 |
TimePeriod datePublished = TimePeriod.parseString(valueMap.get(PUBLICATION_YEAR_FULL)); |
|
456 |
TimePeriod datePublished = TimePeriodParser.parseString(valueMap.get(PUBLICATION_YEAR_FULL));
|
|
456 | 457 |
name.setNomenclaturalReference(ref); |
457 | 458 |
|
458 | 459 |
//name status |
... | ... | |
489 | 490 |
|
490 | 491 |
//gathering period |
491 | 492 |
String collectionDateAsText = valueMap.get(COLLECTION_DATE_AS_TEXT); |
492 |
TimePeriod gatheringPeriod = TimePeriod.parseString(collectionDateAsText); |
|
493 |
TimePeriod gatheringPeriod = TimePeriodParser.parseString(collectionDateAsText);
|
|
493 | 494 |
|
494 | 495 |
try { |
495 | 496 |
gatheringPeriod.setStartDay(getIntegerDateValueOrNull(valueMap, COLLECTION_DAY1)); |
... | ... | |
678 | 679 |
person.addSource(OriginalSourceType.Lineage, valueMap.get(ID), "Author", citation, valueMap.get(VERSION)); |
679 | 680 |
|
680 | 681 |
//dates |
681 |
TimePeriod lifespan = TimePeriod.parseString(valueMap.get(DATES)); |
|
682 |
TimePeriod lifespan = TimePeriodParser.parseString(valueMap.get(DATES));
|
|
682 | 683 |
person.setLifespan(lifespan); |
683 | 684 |
|
684 | 685 |
//alternative_names |
Also available in: Unified diff
devided TimePeriod and TimePeriodParser #3617