Revision 2523

tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 2523)
259 259
		this.weight = 0;
260 260
		
261 261
		this.children = new ArrayList<>(1);
262
		// this.children = Collections.synchronizedList(new ArrayList<TXMResult>()); // FIXME: SJ: can fix the conccurent excpetion if needed
262
		// this.children = Collections.synchronizedList(new ArrayList<TXMResult>()); // FIXME: SJ: can fix the concurrent exception if needed when accessing children from multiple threads
263 263
		
264 264
		this.commandPreferencesNodePath = FrameworkUtil.getBundle(getClass()).getSymbolicName();
265 265
		Log.finest("TXMResult.TXMResult(): command preferences node path: " + this.commandPreferencesNodePath + "."); //$NON-NLS-1$ //$NON-NLS-2$
......
394 394
	 * @return
395 395
	 */
396 396
	public static String createUUID() {
397
		// FIXME: see if it's useful to put the class name or not, should be better to save it in the .prefs
397
		// FIXME: SJ: see if it's useful to put the class name or not, should be better to save it in the .prefs
398 398
		// this.uniqueID = this.getClass().getName() + '@' + ID_TIME_FORMAT.format(new Date(System.currentTimeMillis())) + "_" + UUID.randomUUID();
399 399
		return UUID_PREFIX + ID_TIME_FORMAT.format(new Date(System.currentTimeMillis())) + "_" + nextInt();
400 400
	}
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/messages/messages.properties (revision 2523)
9 9
error_notEnoughColumns                   = Not enough columns ({0}): minimum is two.
10 10

  
11 11
info_buildingLexicalTableWith                                = Computing lexical table with {0}.
12
info_creatingLexicalTableWithTheP0CorpusAndTheP1Subcorpus    = Computing lexical table with the {0} corpus and the {1} subcorpus...
12 13
info_creatingLexicalTableWithTheP0PartitionCommaPropertiesP1 = Computing lexical table with the {0} partition, property [{1}]...
14
info_creatingLexicalTableWithTheP0PartitionIndex             = Computing lexical table with the <{0}> partition index...
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/messages/messages_fr.properties (revision 2523)
1
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
1
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)

2 2
#TXM messages generated by the PluginMessagesManager class
3 3
#Tue Dec 18 10:24:08 CET 2018
4 4

  
......
9 9
error_notEnoughColumns                   = Pas assez de colonnes ({0}) : le minimum est deux.
10 10

  
11 11
info_buildingLexicalTableWith                                = Calcul de la table lexicale avec {0}.
12
info_creatingLexicalTableWithTheP0CorpusAndTheP1Subcorpus    = Calcul de la table lexicale avec le corpus {0} et le sous-corpus {1}...
12 13
info_creatingLexicalTableWithTheP0PartitionCommaPropertiesP1 = Calcul de la table lexicale avec la partition {0}, propriété [{1}]...
14
info_creatingLexicalTableWithTheP0PartitionIndex             = Calcul de la table lexicale avec l'index de partition <{0}>...
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/messages/LexicalTableCoreMessages.java (revision 2523)
19 19
	
20 20
	public static String info_creatingLexicalTableWithTheP0PartitionCommaPropertiesP1;
21 21
	
22
	public static String info_creatingLexicalTableWithTheP0CorpusAndTheP1Subcorpus;
23
	
24
	public static String info_creatingLexicalTableWithTheP0PartitionIndex;
25
	
26
	
22 27
	public static String error_marginIsHigherThanThePartitionSize;
23 28
	
24 29
	public static String error_notEnoughColumns;
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 2523)
337 337
	@Override
