Project

General

Profile

« Previous | Next » 

Revision ac5fb7af

Added by Andreas Müller about 7 years ago

ref #6369 adapt existing occurrences of interface to removed generics in cdmlib-app

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/cyprus/CyprusExcelImport.java
32 32
import eu.etaxonomy.cdm.model.description.TaxonDescription;
33 33
import eu.etaxonomy.cdm.model.description.TextData;
34 34
import eu.etaxonomy.cdm.model.location.NamedArea;
35
import eu.etaxonomy.cdm.model.name.BotanicalName;
35
import eu.etaxonomy.cdm.model.name.INonViralName;
36 36
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
37
import eu.etaxonomy.cdm.model.name.NonViralName;
38 37
import eu.etaxonomy.cdm.model.name.Rank;
39 38
import eu.etaxonomy.cdm.model.reference.Reference;
40 39
import eu.etaxonomy.cdm.model.taxon.Classification;
......
517 516
	private TaxonBase createTaxon(CyprusImportState state, Rank rank, String taxonNameStr,
518 517
			Class statusClass, NomenclaturalCode nc) {
519 518
		TaxonBase taxonBase;
520
		NonViralName taxonNameBase = null;
519
		INonViralName taxonNameBase = null;
521 520
		if (nc == NomenclaturalCode.ICVCN){
522 521
			logger.warn("ICVCN not yet supported");
523 522

  
524 523
		}else{
525
			taxonNameBase =(NonViralName) nc.getNewTaxonNameInstance(rank);
526
			//NonViralName nonViralName = (NonViralName)taxonNameBase;
527
			INonViralNameParser parser = nameParser;//NonViralNameParserImpl.NewInstance();
528
			taxonNameBase = (NonViralName<BotanicalName>)parser.parseFullName(taxonNameStr, nc, rank);
524
			taxonNameBase = nc.getNewTaxonNameInstance(rank);
525
			INonViralNameParser<INonViralName> parser = nameParser;//NonViralNameParserImpl.NewInstance();
526
			taxonNameBase = parser.parseFullName(taxonNameStr, nc, rank);
529 527

  
530 528
			//taxonNameBase.setNameCache(taxonNameStr);
531 529

  
cdm-eflora/src/main/java/eu/etaxonomy/cdm/io/eflora/EfloraTaxonImport.java
58 58
import eu.etaxonomy.cdm.model.description.TextData;
59 59
import eu.etaxonomy.cdm.model.name.BotanicalName;
60 60
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
61
import eu.etaxonomy.cdm.model.name.INonViralName;
61 62
import eu.etaxonomy.cdm.model.name.NameRelationshipType;
62 63
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
63 64
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
64
import eu.etaxonomy.cdm.model.name.NonViralName;
65 65
import eu.etaxonomy.cdm.model.name.Rank;
66 66
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
67 67
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
......
610 610
		if (strGoto == null){
611 611
			return "";
612 612
		}
613
		String strGenusName = CdmBase.deproxy(taxon.getName(), NonViralName.class).getGenusOrUninomial();
613
		String strGenusName = taxon.getName().getGenusOrUninomial();
614 614
		strGoto = strGoto.replaceAll("\\([^\\(\\)]*\\)", "");  //replace all brackets
615 615
		strGoto = strGoto.replaceAll("\\s+", " "); //replace multiple whitespaces by exactly one whitespace
616 616

  
......
622 622
				split[i] = strGenusName;
623 623
			}
624 624
//			if (isInfraSpecificMarker(single)){
625
//				String strSpeciesName = CdmBase.deproxy(taxon.getName(), NonViralName.class).getSpecificEpithet();
625
//				String strSpeciesName = taxon.getName().getSpecificEpithet();
626 626
//				split[i] = strGenusName + " " + strSpeciesName + " ";
627 627
//			}
628 628
			result = (result + " " + split[i]).trim();
......
1152 1152
	 */
1153 1153
	//body/taxon/
1154 1154
	private HomotypicalGroup handleNomTaxon(EfloraImportState state, Element elNom, Taxon taxon, HomotypicalGroup homotypicalGroup, boolean isSynonym) {
1155
		NonViralName name = makeName(taxon, homotypicalGroup, isSynonym);
1156
		String num = null;
1155
	    INonViralName nvn = makeName(taxon, homotypicalGroup, isSynonym);
1156
	    TaxonNameBase<?,?> name = TaxonNameBase.castAndDeproxy(nvn);
1157
	    String num = null;
1157 1158

  
1158 1159
		boolean hasGenusInfo = false;
1159
		TeamOrPersonBase lastTeam = null;
1160
		TeamOrPersonBase<?> lastTeam = null;
1160 1161

  
1161 1162
		//genus
1162 1163
		List<Element> elGenus = XmlHelp.getAttributedChildListWithValue(elNom, "name", "class", "genus");
......
1262 1263
	}
1263 1264

  
1264 1265

  
1265
	private void handleQuestionMark(NonViralName name, Taxon taxon) {
1266
	private void handleQuestionMark(INonViralName name, Taxon taxon) {
1266 1267
		int count = name.getTaxonBases().size();
1267 1268
		if (count != 1){
1268 1269
			logger.warn("Name has " + count + " taxa. This is not handled for question mark");
1269 1270
		}else{
1270
			TaxonBase taxonBase = (TaxonBase)name.getTaxonBases().iterator().next();
1271
			TaxonBase taxonBase = name.getTaxonBases().iterator().next();
1271 1272
			taxonBase.setDoubtful(true);
1272 1273
		}
1273 1274
	}
1274 1275

  
1275 1276

  
1276 1277
	//merge with handleNomTaxon
1277
	private void handleHomonym(EfloraImportState state, Element elHomonym, NonViralName upperName) {
1278
	private void handleHomonym(EfloraImportState state, Element elHomonym, TaxonNameBase upperName) {
1278 1279
		verifyNoAttribute(elHomonym);
1279 1280

  
1280 1281
		//hommonym name
......
1326 1327
		}else{
1327 1328
			upperName.addRelationshipToName(homonymName, relType, null);
1328 1329
		}
1329

  
1330 1330
	}
1331 1331

  
1332 1332

  
......
1347 1347
	}
1348 1348

  
1349 1349

  
1350
	private void handleNameNote(NonViralName name, String value) {
1350
	private void handleNameNote(INonViralName name, String value) {
1351 1351
		logger.warn("Name note: " + value + ". Available in portal?");
1352 1352
		Annotation annotation = Annotation.NewInstance(value, AnnotationType.EDITORIAL(), Language.DEFAULT());
1353 1353
		name.addAnnotation(annotation);
......
1359 1359
	 * @param name
1360 1360
	 * @param value
1361 1361
	 */
1362
	protected TeamOrPersonBase handleNameUsage(Taxon taxon, NonViralName<?> name, String referenceTitle, TeamOrPersonBase lastTeam) {
1362
	protected TeamOrPersonBase handleNameUsage(Taxon taxon, INonViralName name, String referenceTitle, TeamOrPersonBase lastTeam) {
1363 1363
		Reference ref = ReferenceFactory.newGeneric();
1364 1364
		referenceTitle = removeStartingSymbols(referenceTitle, ref);
1365 1365

  
......
1374 1374

  
1375 1375
		TaxonDescription description = getDescription(taxon);
1376 1376
		TextData textData = TextData.NewInstance(Feature.CITATION());
1377
		textData.addSource(OriginalSourceType.PrimaryTaxonomicSource, null, null, ref, microReference, name, null);
1377
		textData.addSource(OriginalSourceType.PrimaryTaxonomicSource, null, null, ref, microReference, (TaxonNameBase)name, null);
1378 1378
		description.addElement(textData);
1379 1379
		return team;
1380 1380
	}
......
1489 1489
	 * @param name
1490 1490
	 * @return
1491 1491
	 */
1492
	protected String parseHomonym(String detail, NonViralName name) {
1492
	protected String parseHomonym(String detail, TaxonNameBase name) {
1493 1493
		String result;
1494 1494
		if (detail == null){
1495 1495
			return detail;
......
1521 1521
			homonymName.setSpecificEpithet(name.getSpecificEpithet());
1522 1522
			homonymName.setInfraSpecificEpithet(name.getInfraSpecificEpithet());
1523 1523
			Reference homonymNomRef = ReferenceFactory.newGeneric();
1524
			homonymNomRef.setTitleCache(homonymString);
1524
			homonymNomRef.setTitleCache(homonymString, true);
1525 1525
			String homonymNomRefDetail = parseReferenceYearAndDetail(homonymNomRef);
1526 1526
			homonymName.setNomenclaturalMicroReference(homonymNomRefDetail);
1527 1527
			String authorTitle = homonymNomRef.getTitleCache();
......
1558 1558
	 * @param name
1559 1559
	 * @param value
1560 1560
	 */
1561
	protected TeamOrPersonBase handleNomenclaturalReference(NonViralName name, String value) {
1561
	protected TeamOrPersonBase handleNomenclaturalReference(TaxonNameBase name, String value) {
1562 1562
		Reference nomRef = ReferenceFactory.newGeneric();
1563 1563
		nomRef.setTitleCache(value, true);
1564 1564
		parseNomStatus(nomRef, name);
......
1566 1566
		name.setNomenclaturalReference(nomRef);
1567 1567
		microReference = parseHomonym(microReference, name);
1568 1568
		name.setNomenclaturalMicroReference(microReference);
1569
		TeamOrPersonBase  team = name.getCombinationAuthorship();
1569
		TeamOrPersonBase<?> team = name.getCombinationAuthorship();
1570 1570
		if (team == null){
1571 1571
			logger.warn("Name has nom. ref. but no author team. Name: " + name.getTitleCache() + ", Nom.Ref.: " + value);
1572 1572
		}else{
......
1575 1575
		return team;
1576 1576
	}
1577 1577

  
1578
	private void handleInfrAuthor(EfloraImportState state, Element elAuthor, NonViralName name, boolean overwrite) {
1578
	private void handleInfrAuthor(EfloraImportState state, Element elAuthor, INonViralName name, boolean overwrite) {
1579 1579
		String strAuthor = elAuthor.getValue().trim();
1580 1580
		if (strAuthor.endsWith(",")){
1581 1581
			strAuthor = strAuthor.substring(0, strAuthor.length() -1);
......
1600 1600
	 * @param infraRank
1601 1601
	 * @return
1602 1602
	 */
1603
	private Rank handleInfRank(NonViralName name, List<Element> elInfraRank, Rank infraRank) {
1603
	private Rank handleInfRank(INonViralName name, List<Element> elInfraRank, Rank infraRank) {
1604 1604
		if (elInfraRank.size() == 1){
1605 1605
			String strRank = elInfraRank.get(0).getTextNormalize();
1606 1606
			try {
......
1622 1622
	}
1623 1623

  
1624 1624

  
1625
	private void handleInfrEpi(NonViralName<?> name, Rank infraRank, String value) {
1625
	private void handleInfrEpi(INonViralName name, Rank infraRank, String value) {
1626 1626
		if (infraRank != null && infraRank.isInfraSpecific()){
1627 1627
			name.setInfraSpecificEpithet(value);
1628 1628
			if (CdmUtils.isCapital(value)){
......
1647 1647
	 * @param isSynonym
1648 1648
	 * @return
1649 1649
	 */
1650
	private NonViralName makeName(Taxon taxon,HomotypicalGroup homotypicalGroup, boolean isSynonym) {
1651
		NonViralName name;
1650
	private TaxonNameBase makeName(Taxon taxon,HomotypicalGroup homotypicalGroup, boolean isSynonym) {
1651
		TaxonNameBase<?,?> name;
1652 1652
		if (isSynonym){
1653 1653
			name = BotanicalName.NewInstance(Rank.SPECIES(), homotypicalGroup);
1654 1654
			SynonymType synonymType = SynonymType.HETEROTYPIC_SYNONYM_OF();
......
1657 1657
			}
1658 1658
			taxon.addSynonymName(name, synonymType);
1659 1659
		}else{
1660
			name = (NonViralName)taxon.getName();
1660
			name = taxon.getName();
1661 1661
		}
1662 1662
		return name;
1663 1663
	}
......
1667 1667
	 * @param element
1668 1668
	 * @param taxon
1669 1669
	 */
1670
	private void handleInfraspecificEpithet(Element element, String attrValue, NonViralName<?> name) {
1670
	private void handleInfraspecificEpithet(Element element, String attrValue, INonViralName name) {
1671 1671
		String value = element.getTextNormalize();
1672 1672
		if (value.indexOf("subsp.") != -1){
1673 1673
			//TODO genus and species epi
......
1690 1690
	 * @param element
1691 1691
	 * @param name
1692 1692
	 */
1693
	private void handleBasionymAuthor(EfloraImportState state, Element elBasionymAuthor, NonViralName name, boolean overwrite) {
1693
	private void handleBasionymAuthor(EfloraImportState state, Element elBasionymAuthor, INonViralName name, boolean overwrite) {
1694 1694
		String strAuthor = elBasionymAuthor.getValue().trim();
1695 1695
		Pattern reBasionymAuthor = Pattern.compile("^\\(.*\\)$");
1696 1696
		if (reBasionymAuthor.matcher(strAuthor).matches()){
......
1714 1714
	 * @param name
1715 1715
	 * @param elNom
1716 1716
	 */
1717
	private void handleNameAuthors(Element elAuthor, NonViralName name) {
1717
	private void handleNameAuthors(Element elAuthor, INonViralName name) {
1718 1718
		if (name.getCombinationAuthorship() != null){
1719 1719
			logger.warn("Name already has a combination author. Name: " +  name.getTitleCache() + ", Author: " + elAuthor.getTextNormalize());
1720 1720
		}
......
1955 1955
	 * @param value
1956 1956
	 * @param taxonNameBase
1957 1957
	 */
1958
	private void handleSubGenus(String value, TaxonNameBase taxonNameBase) {
1958
	private void handleSubGenus(String value, INonViralName taxonNameBase) {
1959 1959
		String name = value.replace("Subgenus", "").trim();
1960
		((NonViralName)taxonNameBase).setInfraGenericEpithet(name);
1960
		taxonNameBase.setInfraGenericEpithet(name);
1961 1961
	}
1962 1962

  
1963 1963
	/**
1964 1964
	 * @param value
1965 1965
	 * @param taxonNameBase
1966 1966
	 */
1967
	private void handleSection(String value, TaxonNameBase taxonNameBase) {
1967
	private void handleSection(String value, INonViralName taxonNameBase) {
1968 1968
		String name = value.replace("Section", "").trim();
1969
		((NonViralName)taxonNameBase).setInfraGenericEpithet(name);
1969
		taxonNameBase.setInfraGenericEpithet(name);
1970 1970
	}
1971 1971

  
1972 1972
	/**
......
2000 2000
	 * @param value
2001 2001
	 * @param taxonNameBase
2002 2002
	 */
2003
	protected void handleGenus(String value, TaxonNameBase taxonName) {
2003
	protected void handleGenus(String value, INonViralName taxonName) {
2004 2004
		Matcher matcher = rexGenusAuthor.matcher(value);
2005 2005
		if (matcher.find()){
2006 2006
			String author = matcher.group();
......
2010 2010
			team.setTitleCache(author, true);
2011 2011
			Credit credit = Credit.NewInstance(team, null);
2012 2012
			taxonName.addCredit(credit);
2013
//			NonViralName nvn = (NonViralName)taxonName;
2014
//			nvn.setCombinationAuthorship(team);
2015
//			nvn.setGenusOrUninomial(genus);
2013
//			taxonName.setCombinationAuthorship(team);
2014
//			taxonName.setGenusOrUninomial(genus);
2016 2015
		}else{
2017 2016
			logger.info("No Author match for " + value);
2018 2017
		}
......
2170 2169
	 * @param ref
2171 2170
	 * @param nonViralName
2172 2171
	 */
2173
	protected void parseNomStatus(Reference ref, NonViralName nonViralName) {
2172
	protected void parseNomStatus(Reference ref, TaxonNameBase nonViralName) {
2174 2173
		String titleToParse = ref.getTitleCache();
2175 2174

  
2176 2175
		String noStatusTitle = parser.parseNomStatus(titleToParse, nonViralName, true);
cdm-eflora/src/main/java/eu/etaxonomy/cdm/io/eflora/centralAfrica/ericaceae/CentralAfricaEricaceaeTaxonImport.java
31 31
import eu.etaxonomy.cdm.model.description.TaxonDescription;
32 32
import eu.etaxonomy.cdm.model.description.TextData;
33 33
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
34
import eu.etaxonomy.cdm.model.name.NonViralName;
34
import eu.etaxonomy.cdm.model.name.INonViralName;
35 35
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
36 36
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
37 37
import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
......
47 47
 */
48 48
@Component
49 49
public class CentralAfricaEricaceaeTaxonImport  extends EfloraTaxonImport  {
50
	private static final Logger logger = Logger.getLogger(CentralAfricaEricaceaeTaxonImport.class);
50
    private static final long serialVersionUID = 6442665916458420942L;
51
    private static final Logger logger = Logger.getLogger(CentralAfricaEricaceaeTaxonImport.class);
51 52

  
52 53

  
53

  
54

  
55
	/* (non-Javadoc)
56
	 * @see eu.etaxonomy.cdm.io.eflora.EfloraTaxonImport#handleNomenclaturalReference(eu.etaxonomy.cdm.model.name.NonViralName, java.lang.String)
57
	 */
58 54
	@Override
59
	protected TeamOrPersonBase handleNomenclaturalReference(NonViralName name, String value) {
55
	protected TeamOrPersonBase handleNomenclaturalReference(TaxonNameBase name, String value) {
60 56
		Reference nomRef = ReferenceFactory.newGeneric();
61 57
		nomRef.setTitleCache(value, true);
62 58
		parseNomStatus(nomRef, name);
......
68 64
		microReference = parseHomonym(microReference, name);
69 65
		name.setNomenclaturalMicroReference(microReference);
70 66

  
71
		TeamOrPersonBase  nameTeam = CdmBase.deproxy(name.getCombinationAuthorship(), TeamOrPersonBase.class);
72
		TeamOrPersonBase  refTeam = nomRef.getAuthorship();
67
		TeamOrPersonBase<?>  nameTeam = CdmBase.deproxy(name.getCombinationAuthorship(), TeamOrPersonBase.class);
68
		TeamOrPersonBase<?>  refTeam = nomRef.getAuthorship();
73 69
		if (nameTeam == null ){
74 70
			logger.warn("Name has nom. ref. but no author team. Name: " + name.getTitleCache() + ", Nom.Ref.: " + value);
75 71
		}else if (refTeam == null ){
......
167 163
	 * @param value
168 164
	 */
169 165
	@Override
170
	protected TeamOrPersonBase<?> handleNameUsage(Taxon taxon, NonViralName<?> name, String referenceTitle, TeamOrPersonBase lastTeam) {
166
	protected TeamOrPersonBase<?> handleNameUsage(Taxon taxon, INonViralName name,
167
	        String referenceTitle, TeamOrPersonBase lastTeam) {
168

  
171 169
		Reference ref = ReferenceFactory.newGeneric();
172 170

  
173 171
		ref.setTitleCache(referenceTitle, true);
......
190 188
	//		parseReferenceType(ref);
191 189

  
192 190
			TextData textData = TextData.NewInstance(Feature.CITATION());
193
			textData.addSource(OriginalSourceType.PrimaryTaxonomicSource, null, null, singleRef, microReference, name, null);
191
			textData.addSource(OriginalSourceType.PrimaryTaxonomicSource, null, null, singleRef, microReference, (TaxonNameBase) name, null);
194 192
			description.addElement(textData);
195 193
		}
196 194
		return team;
......
229 227

  
230 228
	}
231 229

  
232
	protected TeamOrPersonBase getReferenceAuthor (Reference ref, NonViralName name) {
230
	protected TeamOrPersonBase getReferenceAuthor (Reference ref, INonViralName name) {
233 231
		String titleString = ref.getTitleCache();
234 232
		String re = "\\(.*\\)";
235 233
		Pattern pattern = Pattern.compile(re);
......
248 246

  
249 247
	}
250 248

  
251
	private TeamOrPersonBase getAuthorTeam(String authorString, NonViralName name) {
249
	private TeamOrPersonBase getAuthorTeam(String authorString, INonViralName name) {
252 250
		//TODO atomize
253 251
//		TeamOrPersonBase nameTeam = CdmBase.deproxy(name.getCombinationAuthorship(), TeamOrPersonBase.class);
254 252
//		String nameTeamTitle = nameTeam == null ? "" : nameTeam.getNomenclaturalTitle();
......
367 365
	}
368 366

  
369 367
	@Override
370
    protected void handleGenus(String value, TaxonNameBase taxonName) {
368
    protected void handleGenus(String value, INonViralName taxonName) {
371 369
		// do nothing
372 370
	}
373 371

  
cdm-eflora/src/main/java/eu/etaxonomy/cdm/io/eflora/centralAfrica/ferns/CentralAfricaFernsTaxonImport.java
45 45
import eu.etaxonomy.cdm.model.common.ExtensionType;
46 46
import eu.etaxonomy.cdm.model.common.TimePeriod;
47 47
import eu.etaxonomy.cdm.model.name.BotanicalName;
48
import eu.etaxonomy.cdm.model.name.INonViralName;
48 49
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
49 50
import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
50 51
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
51 52
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
52 53
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
53
import eu.etaxonomy.cdm.model.name.NonViralName;
54 54
import eu.etaxonomy.cdm.model.name.Rank;
55 55
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
56 56
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
......
647 647
		if (StringUtils.isNotBlank(referenceString) || StringUtils.isNotBlank(volume) ||
648 648
					StringUtils.isNotBlank(pages) || StringUtils.isNotBlank(illustrations) ||
649 649
					StringUtils.isNotBlank(datePublishedString) || StringUtils.isNotBlank(paperTitle)){
650
			NonViralName<?> name = CdmBase.deproxy(taxonBase.getName(), NonViralName.class);
650
			INonViralName name = taxonBase.getName();
651 651
			Reference reference = ReferenceFactory.newGeneric();
652 652
			reference.setAuthorship(name.getCombinationAuthorship());
653 653
			reference.setTitle(referenceString);
654 654
			reference.setVolume(volume);
655 655
			reference.setEdition(part);
656
			Reference inrefernce = null;
656
			Reference inreference = null;
657 657
			//TODO parser
658 658
			TimePeriod datePublished = TimePeriodParser.parseString(datePublishedString);
659 659
			reference.setDatePublished(datePublished);
......
697 697

  
698 698
			TaxonBase<?> taxonBase = state.getRelatedObject(state.CURRENT_OBJECT_NAMESPACE, state.CURRENT_OBJECT_ID, TaxonBase.class);
699 699
			if (StringUtils.isNotBlank(nomRemarksString)){
700
				NonViralName name = CdmBase.deproxy(taxonBase.getName(), NonViralName.class);
700
				INonViralName name = taxonBase.getName();
701 701
				parseNomRemark(state, name, nomRemarksString.trim(),taxonStatus, taxonNumber);
702 702
			}
703 703
			return taxonBase;
......
707 707
	}
708 708

  
709 709

  
710
	private void parseNomRemark(CentralAfricaFernsImportState state, NonViralName name, String nomRemarksString, String taxonStatus, String taxonNumber) {
710
	private void parseNomRemark(CentralAfricaFernsImportState state, INonViralName name, String nomRemarksString, String taxonStatus, String taxonNumber) {
711 711

  
712 712
		if (nomRemarksString.equalsIgnoreCase("comb. illeg.")){
713 713
			name.addStatus(NomenclaturalStatus.NewInstance(NomenclaturalStatusType.COMBINATION_ILLEGITIMATE()));
cdm-eflora/src/main/java/eu/etaxonomy/cdm/io/eflora/centralAfrica/ferns/CentralAfricaFernsTaxonRelationImport.java
48 48
import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
49 49
import eu.etaxonomy.cdm.model.location.NamedAreaType;
50 50
import eu.etaxonomy.cdm.model.name.BotanicalName;
51
import eu.etaxonomy.cdm.model.name.NonViralName;
51
import eu.etaxonomy.cdm.model.name.INonViralName;
52 52
import eu.etaxonomy.cdm.model.name.Rank;
53 53
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
54 54
import eu.etaxonomy.cdm.model.reference.Reference;
......
142 142

  
143 143
		List<Taxon> taxonList = getTaxonService().list(Taxon.class, null, null, null, propPath );
144 144
		for (Taxon taxon : taxonList){
145
			NonViralName<?> nvn = CdmBase.deproxy(taxon.getName(), NonViralName.class);
145
			INonViralName nvn = taxon.getName();
146 146
			UUID uuid = taxon.getUuid();
147 147
			String nameCache = nvn.getNameCache();
148 148
			String titleCache = nvn.getTitleCache();
......
401 401
	 * @param constructedHigherTaxon
402 402
	 */
403 403
	private Taxon mergeExistingAndConstructedTaxon(CentralAfricaFernsImportState state, Taxon existingTaxon, Taxon constructedTaxon) {
404
		NonViralName<?> constructedName = CdmBase.deproxy(constructedTaxon.getName(), NonViralName.class);
405
		NonViralName<?> existingName = CdmBase.deproxy(existingTaxon.getName(), NonViralName.class);
404
		INonViralName constructedName = constructedTaxon.getName();
405
		INonViralName existingName = existingTaxon.getName();
406 406
		if (constructedName.hasAuthors()){
407 407
			if (! existingName.hasAuthors()){
408 408
				logger.warn(state.getTaxonNumber() + " - Constrcucted name ("+constructedName.getTitleCache()+") has authors but existing name ("+existingName.getTitleCache()+") has no authors");
......
574 574
	 * @param name2
575 575
	 * @return
576 576
	 */
577
	private boolean authorsMatch(NonViralName<?> name1, NonViralName<?> name2) {
577
	private boolean authorsMatch(INonViralName name1, INonViralName name2) {
578 578
		String combinationAuthor1 = name1.computeCombinationAuthorNomenclaturalTitle();
579 579
		String combinationAuthor2 = name2.computeCombinationAuthorNomenclaturalTitle();
580 580
		String basionymAuthor1 = name1.computeBasionymAuthorNomenclaturalTitle();
......
1187 1187
	 * @param existingHigherTaxon
1188 1188
	 */
1189 1189
	private boolean mergeAuthors_old(Taxon higherTaxon, Taxon existingHigherTaxon) {
1190
		NonViralName<?> existingName = CdmBase.deproxy(higherTaxon.getName(), NonViralName.class);
1191
		NonViralName<?> newName = CdmBase.deproxy(existingHigherTaxon.getName(), NonViralName.class);
1190
		INonViralName existingName = higherTaxon.getName();
1191
		INonViralName newName = existingHigherTaxon.getName();
1192 1192
		if (existingName == newName){
1193 1193
			return true;
1194 1194
		}

Also available in: Unified diff