Revision 604

tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java (revision 604)
96 96
	protected List<String> partnames = new ArrayList<String>();
97 97
	
98 98
	/** The fmax filter value parameter. */
99
	@Parameter
100
	protected Integer pFmaxFilter = null;
99
	@Parameter(key=IndexPreferences.FMAX_FILTER)
100
	protected Integer pFmaxFilter;
101 101
	/** The fmin filter value parameter. */
102
	@Parameter
103
	protected Integer pFminFilter = null;
102
	@Parameter(key=IndexPreferences.FMIN_FILTER)
103
	protected Integer pFminFilter;
104 104
	/**	The number of lines shown per page parameter */
105
	@Parameter
106
	private Integer pNLinesPerPage = null;
105
	@Parameter(key=IndexPreferences.NLINESPERPAGE)
106
	private Integer pNLinesPerPage;
107 107
	/** The word properties shown. */
108 108
	@Parameter
109 109
	protected List<Property> pProperties;
110 110
	/** The string used to separated property values. */
111
	@Parameter
112
	protected String pPropertiesSeparator = "_"; // the separator of properties values //$NON-NLS-1$
111
	@Parameter(key=IndexPreferences.PROPERTIES_SEPARATOR)
112
	protected String pPropertiesSeparator; // the separator of properties values //$NON-NLS-1$
113 113
	/** The CQP query. */
114 114
	@Parameter
115 115
	protected Query pQuery;
116 116
	/** The line index of the current index page. */
117
	@Parameter
117
	@Parameter(key=IndexPreferences.NTOPINDEX)
118 118
	private Integer pTopIndex;
119 119
	/** The vmax filter value parameter. */
120
	@Parameter
121
	protected Integer pVmaxFilter = null;
120
	@Parameter(key=IndexPreferences.VMAX_FILTER)
121
	protected Integer pVmaxFilter;
122 122
	
123 123
	/** The writer. */
124 124
	private BufferedWriter writer;
......
321 321
	
322 322
	@Override
323 323
	public boolean loadParameters() {
324

  
325 324
//		this.pFmaxFilter = this.getIntParameterValue(IndexPreferences.FMAX_FILTER);
326 325
//		
327 326
//		this.pFminFilter = this.getIntParameterValue(IndexPreferences.FMIN_FILTER);
tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java (revision 604)
428 428
		return getInt(key, commandParameters, result, result.getPreferencesNodeQualifier());
429 429
	}
430 430

  
431

  
432

  
433 431
	/**
434 432
	 * Looks for the value of the specified <code>key</code> in preference nodes.
435 433
	 * Returns the value of the local result node if exists.
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 604)
621 621
				if (f.getType().isAssignableFrom(String.class)) {
622 622
					value = this.getStringParameterValue(key);
623 623
				}
624
				else if (f.getType().isAssignableFrom(int.class) || f.getType().isAssignableFrom(Integer.class)) {
625
					value = this.getIntParameterValue(key);
626
				}
627 624
				else if (f.getType().isAssignableFrom(double.class) || f.getType().isAssignableFrom(Double.class)) {
628 625
					value = this.getDoubleParameterValue(key);
629 626
				}
630 627
				else if (f.getType().isAssignableFrom(float.class) || f.getType().isAssignableFrom(Float.class)) {
631 628
					value = this.getFloatParameterValue(key);
632 629
				}
630
				else if (f.getType().isAssignableFrom(int.class) || f.getType().isAssignableFrom(Integer.class)) {
631
					value = this.getIntParameterValue(key);
632
				}
633 633
				else if (f.getType().isAssignableFrom(boolean.class) || f.getType().isAssignableFrom(Boolean.class)) {
634 634
					value = this.getBooleanParameterValue(key);
635 635
				}
tmp/org.txm.internalview.core/src/org/txm/functions/internal/InternalView.java (revision 604)
34 34
	protected List<Match> matches = new ArrayList<Match>();
35 35
	protected int nmatches = 0;
36 36

  
37
	@Parameter(key=InternalViewPreferences.CURRENTPAGE)
38
	protected Integer pCurrentPage;
37 39
	@Parameter
38
	protected Integer pCurrentPage = -1;
39
	@Parameter
40 40
	protected List<Property> pProperties;
41 41
	@Parameter
42 42
	protected List<StructuralUnitProperty> pStructProperties;
......
286 286
	@Override
287 287
	public boolean loadParameters() throws Exception {
288 288

  
289
		this.pCurrentPage = this.getIntParameterValue(InternalViewPreferences.CURRENTPAGE);
289
//		this.pCurrentPage = this.getIntParameterValue(InternalViewPreferences.CURRENTPAGE);
290 290
		
291 291
		String s = this.getStringParameterValue(InternalViewPreferences.STRUCTURALUNIT);
292 292
		if (s != null && s.length() > 0)
tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java (revision 604)
161 161
	/** The P. */