338 338
	protected boolean _compute() throws Exception {
339 339
		
340
		if (pExternData) {
341
			return statsData != null;
340
		if (this.pExternData) {
341
			return this.statsData != null;
342 342
		}
343 343
		// FIXME: SJ: became useless?
344 344
		// this.statsData = null; // reset frequencies
......
352 352
			
353 353
			Subcorpus subcorpus = (Subcorpus) this.parent;
354 354
			CQPCorpus parentCorpus = subcorpus.getCorpusParent();
355
			CQPLexicon l1 = CQPLexicon.getLexicon(parentCorpus, property, monitor, false);
356
			CQPLexicon l2 = CQPLexicon.getLexicon(subcorpus, property, monitor, false);
355
			CQPLexicon l1 = CQPLexicon.getLexicon(parentCorpus, this.property, this.monitor, false);
356
			CQPLexicon l2 = CQPLexicon.getLexicon(subcorpus, this.property, this.monitor, false);
357 357
			
358 358
			this.statsData = new LexicalTableImpl(getNextName(), l1, l2);
359 359
		}
......
363 363
			
364 364
			this.statsData = this._computeFromPartition((Partition) this.parent);
365 365
		}
366
		else if (parent instanceof PartitionIndex) {
366
		else if (this.parent instanceof PartitionIndex) {
367 367
			
368 368
			// FIXME: SJ: add 1 to vmax filter to manage the #RESTE# line when computed with corpora margins
369 369
			// need to validate
......
382 382
		
383 383
		// apply filtering
384 384
		this.statsData.filter(vMaxFilter, this.fMinFilter);
385
		// FIXME SJ: old version, < TXM 0.7.8
386
		// this.statsData.cut(this.vMaxFilter);
387 385
		
388 386
		return true;
389 387
	}
......
534 532
	
535 533
	@Override
536 534
	public String getComputingStartMessage() {
537
		return NLS.bind(LexicalTableCoreMessages.info_creatingLexicalTableWithTheP0PartitionCommaPropertiesP1, this.getParent().getSimpleName(), this.property);
535
		// from partition index
536
		if (this.parent instanceof PartitionIndex) {
537
			return NLS.bind(LexicalTableCoreMessages.info_creatingLexicalTableWithTheP0PartitionIndex, this.parent.getSimpleName());
538
		}
539
		// from partition
540
		else if (this.getPartition() != null) {
541
			return NLS.bind(LexicalTableCoreMessages.info_creatingLexicalTableWithTheP0PartitionCommaPropertiesP1, this.getPartition().getSimpleName(), this.property);
542
		}
543
		// from main corpus and subcorpus
544
		else {
545
			return NLS.bind(LexicalTableCoreMessages.info_creatingLexicalTableWithTheP0CorpusAndTheP1Subcorpus, this.getCorpus().getCorpusParent(), this.getParent().getSimpleName());
546
		}
538 547
	}
539 548
	
540 549
	/**
tmp/org.txm.specificities.core/src/org/txm/specificities/core/messages/messages_fr.properties (revision 2523)
1
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
1
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)

2 2
#TXM messages generated by the PluginMessagesManager class
3 3
#Tue Dec 18 10:24:08 CET 2018
4 4

  
......
14 14

  
15 15
info_specificitiesBarChartForTheP0LexcialTable             = Diagramme de spécificités pour la table lexicale {0}...
16 16
info_specificitiesBarChartForTheP0PartitionCommaP1Property = Diagramme de spécificités pour la partition {0}, propriété [{1}]...
17
info_specificitiesBarChartForTheP0Subcorpus                = Diagramme de spécificités pour le sous-corpus {0}...
18
info_specificitiesOfTheP0Corpus                            = Spécificités du corpus {0}...
17 19
info_specificitiesOfTheP0LexcialTable                      = Spécificités de la table lexicale {0}...
18 20
info_specificitiesOfTheP0PartitionCommaP1Property          = Spécificités de la partition {0}, propriété [{1}]...
19 21

  
tmp/org.txm.specificities.core/src/org/txm/specificities/core/messages/messages.properties (revision 2523)
1
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
1
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)

2 2
#TXM messages generated by the PluginMessagesManager class
3 3
#Tue Dec 18 10:24:08 CET 2018
4 4

  
......
14 14

  
15 15
info_specificitiesBarChartForTheP0LexcialTable             = Specificities bar chart for the {0} lexical table...
16 16
info_specificitiesBarChartForTheP0PartitionCommaP1Property = Specificities bar chart for the {0} partition, [{1}] property...
17
info_specificitiesBarChartForTheP0Subcorpus                = Specificities bar chart for the {0} subcorpus...
18
info_specificitiesOfTheP0Corpus                            = Specificities of the {0} corpus...
17 19
info_specificitiesOfTheP0LexcialTable                      = Specificities of the {0} lexical table...
18 20
info_specificitiesOfTheP0PartitionCommaP1Property          = Specificities of the {0} partition, [{1}] property...
19 21

  
tmp/org.txm.specificities.core/src/org/txm/specificities/core/messages/SpecificitiesCoreMessages.java (revision 2523)
26 26
	
27 27
	public static String info_specificitiesOfTheP0LexcialTable;
28 28
	
29
	public static String info_specificitiesOfTheP0Corpus;
29 30
	
31
	
30 32
	public static String info_specificitiesBarChartForTheP0PartitionCommaP1Property;
31 33
	
32 34
	public static String info_specificitiesBarChartForTheP0LexcialTable;
33 35
	
36
	public static String info_specificitiesBarChartForTheP0Subcorpus;
34 37
	
38
	
35 39
	public static String part;
36 40
	
37 41
	public static String score;
tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java (revision 2523)
685 685
		if (this.parent.isVisible()) {
686 686
			return TXMCoreMessages.bind(SpecificitiesCoreMessages.info_specificitiesOfTheP0LexcialTable, this.getParent().getSimpleName());
687 687
		}
688
		// from partition
689 688
		else {
690
			return TXMCoreMessages.bind(SpecificitiesCoreMessages.info_specificitiesOfTheP0PartitionCommaP1Property, this.getParent().getParent().getSimpleName(), this.getParent().getProperty());
689
			
690
			// from partition
691
			if (this.getParent().getPartition() != null) {
692
				return TXMCoreMessages.bind(SpecificitiesCoreMessages.info_specificitiesOfTheP0PartitionCommaP1Property, this.getParent().getPartition().getSimpleName(), this.getParent()
693
						.getProperty());
694
			}
695
			// from subcorpus
696
			else {
697
				return TXMCoreMessages.bind(SpecificitiesCoreMessages.info_specificitiesOfTheP0Corpus, this.getParent().getParent().getSimpleName());
698
			}
691 699
		}
692 700
	}
693 701
	
tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitiesSelection.java (revision 2523)
12 12
import org.txm.core.messages.TXMCoreMessages;
13 13
import org.txm.core.results.Parameter;
14 14
import org.txm.core.results.TXMParameters;
15
import org.txm.searchengine.cqp.corpus.Partition;
15
import org.txm.lexicaltable.core.functions.LexicalTable;
16 16
import org.txm.specificities.core.messages.SpecificitiesCoreMessages;
17 17
import org.txm.specificities.core.preferences.SpecificitiesPreferences;
18 18
import org.txm.statsengine.core.StatException;
......
218 218
		if (this.parent.getParent().isVisible()) {
219 219
			return TXMCoreMessages.bind(SpecificitiesCoreMessages.info_specificitiesBarChartForTheP0LexcialTable, this.parent.getParent().getSimpleName());
220 220
		}
221
		// from partition
222 221
		else {
223
			return TXMCoreMessages.bind(SpecificitiesCoreMessages.info_specificitiesBarChartForTheP0PartitionCommaP1Property,
224
					this.getParent().getParent().getPartition().getSimpleName(), this.getParent().getParent().getProperty());
222
			
223
			// from partition
224
			if (((LexicalTable) this.parent.getParent()).getPartition() != null) {
225
				return TXMCoreMessages.bind(SpecificitiesCoreMessages.info_specificitiesBarChartForTheP0PartitionCommaP1Property, ((LexicalTable) this.parent.getParent()).getPartition()
226
						.getSimpleName(), ((LexicalTable) this.parent.getParent())
227
								.getProperty());
228
			}
229
			// from subcorpus
230
			else {
231
				return TXMCoreMessages.bind(SpecificitiesCoreMessages.info_specificitiesBarChartForTheP0Subcorpus, this.parent.getParent().getParent().getSimpleName());
232
			}
225 233
		}
226 234
	}
227 235
	

Also available in: Unified diff