Project

General

Profile

« Previous | Next » 

Revision 55a9b086

Added by Andreas Müller about 11 years ago

Remove not public classes in merge and match strategies

View differences:

cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/merge/DefaultMergeStrategyTest.java
21 21
import org.junit.Assert;
22 22
import org.junit.Before;
23 23
import org.junit.BeforeClass;
24
import org.junit.Ignore;
25 24
import org.junit.Test;
26 25

  
27 26
import eu.etaxonomy.cdm.model.agent.Address;
......
46 45
import eu.etaxonomy.cdm.model.occurrence.Specimen;
47 46
import eu.etaxonomy.cdm.model.reference.Reference;
48 47
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
49
//import eu.etaxonomy.cdm.model.reference.PrintSeries;
50
//import eu.etaxonomy.cdm.model.reference.Thesis;
51 48
import eu.etaxonomy.cdm.model.taxon.Taxon;
52 49
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
53 50
import eu.etaxonomy.cdm.strategy.cache.reference.INomenclaturalReferenceCacheStrategy;
......
62 59
	private static final Logger logger = Logger.getLogger(DefaultMergeStrategyTest.class);
63 60

  
64 61
	private DefaultMergeStrategy bookMergeStrategy;
65
	private Reference book1;
62
	private Reference<?> book1;
66 63
	private String editionString1 ="Ed.1";
67 64
	private String volumeString1 ="Vol.1";
68 65
	private Team team1;
69
	private Reference printSeries1;
66
	private Reference<?> printSeries1;
70 67
	private Annotation annotation1;
71 68
	private String title1 = "Title1";
72 69
	private TimePeriod datePublished1 = TimePeriod.NewInstance(2000);
73 70
	private int hasProblem1 = 1;
74 71
	private LSID lsid1;
75 72
	
76
	private Reference book2;
73
	private Reference<?> book2;
77 74
	private String editionString2 ="Ed.2";
78 75
	private String volumeString2 ="Vol.2";
79 76
	private Team team2;
80
	private Reference printSeries2;
77
	private Reference<?> printSeries2;
81 78
	private Annotation annotation2;
82 79
	private String annotationString2;
83 80
	private String title2 = "Title2";
......
85 82
	private TimePeriod datePublished2 = TimePeriod.NewInstance(2002);
86 83
	private int hasProblem2 = 1;
87 84
	private LSID lsid2;
88
	private ReferenceFactory refFactory;
89 85
	
90 86
	
91
	private Reference book3;
87
	private Reference<?> book3;
92 88
	
93 89
	/**
94 90
	 * @throws java.lang.Exception
......
111 107
	 */
112 108
	@Before
113 109
	public void setUp() throws Exception {
114
		refFactory = ReferenceFactory.newInstance();
115 110
		bookMergeStrategy = DefaultMergeStrategy.NewInstance(Reference.class);
116 111
		team1 = Team.NewInstance();
117 112
		team1.setTitleCache("Team1", true);
118 113
		team2 = Team.NewInstance();
119 114
		team2.setTitleCache("Team2", true);
120
		printSeries1 = refFactory.newPrintSeries("Series1");
121
		printSeries2 = refFactory.newPrintSeries("Series2");
115
		printSeries1 = ReferenceFactory.newPrintSeries("Series1");
116
		printSeries2 = ReferenceFactory.newPrintSeries("Series2");
122 117
		annotation1 = Annotation.NewInstance("Annotation1", null);
123 118
		annotationString2 = "Annotation2";
124 119
		annotation2 = Annotation.NewInstance(annotationString2, null);
125 120
		
126
		book1 = refFactory.newBook();
121
		book1 = ReferenceFactory.newBook();
127 122
		book1.setAuthorTeam(team1);
128 123
		book1.setTitle(title1);
129 124
		book1.setEdition(editionString1);
......
136 131
		book1.setLsid(lsid1);
137 132
		book1.setNomenclaturallyRelevant(false);
138 133
		
139
		book2 = refFactory.newBook();
134
		book2 = ReferenceFactory.newBook();
140 135
		book2.setAuthorTeam(team2);
141 136
		book2.setTitle(title2);
142 137
		book2.setEdition(editionString2);
......
302 297
		Institution school1 = Institution.NewInstance();
303 298
		Institution school2 = Institution.NewInstance();
304 299
		
305
		Reference thesis1 = refFactory.newThesis();
300
		Reference<?> thesis1 = ReferenceFactory.newThesis();
306 301
		thesis1.setSchool(school1);
307 302
		//Thesis thesis1 = Thesis.NewInstance(school1);
308
		Reference thesis2 = refFactory.newThesis();
303
		Reference<?> thesis2 = ReferenceFactory.newThesis();
309 304
		thesis2.setSchool(school2);
310 305
		DefaultMergeStrategy thesisStrategy = DefaultMergeStrategy.NewInstance(Reference.class);
311 306
		
......
354 349
		botName2.setCombinationAuthorTeam(team2);
355 350
		
356 351
		//taxa
357
		TaxonBase taxon1= Taxon.NewInstance(botName1, book1);
358
		TaxonBase taxon2= Taxon.NewInstance(botName2, book2);
352
		TaxonBase<?> taxon1= Taxon.NewInstance(botName1, book1);
353
		TaxonBase<?> taxon2= Taxon.NewInstance(botName2, book2);
359 354
		
360 355
		try {
361 356
			botNameMergeStrategy.setMergeMode("combinationAuthorTeam", MergeMode.SECOND);

Also available in: Unified diff