162 162
	int P = -1;
163 163

  
164
	@Parameter
165
	String pCooccurentQueryFilter = "[]"; //$NON-NLS-1$
164
	@Parameter(key=CooccurrencePreferences.COOCQUERYFILTER)
165
	protected String pCooccurentQueryFilter = "[]"; //$NON-NLS-1$
166 166
	/** The mincof. */
167
	@Parameter
168
	private int pFCoocFilter;
167
	@Parameter(key=CooccurrencePreferences.MIN_COUNT)
168
	protected Integer pFCoocFilter;
169 169
	/** The minf. */
170
	@Parameter
171
	private int pFminFilter;
170
	@Parameter(key=CooccurrencePreferences.MIN_FREQ)
171
	protected Integer pFminFilter;
172 172
	/** The include xpivot. */
173
	@Parameter
174
	private boolean pIncludeXpivot;
173
	@Parameter(key=CooccurrencePreferences.INCLUDE_X_PIVOT)
174
	protected Boolean pIncludeXpivot;
175 175
	/** The maxleft. */
176
	@Parameter
177
	int pMaxLeftContextSize;
176
	@Parameter(key=CooccurrencePreferences.MAX_LEFT)
177
	protected Integer pMaxLeftContextSize;
178 178
	/** The maxright. */
179
	@Parameter
180
	int pMaxRightContextSize;
179
	@Parameter(key=CooccurrencePreferences.MAX_RIGHT)
180
	protected Integer pMaxRightContextSize;
181 181
	/** The minleft. */
182
	@Parameter
183
	int pMinLeftContextSize = 1;
182
	@Parameter(key=CooccurrencePreferences.MIN_LEFT)
183
	protected Integer pMinLeftContextSize;
184 184
	/** The minright. */
185
	@Parameter
186
	int pMinRightContextSize = 1;
185
	@Parameter(key=CooccurrencePreferences.MIN_RIGHT)
186
	protected Integer pMinRightContextSize;
187 187
	/** The cooccurents properties to show. */
188 188
	@Parameter
189
	List<Property> pProperties;
189
	protected List<Property> pProperties;
190 190
	/** The keyword query. */
191 191
	@Parameter
192
	Query pQuery;
192
	protected Query pQuery;
193 193
	/** The minscore. */
194
	@Parameter
195
	private double pScoreMinFilter;
194
	@Parameter(key=CooccurrencePreferences.MIN_SCORE)
195
	protected Double pScoreMinFilter;
196 196
	/** The structural unit context limit. */
197 197
	@Parameter
198
	StructuralUnit pStructuralUnitLimit;
198
	protected StructuralUnit pStructuralUnitLimit;
199 199

  
200 200
	/** The reference corpus to use = the R symbol that point to a matrix WordxFreqs. */
201 201
	String referenceCorpus;
tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java (revision 604)
101 101
	@Parameter
102 102
	protected List<Property> pAnalysisRightProperties;
103 103
	/** used to limit context to the matches of the CQL limit query	 */
104
	@Parameter
104
	@Parameter(key=ConcordancePreferences.LIMITCQL)
105 105
	protected String pLimitCQL;
106 106
	/** The left context size. */
107
	@Parameter
107
	@Parameter(key=ConcordancePreferences.LEFT_CONTEXT_SIZE)
108 108
	protected Integer pLeftContextSize;
109 109
	/** The query. */
110 110
	@Parameter
111 111
	protected Query pQuery;
112 112
	/** The right context size. */
113
	@Parameter
113
	@Parameter(key=ConcordancePreferences.RIGHT_CONTEXT_SIZE)
114 114
	protected Integer pRightContextSize;
115 115
	/**	 The top line index shown and the number of lines to show per page */
116
	@Parameter
117
	protected Integer pTopIndex, pNLinesPerPage;
116
	@Parameter(key=ConcordancePreferences.TOP_INDEX)
117
	protected Integer pTopIndex;
118
	@Parameter(key=ConcordancePreferences.N_LINE_PER_PAGE)
119
	protected Integer pNLinesPerPage;
118 120
	/** The keyword view properties. */
119 121
	@Parameter
120 122
	protected List<Property> pViewKeywordProperties;
......
1585 1587
	@Override
