Project

General

Profile

« Previous | Next » 

Revision 9ef7b6ea

Added by Andreas Müller almost 10 years ago

fixing #4278 for FeatureNode

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/FeatureNode.java
135 135
	@JoinTable(name="FeatureNode_DefinedTermBase_InapplicableIf")
136 136
	private Set<State> inapplicableIf = new HashSet<State>();
137 137

  
138

  
138
// ***************************** FACTORY *********************************/
139
	
139 140
	/** 
140 141
	 * Creates a new empty feature node instance.
141 142
	 * 
......
157 158
		result.setFeature(feature);
158 159
		return result;
159 160
	}
161
	
162
// ******************** CONSTRUCTOR ***************************************/
160 163

  
161 164
	
162 165
	/** 
......
177 180
		this.featureTree = featureTree;
178 181
	}
179 182
	
180
	//** ********************** FEATURE ******************************/
183
//** ********************** FEATURE ******************************/
181 184

  
182 185
	/** 
183 186
	 * Returns the {@link Feature feature} <i>this</i> feature node is based on.
......
214 217
		this.parent = parent;
215 218
	}
216 219
	
217
	//** ********************** CHILDREN ******************************/
220
//** ********************** CHILDREN ******************************/
221

  
222
	
223
	/**
224
	 * @deprecated for internal use only.
225
	 */
226
	//see #4278 , #4200
227
	protected void setSortIndex(Integer sortIndex) {
228
		this.sortIndex = sortIndex;
229
	}
218 230

  
219 231
	/** 
220 232
	 * Returns the (ordered) list of feature nodes which are children nodes of
......
267 279
		children.add(index, child);
268 280
		//TODO workaround (see sortIndex doc)
269 281
		for(int i = 0; i < children.size(); i++){
270
			children.get(i).sortIndex = i;
282
			children.get(i).setSortIndex(i);
271 283
		}
272
		child.sortIndex = index;
284
		child.setSortIndex(index);
273 285
	}
274 286
	/** 
275 287
	 * Removes the given feature node from the list of {@link #getChildNodes() children}
......
307 319
			//TODO workaround (see sortIndex doc)
308 320
			for(int i = 0; i < children.size(); i++){
309 321
				FeatureNode childAt = children.get(i);
310
				childAt.sortIndex = i;
311
		}
312
			child.sortIndex = null;
322
				childAt.setSortIndex(i);
323
			}
324
			child.setSortIndex(null);
313 325
		}
314 326
	}
315 327

  
......
588 600
		}
589 601
	}
590 602

  
591
	
592
//	//** ********************** TAXON ******************************/
593
//	
594
//	/** 
595
//	 * Returns the {@link Taxon taxon} <i>this</i> terminal node is
596
//	 * associated with.
597
//	 */
598
//	public Taxon getTaxon() {
599
//		return taxon;
600
//	}
601
//
602
//	/**
603
//	 * Assigns the given taxon to <i>this</i> feature node.
604
//	 * 
605
//	 * @param	taxon	the taxon to be set 
606
//	 * @see				#getTaxon() 
607
//	 */
608
//	public void setTaxon(Taxon taxon) {
609
//		this.taxon = taxon;
610
//	}
603

  
611 604
}

Also available in: Unified diff