Révision 1667

tmp/org.txm.core/src/java/org/txm/objects/Project.java (revision 1667)
224 224
		//		this.scope = new BasePreferenceScope(this);
225 225

  
226 226
		// reloading existing results
227
		this.loadResults();
227
		this.loadResults(null);
228 228
	}
229 229

  
230 230

  
......
369 369
	/**
370 370
	 * Loads and create the persisted results from the preferences service.
371 371
	 */
372
	public void loadResults()	{
372
	public void loadResults(Class clazz)	{
373 373
		//		if (TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_PERSISTENCE_ENABLED)) {
374 374
		Log.finest("*** Project.loadResults(): reloading project persitent results...");
375 375

  
......
405 405
					node.removeNode();
406 406
					continue;
407 407
				}
408
				
409
				if (clazz != null && !clazz.getName().equals(className)) {
410
					continue; // only load the result of class=clazz
411
				}
408 412

  
409 413
				Log.fine("\nProject.loadResults(): loading from result node qualifier " + parametersNodePath);
410 414
				//Log.finest("Toolbox.initialize(): class = " + TXMPreferences.getString("class", nodeQualifier));
......
452 456
			}
453 457
		}
454 458
		
455
		// load the corpus builds
456
		for (CorpusBuild corpus : getCorpusBuilds()) {
457
			if (corpus != null) {
458
				corpus.compute(false);
459
			}
460
		}
459
//		// load the corpus builds
460
//		for (CorpusBuild corpus : getCorpusBuilds()) {
461
//			if (corpus != null) {
462
//				corpus.compute(false);
463
//			}
464
//		}
461 465
	}
462 466

  
463 467
	//	public BasePreferenceScope getPreferenceScope() {
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java (revision 1667)
112 112
		this.internalPersistable = true;
113 113

  
114 114
		if (getID() != null && getProjectDirectory() != null) {
115
			this.dataDirectory = new File(getProjectDirectory(), "data/"+getID());
116
			this.registryFile = new File(getProjectDirectory(), "registry/"+getID().toLowerCase());
115
			compute(false);
117 116
		}
118 117
	}
119 118

  

Formats disponibles : Unified diff