Project

General

Profile

« Previous | Next » 

Revision 41d91065

Added by Andreas Müller about 8 years ago

remove booleans on addParentChild to make IndexFungorumHigherClassificationImport compile

View differences:

cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/indexFungorum/IndexFungorumHigherClassificationImport.java
21 21
import org.springframework.stereotype.Component;
22 22
import org.springframework.transaction.TransactionStatus;
23 23

  
24
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
25 24
import eu.etaxonomy.cdm.io.pesi.out.PesiTransformer;
26 25
import eu.etaxonomy.cdm.model.common.CdmBase;
27 26
import eu.etaxonomy.cdm.model.common.Marker;
......
32 31
import eu.etaxonomy.cdm.model.taxon.Classification;
33 32
import eu.etaxonomy.cdm.model.taxon.Taxon;
34 33
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
35
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
36 34

  
37 35

  
38 36
/**
......
134 132
										Rank newRank = (lastKingdom.equals("Fungi") ? null : Rank.PHYLUM());
135 133
										taxonPhylum = makeTaxon(state, phylum, newRank);
136 134
										if (taxonPhylum != null){
137
											classification.addParentChild(higherTaxon, taxonPhylum, null, null, true);
135
											classification.addParentChild(higherTaxon, taxonPhylum, null, null);
138 136
										}
139 137
										higherTaxon = isIncertisSedis(phylum) ? higherTaxon : taxonPhylum;
140 138
										lastPhylum = phylum;
......
145 143
									Rank newRank = (lastKingdom.equals("Fungi") ? null : Rank.SUBPHYLUM());
146 144
									taxonSubphylum = makeTaxon(state, subphylum, newRank);
147 145
									if (taxonSubphylum != null){
148
										getClassification(state).addParentChild(higherTaxon,taxonSubphylum, null, null,true);
146
										getClassification(state).addParentChild(higherTaxon,taxonSubphylum, null, null);
149 147
									}
150 148
									higherTaxon = isIncertisSedis(subphylum) ? higherTaxon : taxonSubphylum;
151 149
									lastSubphylum = subphylum;
......
154 152
								}
155 153
								taxonClass = makeTaxon(state, classname, Rank.CLASS());
156 154
								if (taxonClass != null){
157
									getClassification(state).addParentChild(higherTaxon, taxonClass, null, null, true);
155
									getClassification(state).addParentChild(higherTaxon, taxonClass, null, null);
158 156
								}
159 157
								higherTaxon = isIncertisSedis(classname) ? higherTaxon : taxonClass;
160 158
								lastClassname = classname;
......
163 161
							}
164 162
							taxonSubclass = makeTaxon(state, subclass, Rank.SUBCLASS());
165 163
							if (taxonSubclass != null){
166
								getClassification(state).addParentChild(higherTaxon, taxonSubclass,null, null, true);
164
								getClassification(state).addParentChild(higherTaxon, taxonSubclass,null, null);
167 165
							}
168 166
							higherTaxon = isIncertisSedis(subclass) ? higherTaxon : taxonSubclass;
169 167
							lastSubclass = subclass;
......
172 170
						}
173 171
						taxonOrder = makeTaxon(state, order, Rank.ORDER());
174 172
						if (taxonOrder != null){
175
							getClassification(state).addParentChild(higherTaxon, taxonOrder, null, null, true);
173
							getClassification(state).addParentChild(higherTaxon, taxonOrder, null, null);
176 174
						}
177 175
						higherTaxon = isIncertisSedis(order) ? higherTaxon : taxonOrder;
178 176
						lastOrder = order;
......
182 180
					taxonFamily = makeTaxon(state, family, Rank.FAMILY());
183 181
					if (taxonFamily != null){
184 182
						try{
185
							getClassification(state).addParentChild(higherTaxon, taxonFamily, null, null, true);
183
							getClassification(state).addParentChild(higherTaxon, taxonFamily, null, null);
186 184
						}catch(IllegalStateException e){
187 185
							if (e.getMessage().startsWith("The child taxon is already part of the tree")){
188 186
								//TaxonNode node = getClassification(state).getNode(taxonFamily);

Also available in: Unified diff