Revision 1632

tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1632)
35 35
import org.txm.utils.io.IOUtils;
36 36
import org.txm.utils.logger.Log;
37 37

  
38
// FIXME: At this moment, an empty list is created for children, to not return
39
// null when calling getChildren(), see if that's what we want
40 38
/**
41 39
 * Root class of all TXM results. This class contains methods to get some
42 40
 * different versions of the name of the result and some additional computing
......
170 168
	 * To store the simple name for unserialization and lazy loading.
171 169
	 * This string can be used, for example, to display some information in UI even if the result has not yet been recomputed.
172 170
	 */
171
	// TODO: we should do the same with getDetails() method
173 172
	@Parameter(key=TXMPreferences.LAZY_NAME, type=Parameter.INTERNAL)
174 173
	private String lazyName;
175 174

  
......
199 198
	 */
200 199
	protected boolean computing = false;
201 200

  
202
	/**
203
	 * Generic toString() method for TXMResult.
204
	 */
205
	public String toString() {
206
		if (userName != null && !userName.isEmpty()) {
207
			return userName;
208
		}
209
		else if (lazyName != null && !lazyName.isEmpty()) {
210
			return lazyName;
211
		}
212
		return this.getSimpleName();
213
	}
214 201

  
215 202
	/**
216 203
	 * Creates a new TXMResult, child of the specified parent.
......
2647 2634
		return TXMPreferences.flush(this, outfile);
2648 2635
	}
2649 2636

  
2650
	
2637

  
2638
	/**
2639
	 * Generic toString() method for TXMResult.
2640
	 */
2641
	public String toString() {
2642
		if (userName != null && !userName.isEmpty()) {
2643
			return userName;
2644
		}
2645
		else if (lazyName != null && !lazyName.isEmpty()) {
2646
			return lazyName;
2647
		}
2648
		return this.getSimpleName();
2649
	}
2650

  
2651 2651
}

Also available in: Unified diff