Project

General

Profile

« Previous | Next » 

Revision 892efc69

Added by Andreas Kohlbecker almost 14 years ago

merging /branches/cdmlib/SPRINT-Chichorieae1/ to trunk

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelReferenceImport.java
54 54
import eu.etaxonomy.cdm.io.common.mapping.CdmIoMapping;
55 55
import eu.etaxonomy.cdm.io.common.mapping.CdmSingleAttributeMapperBase;
56 56
import eu.etaxonomy.cdm.io.common.mapping.DbImportExtensionMapper;
57
import eu.etaxonomy.cdm.model.agent.Person;
58 57
import eu.etaxonomy.cdm.model.agent.Team;
59 58
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
60 59
import eu.etaxonomy.cdm.model.common.CdmBase;
......
336 335
			nameSpace = BerlinModelAuthorTeamImport.NAMESPACE;
337 336
			cdmClass = Team.class;
338 337
			idSet = teamIdSet;
339
			Map<String, Person> teamMap = (Map<String, Person>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace);
338
			Map<String, Team> teamMap = (Map<String, Team>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace);
340 339
			result.put(nameSpace, teamMap);
341 340

  
342 341
			
......
492 491
		boolean isPreliminary = rs.getBoolean("PreliminaryFlag");
493 492
		String refAuthorString = rs.getString("refAuthorString");
494 493
		Integer nomAuthorTeamFk = rs.getInt("NomAuthorTeamFk");
495
		TeamOrPersonBase<?> nomAuthor = teamMap.get(nomAuthorTeamFk);
494
		String strNomAuthorTeamFk = String.valueOf(nomAuthorTeamFk);
495
		TeamOrPersonBase<?> nomAuthor = teamMap.get(strNomAuthorTeamFk);
496 496
		ReferenceBase nomReference = null;
497 497
		
498 498
		boolean hasNomRef = false;
......
506 506
			referenceBase.setAuthorTeam(author);
507 507
			//referenceBase.setNomenclaturallyRelevant(true);
508 508
			if (isPreliminary){
509
				referenceBase.setTitleCache(nomRefCache);
509
				referenceBase.setTitleCache(nomRefCache, true);
510 510
			}
511 511
			if (! nomRefToSave.containsKey(refId)){
512 512
				if (referenceBase == null){
......
536 536
			referenceBase.setAuthorTeam(author);
537 537
			referenceBase.setNomenclaturallyRelevant(false);
538 538
			if (isPreliminary){
539
				referenceBase.setTitleCache(refCache);
539
				referenceBase.setTitleCache(refCache, true);
540 540
			}
541 541
			if (! biblioRefToSave.containsKey(refId)){
542 542
				biblioRefToSave.put(refId, referenceBase);
......
771 771
				series = nomTitle;
772 772
			}
773 773
			printSeries = ReferenceFactory.newPrintSeries(series);
774
			//TODO only one for ref and nomRef
775
			logger.warn("Implementation of printSeries is preliminary");
774
			logger.info("Implementation of printSeries is preliminary");
776 775
		}
777 776
		Object inRefFk = valueMap.get("inRefFk".toLowerCase());
778 777
		//Series (as Reference)
......
793 792
					book.setInSeries((IPrintSeries)inSeries);
794 793
					//TODO
795 794
				}else{
796
					logger.warn("inSeries is not of type PrintSeries but of type " + inSeries.getClass().getSimpleName() +
797
							" Inreference relation could not be set");
795
					logger.warn("inSeries is not of type PrintSeries but of type " + inSeries.getType().getMessage() +
796
							". In-reference relation could not be set for refId " + refId + " and inRefFk " + inRefFk);
798 797
				}
799 798
			}else{
800 799
				logger.error("PrintSeries (refId = " + inRefFkInt + ") for book (refID = " + refId +") could not be found in nomRefStore. Inconsistency error. ");
......
940 939
					TeamOrPersonBase<?> team = Team.NewInstance();
941 940
					//TODO which one to use??
942 941
					team.setNomenclaturalTitle(authorString);
943
					team.setTitleCache(authorString);
942
					team.setTitleCache(authorString, true);
944 943
					result = team;
945 944
				}
946 945
			}
......
949 948
				TeamOrPersonBase<?> team = Team.NewInstance();
950 949
				//TODO which one to use??
951 950
				team.setNomenclaturalTitle(authorString);
952
				team.setTitleCache(authorString);
951
				team.setTitleCache(authorString, true);
953 952
				result = team;
954 953
			}else{
955 954
				result = nomAuthor;

Also available in: Unified diff