1586 1588
	public boolean loadParameters() {
1587 1589

  
1588

  
1589 1590
		try {
1590
			this.pTopIndex = this.getIntParameterValue(ConcordancePreferences.TOP_INDEX);
1591
			this.pNLinesPerPage = this.getIntParameterValue(ConcordancePreferences.N_LINE_PER_PAGE);
1591
//			this.pTopIndex = this.getIntParameterValue(ConcordancePreferences.TOP_INDEX);
1592
//			this.pNLinesPerPage = this.getIntParameterValue(ConcordancePreferences.N_LINE_PER_PAGE);
1593
//
1594
//			this.pLeftContextSize = this.getIntParameterValue(ConcordancePreferences.LEFT_CONTEXT_SIZE);
1595
//			this.pRightContextSize = this.getIntParameterValue(ConcordancePreferences.RIGHT_CONTEXT_SIZE);
1596
//
1597
//			this.pLimitCQL = this.getStringParameterValue(ConcordancePreferences.LIMITCQL);
1592 1598

  
1593
			this.pLeftContextSize = this.getIntParameterValue(ConcordancePreferences.LEFT_CONTEXT_SIZE);
1594
			this.pRightContextSize = this.getIntParameterValue(ConcordancePreferences.RIGHT_CONTEXT_SIZE);
1595

  
1596
			this.pLimitCQL = this.getStringParameterValue(ConcordancePreferences.LIMITCQL);
1597

  
1598 1599
			String propertyNames = this.getStringParameterValue(ConcordancePreferences.KEYWORD_VIEW_PROPERTIES);
1599 1600
			this.pViewKeywordProperties = WordProperty.fromStringToList(getCorpus(), propertyNames);
1600 1601
			this.availableKeywordViewProperties = new ArrayList<Property>(getCorpus().getOrderedProperties());
tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/diagnostic/Diagnostic.java (revision 604)
76 76
	Partition partition;
77 77
	
78 78
	/** The maxvalue. */
79
	@Parameter
80
	Integer pMaxValue = 20;
79
	@Parameter(key=CQPPreferences.MAXVALUE)
80
	Integer pMaxValue;
81 81
	
82 82
	// Numbers
83 83
	/** The T. */
......
670 670

  
671 671
	@Override
672 672
	public boolean loadParameters() {
673
		pMaxValue = this.getIntParameterValue(CQPPreferences.MAXVALUE);
673
//		pMaxValue = this.getIntParameterValue(CQPPreferences.MAXVALUE);
674 674
		return true;
675 675
	}
676 676
	
tmp/org.txm.referencer.core/src/org/txm/functions/referencer/Referencer.java (revision 604)
104 104
	int nlines;
105 105

  
106 106
	/** The hierarchic sort. */
107
	@Parameter
107
	@Parameter(key=ReferencerPreferences.SORTBYFREQ)
108 108
	private boolean pHierarchicSort;
109

  
110
	/** The pattern. */
111 109
	@Parameter
112 110
	List<StructuralUnitProperty> pPattern;
113

  
114 111
	/** The prop. */
115 112
	@Parameter
116 113
	Property pProperty;
......
551 548
		s = this.getStringParameterValue(ReferencerPreferences.PROPERTY);
552 549
		this.pProperty = getCorpus().getProperty(s);
553 550
		
554
		this.pHierarchicSort = this.getBooleanParameterValue(ReferencerPreferences.SORTBYFREQ);
551
//		this.pHierarchicSort = this.getBooleanParameterValue(ReferencerPreferences.SORTBYFREQ);
555 552
		return true;
556 553
	}
557 554

  
tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java (revision 604)
612 612

  
613 613
	@Override
614 614
	public boolean loadParameters() {
615
		// TODO Auto-generated method stub
616
		System.err.println("Specificities.loadParameters(): not yet implemented.");
615
		// nothing to do
617 616
		return true;
618 617
	}
619 618

  
tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/preferences/LexicalTablePreferencePage.java (revision 604)
47 47
	@Override
48 48
	public void createFieldEditors() {
49 49
		
50
		IntegerFieldEditor fmin = new IntegerFieldEditor(LexicalTablePreferences.F_MIN, LexicalTableUIMessages.LexicalTablePreferencePage_1, this.getFieldEditorParent()); 
50
		IntegerFieldEditor fmin = new IntegerFieldEditor(LexicalTablePreferences.F_MIN_FILTER, LexicalTableUIMessages.LexicalTablePreferencePage_1, this.getFieldEditorParent()); 
51 51
		fmin.setValidRange(1, 999999999);
52 52
		
53
		IntegerFieldEditor vmax = new IntegerFieldEditor(LexicalTablePreferences.V_MAX, "vmax", this.getFieldEditorParent()); 
53
		IntegerFieldEditor vmax = new IntegerFieldEditor(LexicalTablePreferences.V_MAX_FILTER, "vmax", this.getFieldEditorParent()); 
54 54
		vmax.setValidRange(1, 999999999);
55 55
		
56 56
		this.addField(fmin);
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/preferences/LexicalTablePreferences.java (revision 604)
24 24
	/**
25 25
	 * The minimal occurrence frequency to show in the table.
26 26
	 */
27
	public static final String F_MIN = PREFERENCES_PREFIX + "f_min"; //$NON-NLS-1$
27
	public static final String F_MIN_FILTER = PREFERENCES_PREFIX + "f_min"; //$NON-NLS-1$
28 28
	
29 29
	/**
30 30
	 * The maximum number of lines to show in the table
31 31
	 */
32
	public static final String V_MAX = PREFERENCES_PREFIX + "v_max"; //$NON-NLS-1$
32
	public static final String V_MAX_FILTER = PREFERENCES_PREFIX + "v_max"; //$NON-NLS-1$
33 33
	
34 34
	/**
35 35
	 * The property to count
......
44 44
	@Override
45 45
	public void initializeDefaultPreferences() {
46 46
		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
47
		preferences.putInt(F_MIN, 2);
48
		preferences.putInt(V_MAX, 200);
47
		preferences.putInt(F_MIN_FILTER, 2);
48
		preferences.putInt(V_MAX_FILTER, 200);
49 49
		preferences.put(PROPERTY, "word"); //$NON-NLS-1$
50 50
		preferences.putBoolean(USE_ALL_OCCURRENCES, true);
51 51
	}
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 604)
50 50
	 */
51 51
	@Parameter(key=LexicalTablePreferences.PROPERTY)
52 52
	private Property pProperty;
53

  
54 53
	/**
55 54
	 * Minimum frequency.
56 55
	 */
57
	@Parameter(key=LexicalTablePreferences.F_MIN)
58
	private Integer pfMinFilter;
56
	@Parameter(key=LexicalTablePreferences.F_MIN_FILTER)
57
	private Integer pFMinFilter;
59 58

  
60 59
	/**
61 60
	 * Maximum number of lines.
62 61
	 */
63
	@Parameter(key=LexicalTablePreferences.V_MAX)
62
	@Parameter(key=LexicalTablePreferences.V_MAX_FILTER)
64 63
	private Integer pVMaxFilter;
65

  
64
	/**
65
	 * if true and if built with an Index, a ##REST## lien is added containing the frequencies of the other "words"
66
	 */
66 67
	@Parameter(key=LexicalTablePreferences.USE_ALL_OCCURRENCES)
67 68
	protected Boolean pUseAllOccurrences;
68

  
69 69
	
70
	
71 70
	/**
72 71
	 * 
73 72
	 * @param corpus
......
200 199
		ArrayList<String> filteredForms = new ArrayList<String>();
201 200
		//create a copy and filter line with Fmin;
202 201
		for (int i = 0 ; i < ll.getFreq().length ; i++) {
203
			if (ll.getFreq()[i] >= this.pfMinFilter) {
202
			if (ll.getFreq()[i] >= this.pFMinFilter) {
204 203
				filteredForms.add(ll.getForms()[i]);
205 204
			}
206 205
		}
......
376 375
	@Override
377 376
	public boolean setParameters(TXMParameters parameters) throws CqiClientException {
378 377
		
379
		if (parameters.containsKey(LexicalTablePreferences.F_MIN)) {
380
			this.pfMinFilter = parameters.getInteger(LexicalTablePreferences.F_MIN);
378
		if (parameters.containsKey(LexicalTablePreferences.F_MIN_FILTER)) {
379
			this.pFMinFilter = parameters.getInteger(LexicalTablePreferences.F_MIN_FILTER);
381 380
		}
382 381
		if (parameters.containsKey(LexicalTablePreferences.PROPERTY)) {
383 382
			String s = parameters.get(LexicalTablePreferences.PROPERTY).toString();
......
388 387
			this.pUseAllOccurrences = parameters.getBoolean(LexicalTablePreferences.USE_ALL_OCCURRENCES);
389 388
		}
390 389
		
391
		if (parameters.containsKey(LexicalTablePreferences.V_MAX)) {
392
			this.pVMaxFilter = parameters.getInteger(LexicalTablePreferences.V_MAX);
390
		if (parameters.containsKey(LexicalTablePreferences.V_MAX_FILTER)) {
391
			this.pVMaxFilter = parameters.getInteger(LexicalTablePreferences.V_MAX_FILTER);
393 392
		}
394 393
		
395 394
		return true;
......
582 581
			this.pProperty = prop;
583 582
		}
584 583
		if (fmin != null) {
585
			this.pfMinFilter = fmin;
584
			this.pFMinFilter = fmin;
586 585
		}
587 586
		if (vmax != null) {
588 587
			this.pVMaxFilter = vmax;

Also available in: Unified diff