Révision 3794
TXM/trunk/bundles/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrast.java (revision 3794) | ||
---|---|---|
255 | 255 |
} |
256 | 256 |
|
257 | 257 |
@Override |
258 |
public boolean setParameters(TXMParameters parameters) { |
|
259 |
// TODO Auto-generated method stub |
|
260 |
System.err.println("Contrast.setParameters(): not yet implemented."); |
|
261 |
return true; |
|
262 |
} |
|
263 |
|
|
264 |
@Override |
|
265 | 258 |
public boolean saveParameters() { |
266 | 259 |
// TODO Auto-generated method stub |
267 | 260 |
System.err.println("Contrast.saveParameters(): not yet implemented."); |
TXM/trunk/bundles/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java (revision 3794) | ||
---|---|---|
735 | 735 |
this.maxScore = maxScore; |
736 | 736 |
} |
737 | 737 |
|
738 |
@Override |
|
739 |
public boolean setParameters(TXMParameters parameters) { |
|
740 |
// TODO Auto-generated method stub |
|
741 |
System.err.println("Specificities.setParameters(): not yet implemented."); |
|
742 |
return true; |
|
743 |
} |
|
744 |
|
|
745 | 738 |
/** |
746 | 739 |
* @return the maxScore |
747 | 740 |
*/ |
TXM/trunk/bundles/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitiesSelection.java (revision 3794) | ||
---|---|---|
289 | 289 |
this.groupByLines = groupByLines; |
290 | 290 |
} |
291 | 291 |
|
292 |
@Override |
|
293 |
public boolean setParameters(TXMParameters parameters) { |
|
294 |
// TODO Auto-generated method stub |
|
295 |
System.err.println("SpecificitiesSelection.setParameters(): not yet implemented."); |
|
296 |
return true; |
|
297 |
} |
|
298 |
|
|
299 | 292 |
/** |
300 | 293 |
* @param selectedTypeNames the selectedTypeNames to set |
301 | 294 |
*/ |
TXM/trunk/bundles/org.txm.progression.core/src/org/txm/progression/core/functions/Progression.java (revision 3794) | ||
---|---|---|
255 | 255 |
return true; |
256 | 256 |
} |
257 | 257 |
|
258 |
@Override |
|
259 |
public boolean setParameters(TXMParameters parameters) { |
|
260 |
// TODO Auto-generated method stub |
|
261 |
System.err.println("Progression.setParameters(): not yet implemented."); //$NON-NLS-1$ |
|
262 |
return true; |
|
263 |
} |
|
264 |
|
|
265 |
|
|
266 |
|
|
267 | 258 |
/** |
268 | 259 |
* Sets the structural unit. |
269 | 260 |
* |
TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java (revision 3794) | ||
---|---|---|
636 | 636 |
} |
637 | 637 |
|
638 | 638 |
@Override |
639 |
public boolean setParameters(TXMParameters parameters) { |
|
640 |
this.setUserName(parameters.getString(TXMPreferences.USER_NAME)); |
|
641 |
String tmp = parameters.getString(CQPPreferences.PART_NAMES); |
|
642 |
if (tmp != null) { |
|
643 |
this.pPartNames = Arrays.asList(tmp.split("\t")); |
|
644 |
} |
|
645 |
else { |
|
646 |
this.pPartNames = null; |
|
647 |
} |
|
648 |
|
|
649 |
try { |
|
650 |
this.pProperty = StructuralUnitProperty.stringToStructuralUnitProperty(getParent(), parameters.getString(TXMPreferences.STRUCTURAL_UNIT_PROPERTY)); |
|
651 |
} |
|
652 |
catch (CqiClientException e) { |
|
653 |
// TODO Auto-generated catch block |
|
654 |
e.printStackTrace(); |
|
655 |
this.pProperty = null; |
|
656 |
} |
|
657 |
|
|
658 |
tmp = parameters.getString(CQPPreferences.QUERIES); |
|
659 |
if (tmp != null) { |
|
660 |
this.pQueries = Arrays.asList(tmp.split("\t")); |
|
661 |
} |
|
662 |
else { |
|
663 |
this.pQueries = null; |
|
664 |
} |
|
665 |
|
|
666 |
tmp = parameters.getString(CQPPreferences.VALUES); |
|
667 |
if (tmp != null) { |
|
668 |
this.pValues = Arrays.asList(tmp.split("\t")); |
|
669 |
} |
|
670 |
else { |
|
671 |
this.pValues = null; |
|
672 |
} |
|
673 |
return true; |
|
674 |
} |
|
675 |
|
|
676 |
@Override |
|
677 | 639 |
public boolean loadParameters() { |
678 | 640 |
String tmp = null; |
679 | 641 |
try { |
TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java (revision 3794) | ||
---|---|---|
592 | 592 |
this.setUserName(name); |
593 | 593 |
} |
594 | 594 |
|
595 |
@Override |
|
596 |
public boolean setParameters(TXMParameters parameters) throws Exception { |
|
597 |
return true; |
|
598 |
} |
|
599 |
|
|
600 | 595 |
/* |
601 | 596 |
* (non-Javadoc) |
602 | 597 |
* @see java.lang.Object#toString() |
TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Subcorpus.java (revision 3794) | ||
---|---|---|
558 | 558 |
|
559 | 559 |
this.setDirty(); |
560 | 560 |
} |
561 |
|
|
562 |
@Override |
|
563 |
public boolean setParameters(TXMParameters parameters) { |
|
564 |
// TODO Auto-generated method stub |
|
565 |
System.err.println("Subcorpus.setParameters(): not yet implemented."); |
|
566 |
return true; |
|
567 |
} |
|
568 |
|
|
561 |
|
|
569 | 562 |
/** |
570 | 563 |
* Sets the query to use. |
571 | 564 |
* |
TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/core/functions/summary/Summary.java (revision 3794) | ||
---|---|---|
42 | 42 |
} |
43 | 43 |
|
44 | 44 |
@Override |
45 |
public boolean setParameters(TXMParameters parameters) { |
|
46 |
System.err.println("Summary.setParameters(): not yet implemented."); |
|
47 |
return true; |
|
48 |
} |
|
49 |
|
|
50 |
@Override |
|
51 | 45 |
public boolean loadParameters() { |
52 | 46 |
System.err.println("Summary.loadParameters(): not yet implemented."); |
53 | 47 |
return true; |
TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/core/functions/preview/Preview.java (revision 3794) | ||
---|---|---|
92 | 92 |
} |
93 | 93 |
|
94 | 94 |
@Override |
95 |
public boolean setParameters(TXMParameters parameters) { |
|
96 |
// TODO Auto-generated method stub |
|
97 |
System.err.println("Preview.setParameters(): not yet implemented."); |
|
98 |
return true; |
|
99 |
} |
|
100 |
|
|
101 |
@Override |
|
102 | 95 |
public boolean loadParameters() { |
103 | 96 |
// TODO Auto-generated method stub |
104 | 97 |
System.err.println("Preview.loadParameters(): not yet implemented."); |
TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/core/functions/selection/Selection.java (revision 3794) | ||
---|---|---|
494 | 494 |
public boolean canCompute() { |
495 | 495 |
return this.corpus != null; |
496 | 496 |
} |
497 |
|
|
497 |
|
|
498 | 498 |
@Override |
499 |
public boolean setParameters(TXMParameters parameters) { |
|
500 |
// TODO Auto-generated method stub |
|
501 |
System.err.println("Selection.setParameters(): not yet implemented."); |
|
502 |
return true; |
|
503 |
} |
|
504 |
|
|
505 |
@Override |
|
506 | 499 |
public boolean loadParameters() { |
507 | 500 |
// TODO Auto-generated method stub |
508 | 501 |
System.err.println("Selection.loadParameters(): not yet implemented."); |
TXM/trunk/bundles/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java (revision 3794) | ||
---|---|---|
1030 | 1030 |
} |
1031 | 1031 |
|
1032 | 1032 |
@Override |
1033 |
public boolean setParameters(TXMParameters parameters) { |
|
1034 |
|
|
1035 |
// TODO Auto-generated method stub |
|
1036 |
System.err.println("CA.setParameters(): not yet implemented."); |
|
1037 |
return true; |
|
1038 |
} |
|
1039 |
|
|
1040 |
@Override |
|
1041 | 1033 |
public boolean loadParameters() { |
1042 | 1034 |
|
1043 | 1035 |
// nothing to do |
TXM/trunk/bundles/org.txm.ca.core/src/org/txm/ca/core/functions/Eigenvalues.java (revision 3794) | ||
---|---|---|
98 | 98 |
} |
99 | 99 |
|
100 | 100 |
@Override |
101 |
public boolean setParameters(TXMParameters parameters) { |
|
102 |
// TODO Auto-generated method stub |
|
103 |
System.err.println("Eigenvalues.setParameters(): not yet implemented."); |
|
104 |
return true; |
|
105 |
} |
|
106 |
|
|
107 |
@Override |
|
108 | 101 |
public boolean loadParameters() { |
109 | 102 |
// nothing to do |
110 | 103 |
return true; |
TXM/trunk/bundles/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 3794) | ||
---|---|---|
397 | 397 |
return true; |
398 | 398 |
} |
399 | 399 |
|
400 |
@Override |
|
401 |
public boolean setParameters(TXMParameters parameters) throws CqiClientException { |
|
402 |
|
|
403 |
if (parameters.containsKey(LexicalTablePreferences.F_MIN)) { |
|
404 |
this.fMinFilter = parameters.getInteger(LexicalTablePreferences.F_MIN); |
|
405 |
} |
|
406 |
if (parameters.containsKey(LexicalTablePreferences.F_MAX)) { |
|
407 |
this.fMaxFilter = parameters.getInteger(LexicalTablePreferences.F_MAX); |
|
408 |
} |
|
409 |
if (parameters.containsKey(LexicalTablePreferences.UNIT_PROPERTY)) { |
|
410 |
String s = parameters.get(LexicalTablePreferences.UNIT_PROPERTY).toString(); |
|
411 |
this.property = getCorpus().getProperty(s); |
|
412 |
} |
|
413 |
|
|
414 |
if (parameters.containsKey(LexicalTablePreferences.USE_ALL_OCCURRENCES)) { |
|
415 |
this.useAllOccurrences = parameters.getBoolean(LexicalTablePreferences.USE_ALL_OCCURRENCES); |
|
416 |
} |
|
417 |
|
|
418 |
if (parameters.containsKey(LexicalTablePreferences.V_MAX)) { |
|
419 |
this.vMaxFilter = parameters.getInteger(LexicalTablePreferences.V_MAX); |
|
420 |
} |
|
421 |
|
|
422 |
return true; |
|
423 |
} |
|
424 |
|
|
425 | 400 |
/** |
426 | 401 |
* |
427 | 402 |
* @return |
TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/core/functions/QueryIndex.java (revision 3794) | ||
---|---|---|
472 | 472 |
} |
473 | 473 |
|
474 | 474 |
@Override |
475 |
public boolean setParameters(TXMParameters parameters) throws Exception { |
|
476 |
// FIXME: not yet implemented |
|
477 |
System.err.println("QueryIndex.setParameters(): not yet implemented."); |
|
478 |
return false; |
|
479 |
} |
|
480 |
|
|
481 |
|
|
482 |
@Override |
|
483 | 475 |
public String getResultType() { |
484 | 476 |
return "Query index"; |
485 | 477 |
} |
TXM/trunk/bundles/org.txm.searchengine.core/src/org/txm/searchengine/core/QueryHistory.java (revision 3794) | ||
---|---|---|
48 | 48 |
|
49 | 49 |
return true; |
50 | 50 |
} |
51 |
|
|
52 |
@Override |
|
53 |
public boolean setParameters(TXMParameters parameters) throws Exception { |
|
54 |
|
|
55 |
return true; |
|
56 |
} |
|
57 | 51 |
|
58 | 52 |
public String getComputingDoneMessage() { |
59 | 53 |
return ""; |
TXM/trunk/bundles/org.txm.conllu.core/src/org/txm/conllu/core/function/UDTreeSearch.java (revision 3794) | ||
---|---|---|
291 | 291 |
} |
292 | 292 |
|
293 | 293 |
@Override |
294 |
public boolean setParameters(TXMParameters parameters) { |
|
295 |
if (parameters.getString("query") != null) { |
|
296 |
this.pQuery = new CQLQuery(parameters.getString("query")); |
|
297 |
} |
|
298 |
return true; |
|
299 |
} |
|
300 |
|
|
301 |
@Override |
|
302 | 294 |
public boolean _loadParameters() throws Exception { |
303 | 295 |
return true; |
304 | 296 |
} |
TXM/trunk/bundles/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java (revision 3794) | ||
---|---|---|
13 | 13 |
import org.txm.chartsengine.core.results.ChartResult; |
14 | 14 |
import org.txm.core.messages.TXMCoreMessages; |
15 | 15 |
import org.txm.core.results.Parameter; |
16 |
import org.txm.core.results.TXMParameters; |
|
17 | 16 |
import org.txm.partition.core.messages.PartitionCoreMessages; |
18 | 17 |
import org.txm.partition.core.preferences.PartitionDimensionsPreferences; |
19 | 18 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
... | ... | |
22 | 21 |
import org.txm.searchengine.cqp.corpus.Partition; |
23 | 22 |
import org.txm.utils.TXMProgressMonitor; |
24 | 23 |
import org.txm.utils.io.IOUtils; |
25 |
import org.txm.utils.logger.Log; |
|
26 | 24 |
|
27 | 25 |
/** |
28 | 26 |
* Partition dimensions. |
... | ... | |
48 | 46 |
* To display or not the parts count in chart title. |
49 | 47 |
*/ |
50 | 48 |
@Parameter(key = PartitionDimensionsPreferences.CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE, type = Parameter.RENDERING) |
51 |
protected boolean displayPartsCountInTitle;
|
|
49 |
protected boolean pDisplayPartsCountInTitle;
|
|
52 | 50 |
|
53 | 51 |
/** |
54 | 52 |
* To sort or not the parts by size. |
55 | 53 |
*/ |
56 | 54 |
@Parameter(key = PartitionDimensionsPreferences.CHART_DIMENSIONS_SORT_BY_SIZE, type = Parameter.RENDERING) |
57 |
protected boolean sortBySize;
|
|
55 |
protected boolean pSortBySize;
|
|
58 | 56 |
|
59 | 57 |
|
60 | 58 |
|
... | ... | |
153 | 151 |
return this.getPartition() != null; |
154 | 152 |
} |
155 | 153 |
|
156 |
@Override |
|
157 |
public boolean setParameters(TXMParameters parameters) { |
|
158 |
try { |
|
159 |
this.setSortBySize((boolean) parameters.get(PartitionDimensionsPreferences.CHART_DIMENSIONS_SORT_BY_SIZE)); |
|
160 |
return true; |
|
161 |
} |
|
162 |
catch (Exception e) { |
|
163 |
// TODO Auto-generated catch block |
|
164 |
e.printStackTrace(); |
|
165 |
} |
|
166 |
return false; |
|
167 |
} |
|
154 |
// @Override |
|
155 |
// public boolean setParameters(TXMParameters parameters) { |
|
156 |
// try { |
|
157 |
// this.setSortBySize((boolean) parameters.get(PartitionDimensionsPreferences.CHART_DIMENSIONS_SORT_BY_SIZE)); |
|
158 |
// return true; |
|
159 |
// } |
|
160 |
// catch (Exception e) { |
|
161 |
// // TODO Auto-generated catch block |
|
162 |
// e.printStackTrace(); |
|
163 |
// } |
|
164 |
// return false; |
|
165 |
// } |
|
166 |
// |
|
168 | 167 |
|
169 | 168 |
|
170 |
|
|
171 | 169 |
/** |
172 | 170 |
* Convenience method. |
173 | 171 |
*/ |
... | ... | |
274 | 272 |
* @return the sortBySize |
275 | 273 |
*/ |
276 | 274 |
public boolean isSortingBySize() { |
277 |
return sortBySize;
|
|
275 |
return pSortBySize;
|
|
278 | 276 |
} |
279 | 277 |
|
280 | 278 |
|
... | ... | |
283 | 281 |
* @param sortBySize the sortBySize to set |
284 | 282 |
*/ |
285 | 283 |
public void setSortBySize(boolean sortBySize) { |
286 |
this.sortBySize = sortBySize;
|
|
284 |
this.pSortBySize = sortBySize;
|
|
287 | 285 |
} |
288 | 286 |
|
289 | 287 |
|
... | ... | |
292 | 290 |
* @return the displayPartCountInTitle |
293 | 291 |
*/ |
294 | 292 |
public boolean isDisplayingPartCountInTitle() { |
295 |
return displayPartsCountInTitle;
|
|
293 |
return pDisplayPartsCountInTitle;
|
|
296 | 294 |
} |
297 | 295 |
|
298 | 296 |
@Override |
TXM/trunk/bundles/org.txm.partition.core/src/org/txm/partition/core/chartsengine/base/Utils.java (revision 3794) | ||
---|---|---|
15 | 15 |
/** |
16 | 16 |
* Creates a string title, shared by charts engine implementations, for the partition dimensions chart from the specified result. |
17 | 17 |
* |
18 |
* @param the partition result |
|
19 |
* @param sortPartsBySize the sort parts by size state |
|
20 |
* @param displayPartsCountInTitle display or not the parts count in chart title |
|
18 |
* @param partitionDimensions the dimension to display |
|
21 | 19 |
* @return the title string |
22 | 20 |
*/ |
23 | 21 |
public static String createPartitionDimensionsChartTitle(PartitionDimensions partitionDimensions) { |
TXM/trunk/bundles/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RStatsEngine.java (revision 3794) | ||
---|---|---|
179 | 179 |
String execName = RPreferences.getInstance().getString(RPreferences.PATH_TO_EXECUTABLE); |
180 | 180 |
File f = new File(execName); |
181 | 181 |
// only use taskkill if the process is running |
182 |
|
|
182 | 183 |
String cmd = "tasklist | find /i \""+f.getName()+"\" && taskkill /IM "+f.getName()+" /F"; //$NON-NLS-1$ |
183 | 184 |
//String cmd = "cmd /c FOR /F \"tokens=5 delims= \" %P IN ('netstat -ano ^| findstr :6330 ^| findstr LISTENING') DO taskkill /F /PID %P"; //$NON-NLS-1$ |
184 | 185 |
Log.finest("Executing command: " + cmd); |
TXM/trunk/bundles/org.txm.wordcloud.core/src/org/txm/wordcloud/core/functions/WordCloud.java (revision 3794) | ||
---|---|---|
254 | 254 |
public boolean canCompute() { |
255 | 255 |
return this.parent != null; |
256 | 256 |
} |
257 |
|
|
257 | 258 |
|
258 |
@Override |
|
259 |
public boolean setParameters(TXMParameters parameters) { |
|
260 |
|
|
261 |
if (parameters.containsKey(TXMPreferences.F_MIN)) { |
|
262 |
Object value = parameters.get(TXMPreferences.F_MIN); |
|
263 |
if (value instanceof String) { |
|
264 |
this.fMin = Integer.parseInt(value.toString()); |
|
265 |
} |
|
266 |
else if (value instanceof Integer) { |
|
267 |
this.fMin = (Integer) value; |
|
268 |
} |
|
269 |
} |
|
270 |
|
|
271 |
if (parameters.containsKey(TXMPreferences.V_MAX)) { |
|
272 |
Object value = parameters.get(TXMPreferences.V_MAX); |
|
273 |
if (value instanceof String) { |
|
274 |
this.maxWordsCount = Integer.parseInt(value.toString()); |
|
275 |
} |
|
276 |
else if (value instanceof Integer) { |
|
277 |
this.maxWordsCount = (Integer) value; |
|
278 |
} |
|
279 |
} |
|
280 |
|
|
281 |
return true; |
|
282 |
} |
|
283 |
|
|
284 | 259 |
/** |
285 | 260 |
* |
286 | 261 |
* @param lang |
TXM/trunk/bundles/org.txm.internalview.core/src/org/txm/internalview/core/functions/InternalView.java (revision 3794) | ||
---|---|---|
435 | 435 |
} |
436 | 436 |
|
437 | 437 |
@Override |
438 |
public boolean setParameters(TXMParameters parameters) { |
|
439 |
System.err.println("InternalView.setParameters(): not yet implemented."); |
|
440 |
return false; |
|
441 |
} |
|
442 |
|
|
443 |
|
|
444 |
@Override |
|
445 | 438 |
public boolean _toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception { |
446 | 439 |
PrintWriter writer = IOUtils.getWriter(outfile, encoding); |
447 | 440 |
for (int ipage = 0; ipage < nmatches; ipage++) { // run through all pages |
TXM/trunk/bundles/org.txm.textsbalance.core/src/org/txm/textsbalance/core/functions/TextsBalance.java (revision 3794) | ||
---|---|---|
365 | 365 |
return true; |
366 | 366 |
} |
367 | 367 |
|
368 |
@Override |
|
369 |
public boolean setParameters(TXMParameters parameters) { |
|
370 |
// TODO Auto-generated method stub |
|
371 |
System.err.println("TextsBalance.setParameters(): not yet implemented."); |
|
372 |
return true; |
|
373 |
} |
|
374 |
|
|
375 |
|
|
376 |
|
|
377 | 368 |
/** |
378 | 369 |
* @return the groupByTexts |
379 | 370 |
*/ |
TXM/trunk/bundles/org.txm.properties.core/src/org/txm/properties/core/functions/Properties.java (revision 3794) | ||
---|---|---|
341 | 341 |
} |
342 | 342 |
|
343 | 343 |
@Override |
344 |
public boolean setParameters(TXMParameters parameters) { |
|
345 |
this.pMaxPropertiesToDisplay = parameters.getInteger(PropertiesPreferences.MAX_PROPERTIES_TO_DISPLAY); |
|
346 |
return true; |
|
347 |
} |
|
348 |
|
|
349 |
@Override |
|
350 | 344 |
public boolean saveParameters() { |
351 | 345 |
// nothing to do -> all parameters are already managed by autoSaveParameters |
352 | 346 |
return true; |
TXM/trunk/bundles/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 3794) | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.io.BufferedReader; |
4 | 4 |
import java.io.File; |
5 |
import java.io.FileNotFoundException; |
|
5 | 6 |
import java.io.IOException; |
7 |
import java.io.StringBufferInputStream; |
|
8 |
import java.io.StringReader; |
|
9 |
import java.io.UnsupportedEncodingException; |
|
6 | 10 |
import java.lang.reflect.Constructor; |
7 | 11 |
import java.lang.reflect.Field; |
8 | 12 |
import java.lang.reflect.InvocationTargetException; |
... | ... | |
1316 | 1320 |
public abstract boolean loadParameters() throws Exception; |
1317 | 1321 |
|
1318 | 1322 |
/** |
1319 |
* Initializes the @Parameter class members objects |
|
1323 |
* Initializes the @Parameter class members objects using a map of key name + values
|
|
1320 | 1324 |
* |
1321 | 1325 |
* @param parameters |
1322 |
* @return |
|
1326 |
* @return true if all parameters have been set
|
|
1323 | 1327 |
*/ |
1324 |
public abstract boolean setParameters(TXMParameters parameters) throws Exception; |
|
1328 |
public final boolean setParameters(TXMParameters parameters) throws Exception { |
|
1329 |
|
|
1330 |
boolean r = true; |
|
1331 |
|
|
1332 |
for (String k : parameters.keySet()) { |
|
1333 |
r &= setParameter(k, parameters.get(k), false); |
|
1334 |
} |
|
1335 |
return r; |
|
1336 |
} |
|
1325 | 1337 |
|
1326 | 1338 |
/** |
1327 | 1339 |
* Initializes the @Parameter class members objects |
... | ... | |
1339 | 1351 |
* |
1340 | 1352 |
* @param key |
1341 | 1353 |
* @param value |
1342 |
* @return |
|
1354 |
* @return true if the parameter have been set
|
|
1343 | 1355 |
* @throws Exception |
1344 | 1356 |
*/ |
1345 |
public boolean setParameter(String key, Object value) throws Exception { |
|
1357 |
public final boolean setParameter(String key, Object value) throws Exception {
|
|
1346 | 1358 |
return setParameter(key, value, false); |
1347 | 1359 |
} |
1348 | 1360 |
|
... | ... | |
1356 | 1368 |
* @return |
1357 | 1369 |
* @throws Exception |
1358 | 1370 |
*/ |
1359 |
public boolean setParameter(String key, Object value, boolean propagateToParent) throws Exception { |
|
1371 |
public final boolean setParameter(String key, Object value, boolean propagateToParent) throws Exception {
|
|
1360 | 1372 |
|
1361 | 1373 |
Field targetField = BeanParameters.getField(this, key); |
1362 | 1374 |
|
1363 | 1375 |
if (targetField != null) { |
1364 | 1376 |
targetField.setAccessible(true); |
1365 | 1377 |
targetField.set(this, value); |
1366 |
|
|
1378 |
|
|
1367 | 1379 |
// Log |
1368 | 1380 |
String message = "TXMResult.setParameter(): " + this.getClass().getSimpleName() + ": setting parameter " + key + " = " + value; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
1369 | 1381 |
Log.finest(message); |
... | ... | |
2168 | 2180 |
return true; |
2169 | 2181 |
} |
2170 | 2182 |
|
2183 |
|
|
2171 | 2184 |
/** |
2172 | 2185 |
* import a result from a parameter file |
2173 | 2186 |
* |
... | ... | |
2175 | 2188 |
* @return the created result |
2176 | 2189 |
*/ |
2177 | 2190 |
public TXMResult importResult(File parameters) { |
2191 |
|
|
2192 |
Properties props = new Properties(); |
|
2178 | 2193 |
try { |
2179 |
Properties props = new Properties(); |
|
2180 | 2194 |
props.load(IOUtils.getReader(parameters)); |
2181 |
|
|
2195 |
} catch (Exception e) { |
|
2196 |
e.printStackTrace(); |
|
2197 |
return null; |
|
2198 |
} |
|
2199 |
return importResult(props); |
|
2200 |
} |
|
2201 |
|
|
2202 |
/** |
|
2203 |
* import a result from a parameter file in Properties XML DTD format |
|
2204 |
* |
|
2205 |
* @param allparameters the parameters file |
|
2206 |
* @return the created result |
|
2207 |
*/ |
|
2208 |
public TXMResult importResultFromXML(File xmlParameters) { |
|
2209 |
|
|
2210 |
Properties props = new Properties(); |
|
2211 |
try { |
|
2212 |
props.loadFromXML(IOUtils.getInput(xmlParameters)); |
|
2213 |
} catch (Exception e) { |
|
2214 |
e.printStackTrace(); |
|
2215 |
return null; |
|
2216 |
} |
|
2217 |
return importResult(props); |
|
2218 |
} |
|
2219 |
|
|
2220 |
/** |
|
2221 |
* import a result from a String in the Properties format |
|
2222 |
* |
|
2223 |
* @param allparameters the parameters file |
|
2224 |
* @return the created result |
|
2225 |
*/ |
|
2226 |
public TXMResult importResultFromXML(String parameters) { |
|
2227 |
|
|
2228 |
Properties props = new Properties(); |
|
2229 |
try { |
|
2230 |
props.loadFromXML(new StringBufferInputStream(parameters)); |
|
2231 |
} catch (Exception e) { |
|
2232 |
e.printStackTrace(); |
|
2233 |
return null; |
|
2234 |
} |
|
2235 |
return importResult(props); |
|
2236 |
} |
|
2237 |
|
|
2238 |
/** |
|
2239 |
* import a result from a String in the Properties format |
|
2240 |
* |
|
2241 |
* @param allparameters the parameters file |
|
2242 |
* @return the created result |
|
2243 |
*/ |
|
2244 |
public TXMResult importResult(String parameters) { |
|
2245 |
|
|
2246 |
Properties props = new Properties(); |
|
2247 |
try { |
|
2248 |
props.load(new StringReader(parameters)); |
|
2249 |
} catch (Exception e) { |
|
2250 |
e.printStackTrace(); |
|
2251 |
return null; |
|
2252 |
} |
|
2253 |
return importResult(props); |
|
2254 |
} |
|
2255 |
|
|
2256 |
/** |
|
2257 |
* import a result from a Properties map |
|
2258 |
* |
|
2259 |
* @param allparameters the parameters file |
|
2260 |
* @return the created result |
|
2261 |
*/ |
|
2262 |
public TXMResult importResult(Properties props) { |
|
2263 |
try { |
|
2182 | 2264 |
// some tests before... |
2183 | 2265 |
String className = props.getProperty(TXMPreferences.CLASS); |
2184 | 2266 |
if (className == null || className.length() == 0) { |
... | ... | |
2225 | 2307 |
} |
2226 | 2308 |
|
2227 | 2309 |
if (cons == null) { |
2228 |
System.out.println(NLS.bind("Cannot import {0} in {1}", parameters, this));
|
|
2310 |
System.out.println(NLS.bind("Cannot import {0} in {1}", props, this));
|
|
2229 | 2311 |
} |
2230 | 2312 |
else { |
2231 | 2313 |
cons = cl.getConstructor(String.class); |
... | ... | |
2236 | 2318 |
|
2237 | 2319 |
} |
2238 | 2320 |
catch (Exception e) { |
2239 |
System.out.println(NLS.bind("Fail to import result from {0}: {1}", parameters, e));
|
|
2321 |
System.out.println(NLS.bind("Fail to import result from {0}: {1}", props, e));
|
|
2240 | 2322 |
Log.printStackTrace(e); |
2241 | 2323 |
} |
2324 |
|
|
2242 | 2325 |
return null; |
2243 | 2326 |
} |
2244 | 2327 |
|
TXM/trunk/bundles/org.txm.core/src/java/org/txm/objects/Edition.java (revision 3794) | ||
---|---|---|
405 | 405 |
} |
406 | 406 |
|
407 | 407 |
@Override |
408 |
public boolean setParameters(TXMParameters parameters) throws Exception { |
|
409 |
return true; |
|
410 |
} |
|
411 |
|
|
412 |
@Override |
|
413 | 408 |
public String getName() { |
414 | 409 |
return getUserName(); |
415 | 410 |
} |
TXM/trunk/bundles/org.txm.core/src/java/org/txm/objects/Workspace.java (revision 3794) | ||
---|---|---|
433 | 433 |
} |
434 | 434 |
|
435 | 435 |
@Override |
436 |
public boolean setParameters(TXMParameters parameters) throws Exception { |
|
437 |
return true; |
|
438 |
} |
|
439 |
|
|
440 |
@Override |
|
441 | 436 |
public String getName() { |
442 | 437 |
return getUserName(); |
443 | 438 |
} |
TXM/trunk/bundles/org.txm.core/src/java/org/txm/objects/Project.java (revision 3794) | ||
---|---|---|
1146 | 1146 |
|
1147 | 1147 |
return true; |
1148 | 1148 |
} |
1149 |
|
|
1149 |
|
|
1150 | 1150 |
@Override |
1151 |
public boolean setParameters(TXMParameters parameters) throws Exception { |
|
1152 |
return false; |
|
1153 |
} |
|
1154 |
|
|
1155 |
@Override |
|
1156 | 1151 |
public String getName() { |
1157 | 1152 |
return getUserName(); |
1158 | 1153 |
} |
TXM/trunk/bundles/org.txm.core/src/java/org/txm/objects/Text.java (revision 3794) | ||
---|---|---|
251 | 251 |
|
252 | 252 |
return true; |
253 | 253 |
} |
254 |
|
|
255 |
@Override |
|
256 |
public boolean setParameters(TXMParameters parameters) throws Exception { |
|
257 |
String path = parameters.getString(TBXPreferences.SOURCE); |
|
258 |
if (path != null & path.length() > 0) { |
|
259 |
this.pSource = new File(path); |
|
260 |
} |
|
261 |
path = parameters.getString(TBXPreferences.XMLTXM); |
|
262 |
if (path != null & path.length() > 0) { |
|
263 |
this.pXMLTXMFile = new File(path); |
|
264 |
} |
|
265 |
return true; |
|
266 |
} |
|
267 |
|
|
254 |
|
|
268 | 255 |
public void setName(String name) { |
269 | 256 |
this.setUserName(name); |
270 | 257 |
} |
TXM/trunk/bundles/org.txm.core/src/java/org/txm/objects/SavedQuery.java (revision 3794) | ||
---|---|---|
149 | 149 |
public boolean loadParameters() throws Exception { |
150 | 150 |
return true; |
151 | 151 |
} |
152 |
|
|
152 | 153 |
|
153 | 154 |
@Override |
154 |
public boolean setParameters(TXMParameters parameters) throws Exception { |
|
155 |
this.setUserName(parameters.getString(TBXPreferences.NAME)); |
|
156 |
this.pValue = parameters.getString(TBXPreferences.VALUE); |
|
157 |
return true; |
|
158 |
} |
|
159 |
|
|
160 |
@Override |
|
161 | 155 |
public String getName() { |
162 | 156 |
return getUserName(); |
163 | 157 |
} |
TXM/trunk/bundles/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java (revision 3794) | ||
---|---|---|
1361 | 1361 |
this.setDirty(); |
1362 | 1362 |
} |
1363 | 1363 |
|
1364 |
@Override |
|
1365 |
public boolean setParameters(TXMParameters parameters) { |
|
1366 |
|
|
1367 |
Object p = parameters.get(ConcordancePreferences.QUERY); |
|
1368 |
if (p != null) { |
|
1369 |
if (p instanceof CQLQuery) this.pQuery = (CQLQuery) p; |
|
1370 |
else { |
|
1371 |
this.pQuery = new CQLQuery(p.toString()); |
|
1372 |
} |
|
1373 |
} |
|
1374 |
|
|
1375 |
p = parameters.get(ConcordancePreferences.LEFT_ANALYSIS_PROPERTIES); |
|
1376 |
if (p != null) { |
|
1377 |
if (p instanceof List<?>) this.pAnalysisLeftProperties = (List<WordProperty>) p; |
|
1378 |
else { |
|
1379 |
String v = p.toString(); |
|
1380 |
this.pAnalysisLeftProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v); |
|
1381 |
} |
|
1382 |
} |
|
1383 |
|
|
1384 |
p = parameters.get(ConcordancePreferences.RIGHT_ANALYSIS_PROPERTIES); |
|
1385 |
if (p != null) { |
|
1386 |
if (p instanceof List<?>) this.pAnalysisRightProperties = (List<WordProperty>) p; |
|
1387 |
else { |
|
1388 |
String v = p.toString(); |
|
1389 |
this.pAnalysisRightProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v); |
|
1390 |
} |
|
1391 |
} |
|
1392 |
|
|
1393 |
p = parameters.get(ConcordancePreferences.KEYWORD_ANALYSIS_PROPERTIES); |
|
1394 |
if (p != null) { |
|
1395 |
if (p instanceof List<?>) this.pAnalysisKeywordProperties = (List<WordProperty>) p; |
|
1396 |
else { |
|
1397 |
String v = p.toString(); |
|
1398 |
this.pAnalysisKeywordProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v); |
|
1399 |
} |
|
1400 |
} |
|
1401 |
|
|
1402 |
p = parameters.get(ConcordancePreferences.LEFT_VIEW_PROPERTIES); |
|
1403 |
if (p != null) { |
|
1404 |
if (p instanceof List<?>) this.pViewLeftProperties = (List<WordProperty>) p; |
|
1405 |
else { |
|
1406 |
String v = p.toString(); |
|
1407 |
this.pViewLeftProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v); |
|
1408 |
} |
|
1409 |
} |
|
1410 |
|
|
1411 |
p = parameters.get(ConcordancePreferences.RIGHT_VIEW_PROPERTIES); |
|
1412 |
if (p != null) { |
|
1413 |
if (p instanceof List<?>) this.pViewRightProperties = (List<WordProperty>) p; |
|
1414 |
else { |
|
1415 |
String v = p.toString(); |
|
1416 |
this.pViewRightProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v); |
|
1417 |
} |
|
1418 |
} |
|
1419 |
|
|
1420 |
p = parameters.get(ConcordancePreferences.KEYWORD_VIEW_PROPERTIES); |
|
1421 |
if (p != null) { |
|
1422 |
if (p instanceof List<?>) this.pViewKeywordProperties = (List<WordProperty>) p; |
|
1423 |
else { |
|
1424 |
String v = p.toString(); |
|
1425 |
this.pViewKeywordProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v); |
|
1426 |
} |
|
1427 |
} |
|
1428 |
|
|
1429 |
p = parameters.get(ConcordancePreferences.VIEW_REFERENCE_PATTERN); |
|
1430 |
if (p != null) { |
|
1431 |
if (p instanceof ReferencePattern) this.pViewRefPattern = (ReferencePattern) p; |
|
1432 |
else { |
|
1433 |
String v = p.toString(); |
|
1434 |
this.pViewRefPattern = ReferencePattern.stringToReferencePattern(getCorpus(), v); |
|
1435 |
} |
|
1436 |
} |
|
1437 |
|
|
1438 |
p = parameters.get(ConcordancePreferences.SORT_REFERENCE_PATTERN); |
|
1439 |
if (p != null) { |
|
1440 |
if (p instanceof ReferencePattern) this.pAnalysisRefPattern = (ReferencePattern) p; |
|
1441 |
else { |
|
1442 |
String v = p.toString(); |
|
1443 |
this.pAnalysisRefPattern = ReferencePattern.stringToReferencePattern(getCorpus(), v); |
|
1444 |
} |
|
1445 |
} |
|
1446 |
|
|
1447 |
this.pLeftContextSize = (Integer) parameters.get(ConcordancePreferences.LEFT_CONTEXT_SIZE); |
|
1448 |
this.pRightContextSize = (Integer) parameters.get(ConcordancePreferences.RIGHT_CONTEXT_SIZE); |
|
1449 |
|
|
1450 |
this.saveParameters(); |
|
1451 |
this.setDirty(); |
|
1452 |
return true; |
|
1453 |
} |
|
1454 |
|
|
1455 | 1364 |
/** |
1456 | 1365 |
* Set the reference Pattern. |
1457 | 1366 |
* |
TXM/trunk/bundles/org.txm.querycooccurrences.rcp/src/org/txm/functions/coocmatrix/QueryAutoCooccurrence.java (revision 3794) | ||
---|---|---|
334 | 334 |
public boolean canCompute() { |
335 | 335 |
return corpus != null; |
336 | 336 |
} |
337 |
|
|
337 |
|
|
338 | 338 |
@Override |
339 |
public boolean setParameters(TXMParameters parameters) { |
|
340 |
// FIXME: not yet implemented. |
|
341 |
System.err.println("QueryAutoCooccurrence.setParameters(): not yet implemented."); |
|
342 |
return false; |
|
343 |
} |
|
344 |
|
|
345 |
@Override |
|
346 | 339 |
public boolean saveParameters() throws Exception { |
347 | 340 |
// FIXME: not yet implemented. |
348 | 341 |
System.err.println("QueryAutoCooccurrence.saveParameters(): not yet implemented."); |
TXM/trunk/bundles/org.txm.querycooccurrences.rcp/src/org/txm/functions/coocmatrix/QueryCooccurrence.java (revision 3794) | ||
---|---|---|
250 | 250 |
public boolean canCompute() { |
251 | 251 |
return corpus != null; |
252 | 252 |
} |
253 |
|
|
253 |
|
|
254 | 254 |
@Override |
255 |
public boolean setParameters(TXMParameters parameters) { |
|
256 |
// FIXME: not yet implemented. |
|
257 |
// System.err.println("QueryCooccurrence.setParameters(): not yet implemented."); |
|
258 |
return false; |
|
259 |
} |
|
260 |
|
|
261 |
@Override |
|
262 | 255 |
public boolean saveParameters() throws Exception { |
263 | 256 |
// FIXME: not yet implemented. |
264 | 257 |
// System.err.println("QueryCooccurrence.saveParameters(): not yet implemented."); |
TXM/trunk/bundles/org.txm.para.core/src/org/txm/para/core/functions/ParaBrowser.java (revision 3794) | ||
---|---|---|
259 | 259 |
// TODO Auto-generated method stub |
260 | 260 |
return false; |
261 | 261 |
} |
262 |
|
|
263 |
|
|
262 |
|
|
264 | 263 |
@Override |
265 |
public boolean setParameters(TXMParameters parameters) { |
|
266 |
// FIXME: not yet computed |
|
267 |
System.err.println("ParaBrowser.setParameters() not implemented"); |
|
268 |
return false; |
|
269 |
} |
|
270 |
|
|
271 |
|
|
272 |
@Override |
|
273 | 264 |
public boolean saveParameters() throws Exception { |
274 | 265 |
// FIXME: not yet computed |
275 | 266 |
System.err.println("ParaBrowser.saveParameters() not implemented"); |
TXM/trunk/bundles/org.txm.treesearch.core/src/org/txm/treesearch/function/TreeSearch.java (revision 3794) | ||
---|---|---|
181 | 181 |
|
182 | 182 |
public abstract boolean hasSubMatchesStrategy(); |
183 | 183 |
|
184 |
@Override |
|
185 |
public abstract boolean setParameters(TXMParameters parameters); |
|
186 |
|
|
187 | 184 |
public abstract boolean toSVG(File svgFile, int sent, int sub, List<String> T, List<String> nT2); |
188 | 185 |
|
189 | 186 |
public abstract boolean isReady(); |
TXM/trunk/bundles/org.txm.ahc.core/src/org/txm/ahc/core/functions/AHC.java (revision 3794) | ||
---|---|---|
285 | 285 |
&& Arrays.binarySearch(AHC.getMetrics(), this.metric) >= 0 |
286 | 286 |
&& this.numberOfClusters >= 2; |
287 | 287 |
} |
288 |
|
|
289 |
@Override |
|
290 |
public boolean setParameters(TXMParameters parameters) { |
|
291 |
// TODO Auto-generated method stub |
|
292 |
System.err.println("AHC.setParameters() is not yet implemented."); //$NON-NLS-1$ |
|
293 |
return true; |
|
294 |
} |
|
295 |
|
|
288 |
|
|
296 | 289 |
/** |
297 | 290 |
* Resets the cached data so the next getter calls will request the values from R. |
298 | 291 |
*/ |
TXM/trunk/bundles/org.txm.index.core/src/org/txm/index/core/functions/___Lexicon2.java (revision 3794) | ||
---|---|---|
563 | 563 |
public void setParameters(Property property) { |
564 | 564 |
this.pProperty = property; |
565 | 565 |
} |
566 |
|
|
567 |
@Override |
|
568 |
public boolean setParameters(TXMParameters parameters) { |
|
569 |
try { |
|
570 |
Property p = (Property) parameters.get("properties"); |
|
571 |
this.setParameters(p); |
|
572 |
} |
|
573 |
catch (Exception e) { |
|
574 |
Log.printStackTrace(e); |
|
575 |
return false; |
|
576 |
} |
|
577 |
return true; |
|
578 |
} |
|
579 |
|
|
566 |
|
|
580 | 567 |
/** |
581 | 568 |
* Sets the symbol. |
582 | 569 |
* |
TXM/trunk/bundles/org.txm.index.core/src/org/txm/index/core/functions/Index.java (revision 3794) | ||
---|---|---|
981 | 981 |
if (nLinesPerPage != null) this.pNLinesPerPage = nLinesPerPage; |
982 | 982 |
} |
983 | 983 |
|
984 |
@Override |
|
985 |
public boolean setParameters(TXMParameters parameters) { |
|
986 |
try { |
|
987 |
List<WordProperty> props = (List<WordProperty>) parameters.get("props"); //$NON-NLS-1$ |
|
988 |
CQLQuery query = (CQLQuery) parameters.get("query"); //$NON-NLS-1$ |
|
989 |
Integer filterFmin = (Integer) parameters.get("filterFmin"); //$NON-NLS-1$ |
|
990 |
Integer filterFmax = (Integer) parameters.get("filterFmax"); //$NON-NLS-1$ |
|
991 |
Integer filterVmax = (Integer) parameters.get("filterVmax"); //$NON-NLS-1$ |
|
992 |
Integer nLinesPerPage = (Integer) parameters.get("nLinesPerPage"); //$NON-NLS-1$ |
|
993 |
|
|
994 |
this.setParameters(query, props, filterFmin, filterFmax, filterVmax, nLinesPerPage); |
|
995 |
} |
|
996 |
catch (Exception e) { |
|
997 |
Log.severe("Error while setting parameters of Index: " + e.getLocalizedMessage()); //$NON-NLS-1$ |
|
998 |
Log.printStackTrace(e); |
|
999 |
return false; |
|
1000 |
} |
|
1001 |
return true; |
|
1002 |
} |
|
1003 |
|
|
1004 |
|
|
1005 | 984 |
public void setTopLine(int i) { |
1006 | 985 |
pTopIndex = Math.max(i, 0); |
1007 | 986 |
} |
TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java (revision 3794) | ||
---|---|---|
195 | 195 |
} |
196 | 196 |
|
197 | 197 |
@Override |
198 |
public boolean setParameters(TXMParameters parameters) { |
|
199 |
if (parameters.getString("query") != null) { //$NON-NLS-1$ |
|
200 |
this.pQuery = new TIGERQuery(parameters.getString("query")); //$NON-NLS-1$ |
|
201 |
} |
|
202 |
return true; |
|
203 |
} |
|
204 |
|
|
205 |
@Override |
|
206 | 198 |
public boolean _loadParameters() throws Exception { |
207 | 199 |
|
208 | 200 |
return true; |
TXM/trunk/bundles/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ExpI.java (revision 3794) | ||
---|---|---|
419 | 419 |
} |
420 | 420 |
|
421 | 421 |
@Override |
422 |
public boolean setParameters(TXMParameters parameters) { |
|
423 |
return false; |
|
424 |
} |
|
425 |
|
|
426 |
@Override |
|
427 | 422 |
public boolean saveParameters() throws Exception { |
428 | 423 |
// TODO Auto-generated method stub |
429 | 424 |
return false; |
TXM/trunk/bundles/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ContextSubcorpus.java (revision 3794) | ||
---|---|---|
145 | 145 |
} |
146 | 146 |
|
147 | 147 |
@Override |
148 |
public boolean setParameters(TXMParameters parameters) { |
|
149 |
return false; |
|
150 |
} |
|
151 |
|
|
152 |
@Override |
|
153 | 148 |
public boolean saveParameters() throws Exception { |
154 | 149 |
// TODO Auto-generated method stub |
155 | 150 |
return false; |
TXM/trunk/bundles/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ValuesOfQuery.java (revision 3794) | ||
---|---|---|
204 | 204 |
public String getDetails() { |
205 | 205 |
return this.corpus.getName() + " " + this.query + " " + this.prop + " " + this.fmin; |
206 | 206 |
} |
207 |
|
|
207 |
|
|
208 | 208 |
@Override |
209 |
public boolean setParameters(TXMParameters parameters) { |
|
210 |
return false; |
|
211 |
} |
|
212 |
|
|
213 |
@Override |
|
214 | 209 |
public boolean saveParameters() throws Exception { |
215 | 210 |
// TODO Auto-generated method stub |
216 | 211 |
return false; |
TXM/trunk/bundles/org.txm.cql2lsa.rcp/src/org/txm/functions/cql2lsa/ExpII.java (revision 3794) | ||
---|---|---|
728 | 728 |
} |
729 | 729 |
|
730 | 730 |
@Override |
731 |
public boolean setParameters(TXMParameters parameters) { |
|
732 |
return false; |
|
733 |
} |
|
734 |
|
|
735 |
@Override |
|
736 | 731 |
public boolean saveParameters() throws Exception { |
737 | 732 |
// TODO Auto-generated method stub |
738 | 733 |
return false; |
TXM/trunk/bundles/org.txm.texts.core/src/org/txm/texts/core/TextsView.java (revision 3794) | ||
---|---|---|
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
@Override |
97 |
public boolean setParameters(TXMParameters parameters) throws Exception { |
|
98 |
|
|
99 |
if (parameters.get("columns") != null) { |
|
100 |
|
|
101 |
Object o = parameters.get("columns"); |
|
102 |
if (o instanceof List) { |
|
103 |
pColumns = new ArrayList((List)o); |
|
104 |
} else { |
|
105 |
String v = parameters.get("columns").toString(); |
|
106 |
if ("*".equals(v)) { |
|
107 |
this.pColumns = new ArrayList<>(getCorpus().getStructuralUnit("text").getUserDefinedOrderedProperties()); |
|
108 |
} else { |
|
109 |
this.pColumns = new ArrayList(Property.stringToProperties(getCorpus(), v)); |
|
110 |
} |
|
111 |
} |
|
112 |
return true; |
|
113 |
} |
|
114 |
return false; |
|
115 |
} |
|
116 |
|
|
117 |
@Override |
|
118 | 97 |
public String getName() { |
119 | 98 |
|
120 | 99 |
return "Texts ("+pColumns+")"; |
TXM/trunk/bundles/org.txm.referencer.core/src/org/txm/referencer/core/functions/Referencer.java (revision 3794) | ||
---|---|---|
515 | 515 |
this.setDirty(); |
516 | 516 |
} |
517 | 517 |
|
518 |
@Override |
|
519 |
public boolean setParameters(TXMParameters parameters) { |
|
520 |
return false; |
|
521 |
} |
|
522 |
|
|
523 | 518 |
@Deprecated |
524 | 519 |
public boolean toTxt(File outfile, String encoding) throws Exception { |
525 | 520 |
return toTxt(outfile, encoding, "\t", ""); //$NON-NLS-1$ //$NON-NLS-2$ |
TXM/trunk/bundles/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/functions/CooccurrenceGraph.java (revision 3794) | ||
---|---|---|
78 | 78 |
// TODO Auto-generated method stub |
79 | 79 |
return true; |
80 | 80 |
} |
81 |
|
|
81 |
|
|
82 | 82 |
/* |
83 | 83 |
* (non-Javadoc) |
84 |
* @see org.txm.core.results.TXMResult#setParameters(org.txm.core.results.TXMParameters) |
|
85 |
*/ |
|
86 |
@Override |
|
87 |
public boolean setParameters(TXMParameters parameters) throws Exception { |
|
88 |
// TODO Auto-generated method stub |
|
89 |
return true; |
|
90 |
} |
|
91 |
|
|
92 |
/* |
|
93 |
* (non-Javadoc) |
|
94 | 84 |
* @see org.txm.core.results.TXMResult#getName() |
95 | 85 |
*/ |
96 | 86 |
@Override |
TXM/trunk/bundles/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java (revision 3794) | ||
---|---|---|
697 | 697 |
@Override |
698 | 698 |
public void updateResultFromEditor() { |
699 | 699 |
TXMParameters parameters = getWidgetsParameters(); |
700 |
cooc.setParameters(parameters); |
|
700 |
cooc.setParametersFromWidgets(parameters);
|
|
701 | 701 |
} |
702 | 702 |
|
703 | 703 |
public TableViewer getTableViewer() { |
TXM/trunk/bundles/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java (revision 3794) | ||
---|---|---|
1059 | 1059 |
this.buildLexicalTableWithCooccurrents = buildLexicalTableWithCooccurrents; |
1060 | 1060 |
} |
1061 | 1061 |
|
1062 |
@Override |
|
1063 |
public boolean setParameters(TXMParameters parameters) { |
|
1062 |
public boolean setParametersFromWidgets(TXMParameters parameters) { |
|
1064 | 1063 |
try { |
1065 | 1064 |
CQPCorpus corpus = this.getCorpus(); |
1066 | 1065 |
boolean includeXpivot = parameters.getBoolean(CooccurrencePreferences.INCLUDE_X_PIVOT); |
Formats disponibles : Unified diff