Révision 605
| tmp/org.txm.partition.core/src/org/txm/partition/core/functions/PartitionDimensions.java (revision 605) | ||
|---|---|---|
| 65 | 65 |
|
| 66 | 66 |
@Override |
| 67 | 67 |
public boolean loadParameters() {
|
| 68 |
this.displayPartsCountInTitle = this.getBooleanParameterValue(PartitionDimensionsPreferences.CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE); |
|
| 69 |
this.sortBySize = this.getBooleanParameterValue(PartitionDimensionsPreferences.CHART_DIMENSIONS_SORT_BY_SIZE); |
|
| 68 |
// nothing to do |
|
| 70 | 69 |
return true; |
| 71 | 70 |
} |
| 72 | 71 |
|
| 72 |
@Override |
|
| 73 |
public boolean saveParameters() {
|
|
| 74 |
// nothing to do |
|
| 75 |
return true; |
|
| 76 |
} |
|
| 77 |
|
|
| 73 | 78 |
|
| 79 |
|
|
| 74 | 80 |
@Override |
| 75 | 81 |
protected boolean _compute(boolean update) throws Exception {
|
| 76 | 82 |
// parts |
| tmp/org.txm.referencer.core/src/org/txm/functions/referencer/Referencer.java (revision 605) | ||
|---|---|---|
| 552 | 552 |
return true; |
| 553 | 553 |
} |
| 554 | 554 |
|
| 555 |
@Override |
|
| 556 |
public boolean saveParameters() {
|
|
| 557 |
// TODO Auto-generated method stub |
|
| 558 |
System.err.println("Referencer.saveParameters(): not yet implemented.");
|
|
| 559 |
return true; |
|
| 560 |
} |
|
| 555 | 561 |
|
| 562 |
|
|
| 563 |
|
|
| 564 |
|
|
| 556 | 565 |
/** |
| 557 | 566 |
* The Class Line. |
| 558 | 567 |
*/ |
| tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/preferences/WordCloudPreferencePage.java (revision 605) | ||
|---|---|---|
| 72 | 72 |
// Charts rendering |
| 73 | 73 |
Composite chartsTab = SWTChartsComponentsProvider.createChartsRenderingPreferencesTabFolderComposite(this.getFieldEditorParent()); |
| 74 | 74 |
|
| 75 |
this.addField(new IntegerFieldEditor(WordCloudPreferences.MAX_WORDS, WordCloudUIMessages.PreferencePage_Number_of_used_words, chartsTab)); |
|
| 76 |
this.addField(new IntegerFieldEditor(WordCloudPreferences.FMIN, WordCloudUIMessages.PreferencePage_Minimal_frequency, chartsTab)); |
|
| 77 |
this.addField(new IntegerFieldEditor(WordCloudPreferences.ROT, WordCloudUIMessages.PreferencePage_Percent_of_rotated_words, chartsTab)); |
|
| 78 |
this.addField(new BooleanFieldEditor(WordCloudPreferences.RANDOM_POSITION, WordCloudUIMessages.PreferencePage_Random_word_positions, chartsTab)); |
|
| 75 |
this.addField(new IntegerFieldEditor(WordCloudPreferences.MAX_WORDS_COUNT, WordCloudUIMessages.PreferencePage_Number_of_used_words, chartsTab));
|
|
| 76 |
this.addField(new IntegerFieldEditor(WordCloudPreferences.F_MIN, WordCloudUIMessages.PreferencePage_Minimal_frequency, chartsTab));
|
|
| 77 |
this.addField(new IntegerFieldEditor(WordCloudPreferences.ROTATION_PERCENT, WordCloudUIMessages.PreferencePage_Percent_of_rotated_words, chartsTab));
|
|
| 78 |
this.addField(new BooleanFieldEditor(WordCloudPreferences.RANDOM_POSITIONS, WordCloudUIMessages.PreferencePage_Random_word_positions, chartsTab));
|
|
| 79 | 79 |
|
| 80 | 80 |
// other shared preferences |
| 81 | 81 |
SWTChartsComponentsProvider.createChartsRenderingPreferencesFields(this, chartsTab); |
| tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/___WordCloudEditorInput.java (revision 605) | ||
|---|---|---|
| 1 |
// Copyright © 2010-2013 ENS de Lyon. |
|
| 2 |
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of |
|
| 3 |
// Lyon 2, University of Franche-Comté, University of Nice |
|
| 4 |
// Sophia Antipolis, University of Paris 3. |
|
| 5 |
// |
|
| 6 |
// The TXM platform is free software: you can redistribute it |
|
| 7 |
// and/or modify it under the terms of the GNU General Public |
|
| 8 |
// License as published by the Free Software Foundation, |
|
| 9 |
// either version 2 of the License, or (at your option) any |
|
| 10 |
// later version. |
|
| 11 |
// |
|
| 12 |
// The TXM platform is distributed in the hope that it will be |
|
| 13 |
// useful, but WITHOUT ANY WARRANTY; without even the implied |
|
| 14 |
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
| 15 |
// PURPOSE. See the GNU General Public License for more |
|
| 16 |
// details. |
|
| 17 |
// |
|
| 18 |
// You should have received a copy of the GNU General |
|
| 19 |
// Public License along with the TXM platform. If not, see |
|
| 20 |
// http://www.gnu.org/licenses. |
|
| 21 |
// |
|
| 22 |
// |
|
| 23 |
// |
|
| 24 |
// $LastChangedDate:$ |
|
| 25 |
// $LastChangedRevision:$ |
|
| 26 |
// $LastChangedBy:$ |
|
| 27 |
// |
|
| 28 |
package org.txm.wordcloud.rcp.editors; |
|
| 29 |
|
|
| 30 |
import org.eclipse.jface.resource.ImageDescriptor; |
|
| 31 |
import org.eclipse.ui.IPersistableElement; |
|
| 32 |
import org.eclipse.ui.plugin.AbstractUIPlugin; |
|
| 33 |
import org.txm.chartsengine.rcp.editors.ChartEditorInput; |
|
| 34 |
import org.txm.rcp.Application; |
|
| 35 |
import org.txm.rcp.IImageKeys; |
|
| 36 |
import org.txm.wordcloud.core.functions.WordCloud; |
|
| 37 |
|
|
| 38 |
|
|
| 39 |
/** |
|
| 40 |
* |
|
| 41 |
* |
|
| 42 |
* @author sloiseau |
|
| 43 |
*/ |
|
| 44 |
@Deprecated |
|
| 45 |
//FIXME: useless |
|
| 46 |
public class ___WordCloudEditorInput extends ChartEditorInput {
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
/** |
|
| 50 |
* |
|
| 51 |
* @param src |
|
| 52 |
* @param wc |
|
| 53 |
*/ |
|
| 54 |
public ___WordCloudEditorInput(WordCloud wc) {
|
|
| 55 |
super(wc); |
|
| 56 |
} |
|
| 57 |
|
|
| 58 |
/** |
|
| 59 |
* Exists. |
|
| 60 |
* |
|
| 61 |
* @return true, if successful |
|
| 62 |
* @see org.eclipse.ui.IEditorInput#exists() |
|
| 63 |
*/ |
|
| 64 |
@Override |
|
| 65 |
public boolean exists() {
|
|
| 66 |
return false; |
|
| 67 |
} |
|
| 68 |
|
|
| 69 |
/** |
|
| 70 |
* Gets the image descriptor. |
|
| 71 |
* |
|
| 72 |
* @return the image descriptor |
|
| 73 |
* @see org.eclipse.ui.IEditorInput#getImageDescriptor() |
|
| 74 |
*/ |
|
| 75 |
@Override |
|
| 76 |
public ImageDescriptor getImageDescriptor() {
|
|
| 77 |
return AbstractUIPlugin.imageDescriptorFromPlugin(Application.PLUGIN_ID, IImageKeys.ACTION_WORDCLOUD); |
|
| 78 |
} |
|
| 79 |
|
|
| 80 |
|
|
| 81 |
/** |
|
| 82 |
* Gets the persistable. |
|
| 83 |
* |
|
| 84 |
* @return the persistable |
|
| 85 |
* @see org.eclipse.ui.IEditorInput#getPersistable() |
|
| 86 |
*/ |
|
| 87 |
@Override |
|
| 88 |
public IPersistableElement getPersistable() {
|
|
| 89 |
return null; |
|
| 90 |
} |
|
| 91 |
|
|
| 92 |
|
|
| 93 |
/** |
|
| 94 |
* Gets the adapter. |
|
| 95 |
* |
|
| 96 |
* @param arg0 the arg0 |
|
| 97 |
* @return the adapter |
|
| 98 |
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) |
|
| 99 |
*/ |
|
| 100 |
@Override |
|
| 101 |
@SuppressWarnings("unchecked") //$NON-NLS-1$
|
|
| 102 |
public Object getAdapter(Class arg0) {
|
|
| 103 |
return null; |
|
| 104 |
} |
|
| 105 |
|
|
| 106 |
|
|
| 107 |
} |
|
| 108 |
|
|
| tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditor.java (revision 605) | ||
|---|---|---|
| 1 | 1 |
package org.txm.wordcloud.rcp.editors; |
| 2 | 2 |
|
| 3 | 3 |
import org.eclipse.swt.SWT; |
| 4 |
import org.eclipse.swt.events.SelectionEvent; |
|
| 5 |
import org.eclipse.swt.events.SelectionListener; |
|
| 6 | 4 |
import org.eclipse.swt.widgets.Button; |
| 7 | 5 |
import org.eclipse.swt.widgets.Composite; |
| 8 | 6 |
import org.eclipse.swt.widgets.Label; |
| 9 | 7 |
import org.eclipse.swt.widgets.Spinner; |
| 10 | 8 |
import org.txm.chartsengine.rcp.editors.ChartEditorPart; |
| 11 |
import org.txm.core.preferences.TXMPreferences; |
|
| 12 |
import org.txm.core.results.TXMResult; |
|
| 9 |
import org.txm.core.results.Parameter; |
|
| 13 | 10 |
import org.txm.utils.logger.Log; |
| 11 |
import org.txm.wordcloud.core.functions.WordCloud; |
|
| 14 | 12 |
import org.txm.wordcloud.core.preferences.WordCloudPreferences; |
| 15 | 13 |
import org.txm.wordcloud.rcp.messages.WordCloudUIMessages; |
| 16 | 14 |
|
| 17 | 15 |
/** |
| 18 | 16 |
* Word cloud editor. |
| 17 |
* |
|
| 19 | 18 |
* @author mdecorde |
| 20 | 19 |
* @author sjacquot |
| 21 | 20 |
* |
| 22 | 21 |
*/ |
| 23 |
public class WordCloudEditor extends ChartEditorPart {
|
|
| 22 |
public class WordCloudEditor extends ChartEditorPart<WordCloud> {
|
|
| 24 | 23 |
|
| 24 |
|
|
| 25 |
@Parameter(key=WordCloudPreferences.F_MIN) |
|
| 26 |
protected Spinner minFreq; |
|
| 25 | 27 |
|
| 26 |
|
|
| 27 |
|
|
| 28 |
@Parameter(key=WordCloudPreferences.MAX_WORDS_COUNT) |
|
| 29 |
protected Spinner maxWordsCount; |
|
| 30 |
|
|
| 31 |
@Parameter(key=WordCloudPreferences.ROTATION_PERCENT) |
|
| 32 |
protected Spinner rotationPercent; |
|
| 33 |
|
|
| 34 |
@Parameter(key=WordCloudPreferences.RANDOM_POSITIONS) |
|
| 35 |
protected Button randomPositions; |
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 28 | 39 |
@Override |
| 29 | 40 |
public void createPartControl(Composite parent) {
|
| 30 | 41 |
super.createPartControl(parent); |
| ... | ... | |
| 56 | 67 |
|
| 57 | 68 |
// fmin |
| 58 | 69 |
new Label(p, SWT.NONE).setText(WordCloudUIMessages.EditorToolBar_fmin); |
| 59 |
final Spinner minFreqSpinner = new Spinner(p, SWT.BORDER); |
|
| 60 |
minFreqSpinner.setMinimum(1); |
|
| 61 |
minFreqSpinner.setIncrement(1); |
|
| 62 |
minFreqSpinner.setMaximum(100000000); |
|
| 63 |
minFreqSpinner.setSelection(this.getIntParameterValue(WordCloudPreferences.FMIN)); |
|
| 70 |
minFreq = new Spinner(p, SWT.BORDER); |
|
| 71 |
minFreq.setMinimum(1); |
|
| 72 |
minFreq.setIncrement(1); |
|
| 73 |
minFreq.setMaximum(100000000); |
|
| 64 | 74 |
|
| 65 | 75 |
// max words / vmax |
| 66 | 76 |
new Label(p, SWT.NONE).setText(WordCloudUIMessages.EditorToolBar_vmax); |
| 67 |
final Spinner maxWordsSpinner = new Spinner(p, SWT.BORDER); |
|
| 68 |
maxWordsSpinner.setMinimum(10); |
|
| 69 |
maxWordsSpinner.setIncrement(1); |
|
| 70 |
maxWordsSpinner.setMaximum(100000); |
|
| 71 |
maxWordsSpinner.setSelection(this.getIntParameterValue(WordCloudPreferences.MAX_WORDS)); |
|
| 77 |
maxWordsCount = new Spinner(p, SWT.BORDER); |
|
| 78 |
maxWordsCount.setMinimum(10); |
|
| 79 |
maxWordsCount.setIncrement(1); |
|
| 80 |
maxWordsCount.setMaximum(100000); |
|
| 72 | 81 |
|
| 73 | 82 |
// rotation percent |
| 74 | 83 |
new Label(p, SWT.NONE).setText(WordCloudUIMessages.EditorToolBar_Percent_of_rotated_labels); |
| 75 |
final Spinner rotPerSpinner = new Spinner(p, SWT.BORDER); |
|
| 76 |
rotPerSpinner.setMinimum(0); |
|
| 77 |
rotPerSpinner.setIncrement(1); |
|
| 78 |
rotPerSpinner.setMaximum(100); |
|
| 79 |
rotPerSpinner.setSelection(this.getIntParameterValue(WordCloudPreferences.ROT)); |
|
| 84 |
rotationPercent = new Spinner(p, SWT.BORDER); |
|
| 85 |
rotationPercent.setMinimum(0); |
|
| 86 |
rotationPercent.setIncrement(1); |
|
| 87 |
rotationPercent.setMaximum(100); |
|
| 80 | 88 |
|
| 81 | 89 |
// random positions |
| 82 |
final Button randomOrderButton = new Button(p, SWT.CHECK);
|
|
| 83 |
randomOrderButton.setText(WordCloudUIMessages.EditorToolBar_Randomize_positions);
|
|
| 84 |
randomOrderButton.setSelection(this.getBooleanParameterValue(WordCloudPreferences.RANDOM_POSITION)); |
|
| 90 |
randomPositions = new Button(p, SWT.CHECK);
|
|
| 91 |
randomPositions.setText(WordCloudUIMessages.EditorToolBar_Randomize_positions);
|
|
| 92 |
|
|
| 85 | 93 |
|
| 86 |
|
|
| 87 |
// compute button |
|
| 88 |
Button okButton = new Button(p, SWT.PUSH); |
|
| 89 |
okButton.setText(WordCloudUIMessages.EditorToolBar_Draw); |
|
| 90 |
okButton.addSelectionListener(new SelectionListener() {
|
|
| 91 |
@Override |
|
| 92 |
public void widgetSelected(SelectionEvent e) {
|
|
| 93 |
|
|
| 94 |
// persistence |
|
| 95 |
getResultData().saveParameter(WordCloudPreferences.MAX_WORDS, maxWordsSpinner.getSelection()); |
|
| 96 |
getResultData().saveParameter(WordCloudPreferences.FMIN, minFreqSpinner.getSelection()); |
|
| 97 |
getResultData().saveParameter(WordCloudPreferences.ROT, rotPerSpinner.getSelection()); |
|
| 98 |
getResultData().saveParameter(WordCloudPreferences.RANDOM_POSITION, randomOrderButton.getSelection()); |
|
| 99 |
|
|
| 100 |
compute(true); |
|
| 101 |
} |
|
| 102 |
|
|
| 103 |
|
|
| 104 |
|
|
| 105 |
|
|
| 106 |
@Override |
|
| 107 |
public void widgetDefaultSelected(SelectionEvent e) { }
|
|
| 108 |
}); |
|
| 109 |
|
|
| 110 | 94 |
p.pack(); |
| 111 | 95 |
|
| 112 | 96 |
Log.info(WordCloudUIMessages.Log_WordCloud_ready + this.getResultData()); |
| tmp/org.txm.wordcloud.rcp/OSGI-INF/l10n/bundle.properties (revision 605) | ||
|---|---|---|
| 1 |
Bundle-Name=WordCloudRCP |
|
| 1 |
Bundle-Name=WordCloud RCP
|
|
| 2 | 2 |
command.label=WordCloud |
| 3 | 3 |
command.name=WordCloud |
| 4 | 4 |
editor.name=WordCloud |
| 5 |
page.name = WordCloud |
|
| 6 |
perspective.name = RCP Perspective |
|
| 5 |
page.name = WordCloud |
|
| tmp/org.txm.wordcloud.rcp/OSGI-INF/l10n/bundle_fr.properties (revision 605) | ||
|---|---|---|
| 1 |
Bundle-Name = WordCloudRCP |
|
| 1 |
Bundle-Name = WordCloud RCP
|
|
| 2 | 2 |
command.label = Nuage de mots |
| 3 | 3 |
command.name = Nuage de mots |
| 4 | 4 |
editor.name = Nuage de mots |
| 5 |
page.name = Nuage de mots |
|
| 6 |
perspective.name = RCP Perspective |
|
| 5 |
page.name = Nuage de mots |
|
| tmp/org.txm.wordcloud.rcp/plugin.xml (revision 605) | ||
|---|---|---|
| 3 | 3 |
<plugin> |
| 4 | 4 |
|
| 5 | 5 |
<extension |
| 6 |
id="application" |
|
| 7 |
point="org.eclipse.core.runtime.applications"> |
|
| 8 |
<application> |
|
| 9 |
<run |
|
| 10 |
class="___wordcloudrcp.Application"> |
|
| 11 |
</run> |
|
| 12 |
</application> |
|
| 13 |
</extension> |
|
| 14 |
<extension |
|
| 15 |
point="org.eclipse.ui.perspectives"> |
|
| 16 |
<perspective |
|
| 17 |
name="%perspective.name" |
|
| 18 |
class="___wordcloudrcp.Perspective" |
|
| 19 |
id="WordCloudRCP.perspective"> |
|
| 20 |
</perspective> |
|
| 21 |
</extension> |
|
| 22 |
<extension |
|
| 23 | 6 |
point="org.eclipse.ui.commands"> |
| 24 | 7 |
<command |
| 25 | 8 |
categoryId="org.txm.rcp.category.txm" |
| ... | ... | |
| 103 | 86 |
<command |
| 104 | 87 |
commandId="org.txm.rcp.commands.OpenBrowser" |
| 105 | 88 |
icon="icons/functions/wordcloud.png" |
| 106 |
label="%command.name"
|
|
| 89 |
label="Open help"
|
|
| 107 | 90 |
style="push"> |
| 108 | 91 |
<parameter |
| 109 | 92 |
name="org.txm.rcp.commands.commandParameter2" |
| tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/functions/WordCloud.java (revision 605) | ||
|---|---|---|
| 4 | 4 |
import java.util.List; |
| 5 | 5 |
|
| 6 | 6 |
import org.txm.chartsengine.core.results.ChartResult; |
| 7 |
import org.txm.core.results.Parameter; |
|
| 7 | 8 |
import org.txm.core.results.TXMParameters; |
| 8 | 9 |
import org.txm.index.core.functions.Index; |
| 9 | 10 |
import org.txm.index.core.functions.Line; |
| ... | ... | |
| 25 | 26 |
private int[] freqs; |
| 26 | 27 |
private String[] labels; |
| 27 | 28 |
|
| 28 |
protected Integer pFMinFilter; |
|
| 29 | 29 |
|
| 30 |
protected Integer pVMaxFilter; |
|
| 31 |
|
|
| 30 |
|
|
| 31 |
@Parameter(key=WordCloudPreferences.F_MIN) |
|
| 32 |
protected int fMin; |
|
| 33 |
|
|
| 34 |
@Parameter(key=WordCloudPreferences.MAX_WORDS_COUNT) |
|
| 35 |
protected int maxWordsCount; |
|
| 36 |
|
|
| 37 |
@Parameter(key=WordCloudPreferences.ROTATION_PERCENT) |
|
| 38 |
protected float rotationPercent; |
|
| 39 |
|
|
| 40 |
@Parameter(key=WordCloudPreferences.RANDOM_POSITIONS) |
|
| 41 |
protected boolean randomPositions; |
|
| 42 |
|
|
| 43 |
|
|
| 32 | 44 |
/** |
| 33 | 45 |
* |
| 34 | 46 |
* @param index |
| ... | ... | |
| 54 | 66 |
} |
| 55 | 67 |
} |
| 56 | 68 |
|
| 69 |
// FIXME: to remove? |
|
| 57 | 70 |
private void removeDiacritics() {
|
| 58 | 71 |
//for (int i = 0; i < labels.length ; i++) |
| 59 | 72 |
// labels[i] = AsciiUtils.convertNonAscii(labels[i]); |
| ... | ... | |
| 152 | 165 |
|
| 153 | 166 |
@Override |
| 154 | 167 |
public String getSimpleName() {
|
| 155 |
return WordCloudCoreMessages.RESULT_TYPE + " (" + this.pFMinFilter
|
|
| 168 |
return WordCloudCoreMessages.RESULT_TYPE + " (" + this.fMin
|
|
| 156 | 169 |
+ " / " |
| 157 |
+ this.pVMaxFilter
|
|
| 170 |
+ this.maxWordsCount
|
|
| 158 | 171 |
+ ")"; |
| 159 | 172 |
} |
| 160 | 173 |
|
| ... | ... | |
| 166 | 179 |
|
| 167 | 180 |
@Override |
| 168 | 181 |
public boolean canCompute() {
|
| 169 |
return parent != null && pFMinFilter != null;
|
|
| 182 |
return this.parent != null;
|
|
| 170 | 183 |
} |
| 171 | 184 |
|
| 172 | 185 |
@Override |
| 173 | 186 |
public boolean setParameters(TXMParameters parameters) {
|
| 174 | 187 |
|
| 175 |
if (parameters.containsKey(WordCloudPreferences.FMIN)) {
|
|
| 176 |
Object value = parameters.get(WordCloudPreferences.FMIN); |
|
| 188 |
if (parameters.containsKey(WordCloudPreferences.F_MIN)) {
|
|
| 189 |
Object value = parameters.get(WordCloudPreferences.F_MIN);
|
|
| 177 | 190 |
if (value instanceof String) {
|
| 178 |
this.pFMinFilter = Integer.parseInt(value.toString());
|
|
| 191 |
this.fMin = Integer.parseInt(value.toString());
|
|
| 179 | 192 |
} else if (value instanceof Integer) {
|
| 180 |
this.pFMinFilter = (Integer)value;
|
|
| 193 |
this.fMin = (Integer)value;
|
|
| 181 | 194 |
} |
| 182 | 195 |
} |
| 183 | 196 |
|
| 184 |
if (parameters.containsKey(WordCloudPreferences.MAX_WORDS)) {
|
|
| 185 |
Object value = parameters.get(WordCloudPreferences.MAX_WORDS); |
|
| 197 |
if (parameters.containsKey(WordCloudPreferences.MAX_WORDS_COUNT)) {
|
|
| 198 |
Object value = parameters.get(WordCloudPreferences.MAX_WORDS_COUNT);
|
|
| 186 | 199 |
if (value instanceof String) {
|
| 187 |
this.pVMaxFilter = Integer.parseInt(value.toString());
|
|
| 200 |
this.maxWordsCount = Integer.parseInt(value.toString());
|
|
| 188 | 201 |
} else if (value instanceof Integer) {
|
| 189 |
this.pVMaxFilter = (Integer)value;
|
|
| 202 |
this.maxWordsCount = (Integer)value;
|
|
| 190 | 203 |
} |
| 191 | 204 |
} |
| 192 | 205 |
|
| ... | ... | |
| 268 | 281 |
|
| 269 | 282 |
@Override |
| 270 | 283 |
public boolean loadParameters() throws Exception {
|
| 271 |
this.pFMinFilter = this.getIntParameterValue(WordCloudPreferences.FMIN); |
|
| 272 |
this.pVMaxFilter = this.getIntParameterValue(WordCloudPreferences.MAX_WORDS); |
|
| 273 |
return false; |
|
| 284 |
// nothing to do |
|
| 285 |
return true; |
|
| 274 | 286 |
} |
| 275 | 287 |
|
| 276 |
public Integer getFMinFilter() {
|
|
| 277 |
return pFMinFilter; |
|
| 288 |
@Override |
|
| 289 |
public boolean saveParameters() throws Exception {
|
|
| 290 |
// nothing to do |
|
| 291 |
return true; |
|
| 278 | 292 |
} |
| 279 | 293 |
|
| 280 |
public Integer getVMaxFilter() {
|
|
| 281 |
return pVMaxFilter; |
|
| 294 |
|
|
| 295 |
public int getFMin() {
|
|
| 296 |
return fMin; |
|
| 282 | 297 |
} |
| 298 |
|
|
| 299 |
/** |
|
| 300 |
* @return the maxWordsCount |
|
| 301 |
*/ |
|
| 302 |
public int getMaxWordsCount() {
|
|
| 303 |
return maxWordsCount; |
|
| 304 |
} |
|
| 305 |
|
|
| 306 |
/** |
|
| 307 |
* @param maxWordsCount the maxWordsCount to set |
|
| 308 |
*/ |
|
| 309 |
public void setMaxWordsCount(int maxWordsCount) {
|
|
| 310 |
this.maxWordsCount = maxWordsCount; |
|
| 311 |
} |
|
| 312 |
|
|
| 313 |
/** |
|
| 314 |
* @return the rotationPercent |
|
| 315 |
*/ |
|
| 316 |
public float getRotationPercent() {
|
|
| 317 |
return rotationPercent; |
|
| 318 |
} |
|
| 319 |
|
|
| 320 |
/** |
|
| 321 |
* @param rotationPercent the rotationPercent to set |
|
| 322 |
*/ |
|
| 323 |
public void setRotationPercent(float rotationPercent) {
|
|
| 324 |
this.rotationPercent = rotationPercent; |
|
| 325 |
} |
|
| 326 |
|
|
| 327 |
/** |
|
| 328 |
* @return the randomPositions |
|
| 329 |
*/ |
|
| 330 |
public boolean isRandomPositions() {
|
|
| 331 |
return randomPositions; |
|
| 332 |
} |
|
| 333 |
|
|
| 334 |
/** |
|
| 335 |
* @param randomPositions the randomPositions to set |
|
| 336 |
*/ |
|
| 337 |
public void setRandomPositions(boolean randomPositions) {
|
|
| 338 |
this.randomPositions = randomPositions; |
|
| 339 |
} |
|
| 340 |
|
|
| 341 |
/** |
|
| 342 |
* @param fMin the fMin to set |
|
| 343 |
*/ |
|
| 344 |
public void setFMin(int fMin) {
|
|
| 345 |
this.fMin = fMin; |
|
| 346 |
} |
|
| 283 | 347 |
} |
| tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/chartsengine/r/RWordCloudChartCreator.java (revision 605) | ||
|---|---|---|
| 22 | 22 |
|
| 23 | 23 |
|
| 24 | 24 |
// parameters |
| 25 |
int maxWords = result.getIntParameterValue(WordCloudPreferences.MAX_WORDS);
|
|
| 26 |
int minFreq = result.getIntParameterValue(WordCloudPreferences.FMIN);
|
|
| 27 |
float rotPer = result.getFloatParameterValue(WordCloudPreferences.ROT);
|
|
| 28 |
boolean randomOrder = result.getBooleanParameterValue(WordCloudPreferences.RANDOM_POSITION);
|
|
| 25 |
int maxWords = wordCloud.getMaxWordsCount();
|
|
| 26 |
int minFreq = wordCloud.getFMin();
|
|
| 27 |
float rotPer = wordCloud.getRotationPercent();
|
|
| 28 |
boolean randomOrder = wordCloud.isRandomPositions();
|
|
| 29 | 29 |
|
| 30 | 30 |
|
| 31 | 31 |
RWorkspace rw = RWorkspace.getRWorkspaceInstance(); |
| tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/preferences/WordCloudPreferences.java (revision 605) | ||
|---|---|---|
| 20 | 20 |
|
| 21 | 21 |
public static final String PREFERENCES_PREFIX = "wordcloud_"; |
| 22 | 22 |
|
| 23 |
public static final String MAX_WORDS = PREFERENCES_PREFIX + "max_words"; //$NON-NLS-1$ |
|
| 24 |
public static final String FMIN = PREFERENCES_PREFIX + "f_min"; //$NON-NLS-1$ |
|
| 25 |
public static final String ROT = PREFERENCES_PREFIX + "rotation_percent"; //$NON-NLS-1$ |
|
| 26 |
public static final String RANDOM_POSITION = PREFERENCES_PREFIX + "random_positions"; //$NON-NLS-1$ |
|
| 23 |
public static final String MAX_WORDS_COUNT = PREFERENCES_PREFIX + "max_words"; //$NON-NLS-1$
|
|
| 24 |
public static final String F_MIN = PREFERENCES_PREFIX + "f_min"; //$NON-NLS-1$
|
|
| 25 |
public static final String ROTATION_PERCENT = PREFERENCES_PREFIX + "rotation_percent"; //$NON-NLS-1$
|
|
| 26 |
public static final String RANDOM_POSITIONS = PREFERENCES_PREFIX + "random_positions"; //$NON-NLS-1$
|
|
| 27 | 27 |
|
| 28 | 28 |
@Override |
| 29 | 29 |
public void initializeDefaultPreferences() {
|
| 30 | 30 |
|
| 31 | 31 |
Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE); |
| 32 |
preferences.putInt(MAX_WORDS, 50); |
|
| 33 |
preferences.putInt(FMIN, 20); |
|
| 34 |
preferences.putInt(ROT, 10); |
|
| 35 |
preferences.putBoolean(RANDOM_POSITION, false); |
|
| 32 |
preferences.putInt(MAX_WORDS_COUNT, 50);
|
|
| 33 |
preferences.putInt(F_MIN, 20);
|
|
| 34 |
preferences.putInt(ROTATION_PERCENT, 10);
|
|
| 35 |
preferences.putBoolean(RANDOM_POSITIONS, false);
|
|
| 36 | 36 |
|
| 37 | 37 |
// FIXME: shared charts rendering preferences |
| 38 | 38 |
//ChartsEnginePreferences.initializeChartsEngineSharedPreferences(preferences); |
| tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java (revision 605) | ||
|---|---|---|
| 1514 | 1514 |
return true; |
| 1515 | 1515 |
} |
| 1516 | 1516 |
|
| 1517 |
@Override |
|
| 1518 |
public boolean saveParameters() {
|
|
| 1519 |
// TODO Auto-generated method stub |
|
| 1520 |
System.err.println("Cooccurrence.saveParameters(): not yet implemented.");
|
|
| 1521 |
return true; |
|
| 1522 |
} |
|
| 1523 |
|
|
| 1524 |
|
|
| 1525 |
|
|
| 1526 |
|
|
| 1517 | 1527 |
public void setQuery(Query query) {
|
| 1518 | 1528 |
this.pQuery = query; |
| 1519 | 1529 |
} |
| tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java (revision 605) | ||
|---|---|---|
| 12 | 12 |
import org.txm.ca.rcp.messages.CAUIMessages; |
| 13 | 13 |
import org.txm.chartsengine.rcp.editors.ChartEditorInput; |
| 14 | 14 |
import org.txm.chartsengine.rcp.editors.ChartEditorPart; |
| 15 |
import org.txm.core.results.Parameter; |
|
| 15 | 16 |
import org.txm.rcp.IImageKeys; |
| 16 | 17 |
import org.txm.utils.logger.Log; |
| 17 | 18 |
|
| ... | ... | |
| 23 | 24 |
public class CAFactorialMapChartEditor extends ChartEditorPart<CA> {
|
| 24 | 25 |
|
| 25 | 26 |
|
| 26 |
public CAFactorialMapChartEditor() {
|
|
| 27 |
super(); |
|
| 28 |
} |
|
| 27 |
// FIXME: try to automate that |
|
| 28 |
// /** |
|
| 29 |
// * First dimension. |
|
| 30 |
// */ |
|
| 31 |
// @Parameter(key=CAPreferences.FIRST_DIMENSION) |
|
| 32 |
// protected int firstDimension = 1; |
|
| 33 |
// |
|
| 34 |
// /** |
|
| 35 |
// * Second dimension. |
|
| 36 |
// */ |
|
| 37 |
// @Parameter(key=CAPreferences.SECOND_DIMENSION) |
|
| 38 |
// protected int secondDimension = 2; |
|
| 29 | 39 |
|
| 40 |
|
|
| 30 | 41 |
/** |
| 42 |
* To show/hide individuals. |
|
| 43 |
*/ |
|
| 44 |
@Parameter(key=CAPreferences.SHOW_INDIVIDUALS) |
|
| 45 |
protected ToolItem showIndividuals; |
|
| 46 |
|
|
| 47 |
/** |
|
| 48 |
* To show/hide variables. |
|
| 49 |
*/ |
|
| 50 |
@Parameter(key=CAPreferences.SHOW_VARIABLES) |
|
| 51 |
protected ToolItem showVariables; |
|
| 52 |
|
|
| 53 |
/** |
|
| 54 |
* To show/hide the point shapes or only the labels. |
|
| 55 |
*/ |
|
| 56 |
@Parameter(key=CAPreferences.SHOW_POINT_SHAPES) |
|
| 57 |
protected ToolItem showPointShapes; |
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
/** |
|
| 31 | 62 |
* |
| 32 | 63 |
* @param chartEditorInput |
| 33 | 64 |
*/ |
| ... | ... | |
| 46 | 77 |
|
| 47 | 78 |
|
| 48 | 79 |
// Show/hide columns |
| 49 |
final ToolItem showColumns = new ToolItem(this.topToolBar, SWT.CHECK);
|
|
| 80 |
showIndividuals = new ToolItem(this.topToolBar, SWT.CHECK);
|
|
| 50 | 81 |
// FIXME: keep this for offering an option "large icons" with text in buttons ? |
| 51 | 82 |
//showColumns.setText(SWTComponentsProviderMessages.SWTChartsComponentProvider_CA_TOOLBAR_BUTTON_SHOW_COLUMS_LABEL); |
| 52 |
showColumns.setToolTipText(CAUIMessages.CHART_TOOLBAR_BUTTON_SHOW_COLUMS_TOOLTIP);
|
|
| 53 |
showColumns.setImage(IImageKeys.getImage(CAFactorialMapChartEditor.class, "icons/show_columns.png"));
|
|
| 54 |
showColumns.setSelection(this.getBooleanParameterValue(CAPreferences.SHOW_INDIVIDUALS));
|
|
| 83 |
showIndividuals.setToolTipText(CAUIMessages.CHART_TOOLBAR_BUTTON_SHOW_COLUMS_TOOLTIP);
|
|
| 84 |
showIndividuals.setImage(IImageKeys.getImage(CAFactorialMapChartEditor.class, "icons/show_columns.png"));
|
|
| 85 |
//showIndividuals.setSelection(this.getBooleanParameterValue(CAPreferences.SHOW_INDIVIDUALS));
|
|
| 55 | 86 |
|
| 56 | 87 |
// Show/hide rows |
| 57 |
final ToolItem showRows = new ToolItem(this.topToolBar, SWT.CHECK);
|
|
| 88 |
showVariables = new ToolItem(this.topToolBar, SWT.CHECK);
|
|
| 58 | 89 |
// FIXME: keep this for offering an option "large icons" with text in buttons ? |
| 59 | 90 |
//this.showRows.setText(SWTComponentsProviderMessages.SWTChartsComponentProvider_CA_TOOLBAR_BUTTON_SHOW_ROWS_LABEL); |
| 60 |
showRows.setToolTipText(CAUIMessages.CHART_TOOLBAR_BUTTON_SHOW_ROWS_TOOLTIP);
|
|
| 61 |
showRows.setImage(IImageKeys.getImage(CAFactorialMapChartEditor.class, "icons/show_rows.png"));
|
|
| 62 |
showRows.setSelection(this.getBooleanParameterValue(CAPreferences.SHOW_VARIABLES));
|
|
| 91 |
showVariables.setToolTipText(CAUIMessages.CHART_TOOLBAR_BUTTON_SHOW_ROWS_TOOLTIP);
|
|
| 92 |
showVariables.setImage(IImageKeys.getImage(CAFactorialMapChartEditor.class, "icons/show_rows.png"));
|
|
| 93 |
//showVariables.setSelection(this.getBooleanParameterValue(CAPreferences.SHOW_VARIABLES));
|
|
| 63 | 94 |
|
| 64 | 95 |
// Show/hide point shapes |
| 65 |
final ToolItem showPointShapes = new ToolItem(this.topToolBar, SWT.CHECK);
|
|
| 96 |
showPointShapes = new ToolItem(this.topToolBar, SWT.CHECK); |
|
| 66 | 97 |
// FIXME: keep this for offering an option "large icons" with text in buttons ? |
| 67 | 98 |
//showPointShapes.setText(CAUIMessages.SHOW_HIDE_POINT_SHAPES); |
| 68 | 99 |
showPointShapes.setToolTipText(CAUIMessages.CHART_TOOLBAR_BUTTON_SHOW_HIDE_POINT_SHAPES); |
| 69 | 100 |
showPointShapes.setImage(IImageKeys.getImage(CAFactorialMapChartEditor.class, "icons/show_point_shapes.png")); |
| 70 |
showPointShapes.setSelection(this.getBooleanParameterValue(CAPreferences.SHOW_POINT_SHAPES)); |
|
| 101 |
//showPointShapes.setSelection(this.getBooleanParameterValue(CAPreferences.SHOW_POINT_SHAPES));
|
|
| 71 | 102 |
|
| 72 | 103 |
|
| 73 |
|
|
| 74 |
|
|
| 75 | 104 |
// Factors plane selection |
| 76 | 105 |
ToolItem itemSeparator = new ToolItem(this.topToolBar, SWT.SEPARATOR); |
| 77 | 106 |
CLabel factorsLabel = new CLabel(this.topToolBar, SWT.CENTER); |
| ... | ... | |
| 139 | 168 |
boolean resetView = false; |
| 140 | 169 |
|
| 141 | 170 |
//Show/hide columns |
| 142 |
if(e.getSource() == showColumns) {
|
|
| 171 |
if(e.getSource() == showIndividuals) {
|
|
| 143 | 172 |
|
| 144 | 173 |
// Cancel the event and do nothing if only columns are currently displayed |
| 145 |
if(!((ToolItem) e.getSource()).getSelection() && !showRows.getSelection()) {
|
|
| 174 |
if(!((ToolItem) e.getSource()).getSelection() && !showVariables.getSelection()) {
|
|
| 146 | 175 |
((ToolItem) e.getSource()).setSelection(true); |
| 147 | 176 |
return; |
| 148 | 177 |
} |
| ... | ... | |
| 150 | 179 |
getResultData().saveParameter(CAPreferences.SHOW_INDIVIDUALS, ((ToolItem) e.getSource()).getSelection()); |
| 151 | 180 |
} |
| 152 | 181 |
//Show/hide rows |
| 153 |
else if(e.getSource() == showRows) {
|
|
| 182 |
else if(e.getSource() == showVariables) {
|
|
| 154 | 183 |
|
| 155 | 184 |
// Cancel the event and do nothing if only rows are currently displayed |
| 156 |
if(!((ToolItem) e.getSource()).getSelection() && !showColumns.getSelection()) {
|
|
| 185 |
if(!((ToolItem) e.getSource()).getSelection() && !showIndividuals.getSelection()) {
|
|
| 157 | 186 |
((ToolItem) e.getSource()).setSelection(true); |
| 158 | 187 |
return; |
| 159 | 188 |
} |
| ... | ... | |
| 205 | 234 |
}; |
| 206 | 235 |
|
| 207 | 236 |
|
| 208 |
showColumns.addSelectionListener(listener);
|
|
| 209 |
showRows.addSelectionListener(listener);
|
|
| 237 |
showIndividuals.addSelectionListener(listener);
|
|
| 238 |
showVariables.addSelectionListener(listener);
|
|
| 210 | 239 |
showPointShapes.addSelectionListener(listener); |
| 211 | 240 |
plansCombo.addSelectionListener(listener); |
| 212 | 241 |
|
| tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java (revision 605) | ||
|---|---|---|
| 616 | 616 |
return true; |
| 617 | 617 |
} |
| 618 | 618 |
|
| 619 |
@Override |
|
| 620 |
public boolean saveParameters() {
|
|
| 621 |
// nothing to do |
|
| 622 |
return true; |
|
| 623 |
} |
|
| 624 |
|
|
| 625 |
|
|
| 619 | 626 |
/** |
| 620 | 627 |
* @return the maxScore |
| 621 | 628 |
*/ |
| tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitiesSelection.java (revision 605) | ||
|---|---|---|
| 59 | 59 |
|
| 60 | 60 |
@Override |
| 61 | 61 |
public boolean loadParameters() {
|
| 62 |
this.groupByLines = this.getBooleanParameterValue(SpecificitiesPreferences.CHART_TRANSPOSE); |
|
| 63 |
this.banality = this.getFloatParameterValue(SpecificitiesPreferences.CHART_BANALITY); |
|
| 64 |
this.drawBars = this.getBooleanParameterValue(SpecificitiesPreferences.CHART_DRAW_BARS); |
|
| 65 |
this.drawLines = this.getBooleanParameterValue(SpecificitiesPreferences.CHART_DRAW_LINES); |
|
| 62 |
// nothing to do |
|
| 66 | 63 |
return true; |
| 67 | 64 |
} |
| 68 | 65 |
|
| 66 |
@Override |
|
| 67 |
public boolean saveParameters() {
|
|
| 68 |
// nothing to do |
|
| 69 |
return true; |
|
| 70 |
} |
|
| 69 | 71 |
|
| 70 | 72 |
|
| 71 | 73 |
/** |
| tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Specificites2.java (revision 605) | ||
|---|---|---|
| 1 | 1 |
package org.txm.functions.contrasts; |
| 2 | 2 |
|
| 3 |
import org.txm.core.results.TXMParameters; |
|
| 4 | 3 |
import org.txm.lexicaltable.core.functions.LexicalTable; |
| 5 | 4 |
import org.txm.lexicaltable.core.statsengine.data.ILexicalTable; |
| 6 | 5 |
import org.txm.specificities.core.statsengine.r.function.SpecificitiesR; |
| ... | ... | |
| 11 | 10 |
|
| 12 | 11 |
private ILexicalTable itable; |
| 13 | 12 |
|
| 13 |
/** |
|
| 14 |
* |
|
| 15 |
* @param table |
|
| 16 |
*/ |
|
| 14 | 17 |
public Specificites2(LexicalTable table) {
|
| 15 | 18 |
super(table); |
| 16 | 19 |
} |
| 17 | 20 |
|
| 21 |
@Override |
|
| 18 | 22 |
protected boolean _compute(boolean update) throws StatException {
|
| 19 | 23 |
itable = table.getData(); |
| 20 | 24 |
colNames = itable.getColNames().asStringsArray(); |
| tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrast.java (revision 605) | ||
|---|---|---|
| 273 | 273 |
} |
| 274 | 274 |
|
| 275 | 275 |
@Override |
| 276 |
public boolean saveParameters() {
|
|
| 277 |
// TODO Auto-generated method stub |
|
| 278 |
System.err.println("Contrast.saveParameters(): not yet implemented.");
|
|
| 279 |
return true; |
|
| 280 |
} |
|
| 281 |
|
|
| 282 |
|
|
| 283 |
@Override |
|
| 276 | 284 |
public boolean loadParameters() {
|
| 277 | 285 |
// TODO Auto-generated method stub |
| 278 | 286 |
System.err.println("Contrast.loadParameters(): not yet implemented.");
|
| tmp/org.txm.core/src/java/org/txm/objects/TxmObject.java (revision 605) | ||
|---|---|---|
| 300 | 300 |
// not implemented in TxmObjects |
| 301 | 301 |
return true; |
| 302 | 302 |
} |
| 303 |
|
|
| 304 |
|
|
| 305 |
@Override |
|
| 306 |
public boolean saveParameters() {
|
|
| 307 |
// FIXME: need to do something? |
|
| 308 |
return true; |
|
| 309 |
} |
|
| 310 |
|
|
| 311 |
|
|
| 303 | 312 |
} |
| tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 605) | ||
|---|---|---|
| 130 | 130 |
|
| 131 | 131 |
// loads parameters from local result node, current command preferences or default command preferences |
| 132 | 132 |
try {
|
| 133 |
this.loadGenericParameters();
|
|
| 134 |
this.loadParameters(); |
|
| 133 |
this.loadParametersFromAnnotations(); // auto fill from Parameter annotations
|
|
| 134 |
this.loadParameters(); // subclasses manual settings
|
|
| 135 | 135 |
} |
| 136 | 136 |
catch (Exception e) {
|
| 137 | 137 |
// TODO Auto-generated catch block |
| ... | ... | |
| 208 | 208 |
this.updateLastParameters(Parameter.COMPUTING); |
| 209 | 209 |
} |
| 210 | 210 |
|
| 211 |
|
|
| 212 |
/** |
|
| 213 |
* |
|
| 214 |
* @param parameterType |
|
| 215 |
* @throws Exception |
|
| 216 |
*/ |
|
| 217 |
protected void clearLastParameters(int parameterType) throws Exception {
|
|
| 218 |
List<Field> fields = this.getAllFields(); |
|
| 219 |
|
|
| 220 |
for (Field f : fields) {
|
|
| 221 |
Parameter parameter = f.getAnnotation(Parameter.class); |
|
| 222 |
if (parameter == null || parameter.type() != parameterType) {
|
|
| 223 |
continue; |
|
| 224 |
} |
|
| 225 |
|
|
| 226 |
String name; |
|
| 227 |
if(!parameter.key().isEmpty()) {
|
|
| 228 |
name = parameter.key(); |
|
| 229 |
} |
|
| 230 |
else {
|
|
| 231 |
name = f.getName(); |
|
| 232 |
} |
|
| 233 |
|
|
| 234 |
f.setAccessible(true); |
|
| 235 |
this.lastParameters.remove(name); |
|
| 236 |
} |
|
| 237 |
|
|
| 238 |
} |
|
| 239 |
|
|
| 240 |
|
|
| 211 | 241 |
// FIXME: not used? |
| 212 | 242 |
public HashMap<String, Object> getLastParameters() {
|
| 213 | 243 |
return lastParameters; |
| ... | ... | |
| 535 | 565 |
|
| 536 | 566 |
|
| 537 | 567 |
/** |
| 538 |
* Copies the parameters stored in the @Parameter Java class members : the pXXXXX named members to the local preferences node. |
|
| 539 |
* Commands must define this method to persist their parameters. |
|
| 540 |
* Just returns <b>true</b> if you don't want to bother with this. |
|
| 541 |
* |
|
| 568 |
* Stores the result parameter fields declared by their @Parameter annotation in the persisted result node preferences. |
|
| 569 |
* One have to implement saveParameters() to save parameters that are not of primitive types (e.g. Property, List, HashMap...) |
|
| 542 | 570 |
* @return |
| 571 |
* @throws Exception |
|
| 543 | 572 |
*/ |
| 544 |
public boolean saveParameters() throws Exception {
|
|
| 573 |
public boolean saveParametersFromAnnotations() throws Exception {
|
|
| 545 | 574 |
|
| 546 | 575 |
List<Field> fields = this.getAllFields(); |
| 547 | 576 |
|
| 548 | 577 |
for (Field f : fields) {
|
| 549 |
// if (f.getClass().equals(Integer.class)) {
|
|
| 550 |
// |
|
| 551 |
// } |
|
| 552 |
|
|
| 553 | 578 |
Parameter parameter = f.getAnnotation(Parameter.class); |
| 554 | 579 |
if (parameter == null) {
|
| 555 | 580 |
continue; |
| ... | ... | |
| 559 | 584 |
continue; // no preference key defined |
| 560 | 585 |
} |
| 561 | 586 |
|
| 587 |
// FIXME: these tests doesn't seem sufficient, need to add real primitive types? and maybe use isAssignable() rather than equals()? need to test and validate that |
|
| 562 | 588 |
// only manage simple types |
| 563 | 589 |
if (f.getClass().equals(Integer.class) || |
| 564 | 590 |
f.getClass().equals(String.class) || |
| ... | ... | |
| 579 | 605 |
return true; |
| 580 | 606 |
} |
| 581 | 607 |
|
| 608 |
/** |
|
| 609 |
* Dedicated to stores the result parameters in the persisted result node preferences. |
|
| 610 |
* One have to implement this method to save parameters that are not of primitive types (e.g. Property, List, HashMap...) |
|
| 611 |
* Parameters of primitive types are automatically saved after a computing. |
|
| 612 |
* @return |
|
| 613 |
* @throws Exception |
|
| 614 |
*/ |
|
| 615 |
public abstract boolean saveParameters() throws Exception; |
|
| 616 |
|
|
| 582 | 617 |
|
| 583 | 618 |
/** |
| 584 | 619 |
* |
| 585 | 620 |
* @return |
| 586 | 621 |
* @throws Exception |
| 587 | 622 |
*/ |
| 588 |
protected boolean loadGenericParameters() throws Exception {
|
|
| 589 |
return this.loadGenericParameters(Parameter.COMPUTING);
|
|
| 623 |
protected boolean loadParametersFromAnnotations() throws Exception {
|
|
| 624 |
return this.loadParametersFromAnnotations(Parameter.COMPUTING);
|
|
| 590 | 625 |
} |
| 591 | 626 |
|
| 592 | 627 |
/** |
| ... | ... | |
| 597 | 632 |
* @throws Exception |
| 598 | 633 |
* @throws Exception |
| 599 | 634 |
*/ |
| 600 |
protected boolean loadGenericParameters(int parameterType) throws Exception {
|
|
| 635 |
protected boolean loadParametersFromAnnotations(int parameterType) throws Exception {
|
|
| 601 | 636 |
|
| 602 | 637 |
List<Field> fields = this.getAllFields(); |
| 603 | 638 |
|
| ... | ... | |
| 1311 | 1346 |
this.updateLastParameters(); |
| 1312 | 1347 |
} |
| 1313 | 1348 |
|
| 1349 |
if (!this.saveParametersFromAnnotations()) {
|
|
| 1350 |
System.out.println("TXMResult.compute() "+this.getClass().getSimpleName()+" : failed to save parameters from annotations for " + this.getName() + ".");
|
|
| 1351 |
} |
|
| 1314 | 1352 |
if (!this.saveParameters()) {
|
| 1315 | 1353 |
System.out.println("TXMResult.compute() "+this.getClass().getSimpleName()+" : failed to save parameters for " + this.getName() + ".");
|
| 1316 | 1354 |
} |
| 1317 | 1355 |
|
| 1356 |
|
|
| 1318 | 1357 |
this.dirty = false; // the computing was successful, the result is no more dirty |
| 1319 | 1358 |
this.hasBeenComputedOnce = true; |
| 1320 | 1359 |
// FIXME: Debug |
| tmp/org.txm.progression.core/src/org/txm/progression/core/functions/Progression.java (revision 605) | ||
|---|---|---|
| 186 | 186 |
} |
| 187 | 187 |
|
| 188 | 188 |
|
| 189 |
@Override |
|
| 190 |
public boolean saveParameters() {
|
|
| 191 |
// TODO Auto-generated method stub |
|
| 192 |
System.err.println("Progression.saveParameters(): not yet implemented.");
|
|
| 193 |
return true; |
|
| 194 |
} |
|
| 195 |
|
|
| 189 | 196 |
|
| 190 | 197 |
|
| 198 |
|
|
| 191 | 199 |
@Override |
| 192 | 200 |
public boolean canCompute() {
|
| 193 | 201 |
// FIXME: not yet implemented |
| tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java (revision 605) | ||
|---|---|---|
| 36 | 36 |
protected boolean chartDirty; |
| 37 | 37 |
|
| 38 | 38 |
/** |
| 39 |
* To keep track of the parameters used for the last computing and to determine if the chart result is dirty. |
|
| 40 |
*/ |
|
| 41 |
//protected HashMap<String, Object> lastRenderingParameters = new HashMap<String, Object>(); |
|
| 42 |
|
|
| 43 |
|
|
| 44 |
/** |
|
| 45 | 39 |
* If true, the view (zoom, pan, etc.) will be reset when the chart will be updated. |
| 46 | 40 |
*/ |
| 47 | 41 |
protected boolean needsToResetView; |
| ... | ... | |
| 132 | 126 |
} |
| 133 | 127 |
|
| 134 | 128 |
@Override |
| 135 |
protected boolean loadGenericParameters() throws Exception {
|
|
| 136 |
return (super.loadGenericParameters()
|
|
| 137 |
&& super.loadGenericParameters(Parameter.RENDERING));
|
|
| 129 |
protected boolean loadParametersFromAnnotations() throws Exception {
|
|
| 130 |
return (super.loadParametersFromAnnotations()
|
|
| 131 |
&& super.loadParametersFromAnnotations(Parameter.RENDERING));
|
|
| 138 | 132 |
} |
| 139 | 133 |
|
| 140 | 134 |
|
| ... | ... | |
| 234 | 228 |
this.updateLastParameters(Parameter.RENDERING); |
| 235 | 229 |
} |
| 236 | 230 |
|
| 231 |
/** |
|
| 232 |
* Clears the parameters used for last rendering. |
|
| 233 |
* Dedicated to force a chart recreation, eg. for cloning the chart result. |
|
| 234 |
* @throws Exception |
|
| 235 |
*/ |
|
| 236 |
protected void clearLastRenderingParameters() throws Exception {
|
|
| 237 |
this.clearLastParameters(Parameter.RENDERING); |
|
| 238 |
} |
|
| 237 | 239 |
|
| 238 | 240 |
|
| 241 |
|
|
| 239 | 242 |
public final boolean isChartDirtyFromHistory() throws Exception {
|
| 240 | 243 |
|
| 241 | 244 |
List<Field> fields = this.getAllFields(); |
| ... | ... | |
| 288 | 291 |
try {
|
| 289 | 292 |
clone = (ChartResult) super.clone(); |
| 290 | 293 |
clone.chart = null; |
| 291 |
// FIXME: would be nice to clone the chart if possible |
|
| 294 |
// FIXME: would be nice to clone the chart if possible instead of clearing the last rendering parameters?
|
|
| 292 | 295 |
//clone.chart = this.chart.clone(); |
| 296 |
clone.clearLastRenderingParameters(); |
|
| 293 | 297 |
clone.chartDirty = true; |
| 294 | 298 |
} |
| 295 | 299 |
catch(Exception e) {
|
| tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/preview/Preview.java (revision 605) | ||
|---|---|---|
| 105 | 105 |
return true; |
| 106 | 106 |
} |
| 107 | 107 |
|
| 108 |
@Override |
|
| 109 |
public boolean saveParameters() {
|
|
| 110 |
// TODO Auto-generated method stub |
|
| 111 |
System.err.println("Preview.saveParameters(): not yet implemented.");
|
|
| 112 |
return true; |
|
| 113 |
} |
|
| 114 |
|
|
| 108 | 115 |
|
| 109 | 116 |
@Override |
| 110 | 117 |
protected boolean _compute(boolean update) throws Exception {
|
| tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/diagnostic/Diagnostic.java (revision 605) | ||
|---|---|---|
| 670 | 670 |
|
| 671 | 671 |
@Override |
| 672 | 672 |
public boolean loadParameters() {
|
| 673 |
// pMaxValue = this.getIntParameterValue(CQPPreferences.MAXVALUE);
|
|
| 673 |
// nothing to do
|
|
| 674 | 674 |
return true; |
| 675 | 675 |
} |
| 676 | 676 |
|
| tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/selection/Selection.java (revision 605) | ||
|---|---|---|
| 507 | 507 |
return true; |
| 508 | 508 |
} |
| 509 | 509 |
|
| 510 |
@Override |
|
| 511 |
public boolean saveParameters() {
|
|
| 512 |
// TODO Auto-generated method stub |
|
| 513 |
System.err.println("Selection.saveParameters(): not yet implemented.");
|
|
| 514 |
return true; |
|
| 515 |
} |
|
| 510 | 516 |
|
| 511 | 517 |
@Override |
| 512 | 518 |
protected boolean _compute(boolean update) throws Exception {
|
| tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/summary/Summary.java (revision 605) | ||
|---|---|---|
| 277 | 277 |
return true; |
| 278 | 278 |
} |
| 279 | 279 |
|
| 280 |
|
|
| 281 |
@Override |
|
| 282 |
public boolean saveParameters() {
|
|
| 283 |
// TODO Auto-generated method stub |
|
| 284 |
System.err.println("Summary.saveParameters(): not yet implemented.");
|
|
| 285 |
return true; |
|
| 286 |
} |
|
| 287 |
|
|
| 280 | 288 |
|
| 281 | 289 |
@Override |
| 282 | 290 |
protected boolean _compute(boolean update) throws Exception {
|
| tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java (revision 605) | ||
|---|---|---|
| 722 | 722 |
public boolean canCompute() {
|
| 723 | 723 |
return getCorpus() != null; |
| 724 | 724 |
} |
| 725 |
|
|
| 726 |
@Override |
|
| 727 |
public boolean setParameters(TXMParameters parameters) {
|
|
| 728 |
// TODO Auto-generated method stub |
|
| 729 |
System.err.println("Partition.setParameters(): not yet implemented.");
|
|
| 730 |
return true; |
|
| 731 |
} |
|
| 732 |
|
|
| 733 | 725 |
|
| 734 | 726 |
@Override |
| 735 | 727 |
protected boolean _compute(boolean update) throws Exception {
|
| ... | ... | |
| 742 | 734 |
// TODO Auto-generated method stub |
| 743 | 735 |
return false; |
| 744 | 736 |
} |
| 737 |
|
|
| 745 | 738 |
} |
| tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCCAChartCreator.java (revision 605) | ||
|---|---|---|
| 93 | 93 |
@Override |
| 94 | 94 |
public void updateChart(ChartResult result) {
|
| 95 | 95 |
|
| 96 |
|
|
| 96 |
CA ca = (CA) result; |
|
| 97 | 97 |
JFreeChart chart = (JFreeChart)result.getChart(); |
| 98 | 98 |
|
| 99 | 99 |
FCAItemSelectionRenderer renderer = (FCAItemSelectionRenderer) chart.getXYPlot().getRenderer(); |
| ... | ... | |
| 106 | 106 |
// Create the limits border |
| 107 | 107 |
this.createCAFactorialMapChartLimitsBorder(chart); |
| 108 | 108 |
|
| 109 |
this.updateChartCAFactorialMapSetDimensions(chart, (CA) result, |
|
| 110 |
result.getIntParameterValue(CAPreferences.FIRST_DIMENSION), |
|
| 111 |
result.getIntParameterValue(CAPreferences.SECOND_DIMENSION)); |
|
| 109 |
this.updateChartCAFactorialMapSetDimensions(ca); |
|
| 112 | 110 |
|
| 113 | 111 |
|
| 114 | 112 |
|
| ... | ... | |
| 332 | 330 |
|
| 333 | 331 |
|
| 334 | 332 |
@Override |
| 335 |
public void updateChartCAFactorialMapSetDimensions(Object chart, CA ca, int dimension1, int dimension2) {
|
|
| 333 |
public void updateChartCAFactorialMapSetDimensions(CA ca) {
|
|
| 336 | 334 |
|
| 335 |
int dimension1 = ca.getFirstDimension(); |
|
| 336 |
int dimension2 = ca.getSecondDimension(); |
|
| 337 |
|
|
| 338 |
JFreeChart chart = (JFreeChart) ca.getChart(); |
|
| 339 |
|
|
| 337 | 340 |
// Modify data set |
| 338 | 341 |
((FCAXYDataset) ((JFreeChart) chart).getXYPlot().getDataset()).setAxis1(dimension1); |
| 339 | 342 |
((FCAXYDataset) ((JFreeChart) chart).getXYPlot().getDataset()).setAxis2(dimension2); |
| tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/RCAChartCreator.java (revision 605) | ||
|---|---|---|
| 173 | 173 |
|
| 174 | 174 |
|
| 175 | 175 |
@Override |
| 176 |
public void updateChartCAFactorialMapSetDimensions(Object chart, CA ca, int dimension1, int dimension2) {
|
|
| 176 |
public void updateChartCAFactorialMapSetDimensions(CA ca) {
|
|
| 177 | 177 |
// FIXME: not implemented |
| 178 | 178 |
Log.severe(this.getClass() + ".updateChartCAFactorialMapSetDimensions(): Not yet implemented."); //$NON-NLS-1$ |
| 179 | 179 |
} |
| tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/base/CAChartCreator.java (revision 605) | ||
|---|---|---|
| 46 | 46 |
* @param dimension1 |
| 47 | 47 |
* @param dimension2 |
| 48 | 48 |
*/ |
| 49 |
public abstract void updateChartCAFactorialMapSetDimensions(Object chart, CA ca, int dimension1, int dimension2);
|
|
| 49 |
public abstract void updateChartCAFactorialMapSetDimensions(CA ca);
|
|
| 50 | 50 |
|
| 51 | 51 |
|
| 52 | 52 |
} |
| tmp/org.txm.ca.core/src/org/txm/ca/core/preferences/CAPreferences.java (revision 605) | ||
|---|---|---|
| 24 | 24 |
/** Lexical table VMAX. */ |
| 25 | 25 |
public static final String V_MAX = "lt_vmax"; //$NON-NLS-1$ |
| 26 | 26 |
|
| 27 |
public static final String SHOW_INDIVIDUALS = "chart_show_individuals"; //$NON-NLS-1$ |
|
| 28 |
public static final String SHOW_VARIABLES = "chart_show_variables"; //$NON-NLS-1$ |
|
| 29 |
public static final String SHOW_POINT_SHAPES = "chart_show_point_shapes"; //$NON-NLS-1$ |
|
| 30 |
|
|
| 31 | 27 |
/** The Constant QUALITYDISPLAY. */ |
| 32 | 28 |
public static final String QUALITY_DISPLAY_FORMAT = "quality_display_format"; //$NON-NLS-1$ |
| 33 | 29 |
|
| ... | ... | |
| 51 | 47 |
|
| 52 | 48 |
public static final String FIRST_DIMENSION = "first_dimension"; //$NON-NLS-1$ |
| 53 | 49 |
public static final String SECOND_DIMENSION = "second_dimension"; //$NON-NLS-1$ |
| 50 |
public static final String SHOW_INDIVIDUALS = "chart_show_individuals"; //$NON-NLS-1$ |
|
| 51 |
public static final String SHOW_VARIABLES = "chart_show_variables"; //$NON-NLS-1$ |
|
| 52 |
public static final String SHOW_POINT_SHAPES = "chart_show_point_shapes"; //$NON-NLS-1$ |
|
| 54 | 53 |
|
| 55 | 54 |
|
| 56 | 55 |
|
| tmp/org.txm.ca.core/src/org/txm/ca/core/functions/CA.java (revision 605) | ||
|---|---|---|
| 85 | 85 |
/** The use Factomine R: change this only if you want to use the default R CA package. */ |
| 86 | 86 |
boolean useFactoMineR = true; |
| 87 | 87 |
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 88 | 91 |
/** |
| 89 | 92 |
* First dimension. |
| 90 | 93 |
*/ |
| 91 |
@Parameter |
|
| 92 |
protected Integer pFirstDimension = 1;
|
|
| 94 |
@Parameter(key=CAPreferences.FIRST_DIMENSION)
|
|
| 95 |
protected int firstDimension = 1;
|
|
| 93 | 96 |
|
| 94 | 97 |
/** |
| 95 | 98 |
* Second dimension. |
| 96 | 99 |
*/ |
| 97 |
@Parameter |
|
| 98 |
protected Integer pSecondDimension = 2;
|
|
| 100 |
@Parameter(key=CAPreferences.SECOND_DIMENSION)
|
|
| 101 |
protected int secondDimension = 2;
|
|
| 99 | 102 |
|
| 103 |
|
|
| 100 | 104 |
/** |
| 101 |
* Create a new empty CA. |
|
| 105 |
* To show/hide individuals. |
|
| 106 |
*/ |
|
| 107 |
@Parameter(key=CAPreferences.SHOW_INDIVIDUALS) |
|
| 108 |
protected boolean showIndividuals; |
|
| 109 |
|
|
| 110 |
/** |
|
| 111 |
* To show/hide variables. |
|
| 112 |
*/ |
|
| 113 |
@Parameter(key=CAPreferences.SHOW_VARIABLES) |
|
| 114 |
protected boolean showVariables; |
|
| 115 |
|
|
| 116 |
/** |
|
| 117 |
* To show/hide the point shapes or only the labels. |
|
| 118 |
*/ |
|
| 119 |
@Parameter(key=CAPreferences.SHOW_POINT_SHAPES) |
|
| 120 |
protected boolean showPointShapes; |
|
| 121 |
|
|
| 122 |
|
|
| 123 |
|
|
| 124 |
|
|
| 125 |
/** |
|
| 126 |
* Creates a new empty CA. |
|
| 102 | 127 |
* |
| 103 | 128 |
* @param lexicalTable the lexical table |
| 104 | 129 |
* @throws StatException stat exception if the structure can not be created in R statistics engine. |
| ... | ... | |
| 117 | 142 |
|
| 118 | 143 |
if (useFactoMineR) {
|
| 119 | 144 |
r_ca = new FactoMineRCA(this.getLexicalTable().getData()); |
| 120 |
} else {
|
|
| 145 |
} |
|
| 146 |
else {
|
|
| 121 | 147 |
r_ca = new org.txm.ca.core.statsengine.r.functions.CA(this.getLexicalTable().getData()); |
| 122 | 148 |
} |
| 123 | 149 |
|
| 124 | 150 |
r_ca.compute(); |
| 125 | 151 |
|
| 126 | 152 |
// in case the lexical table changes |
| 127 |
getColNames(); |
|
| 153 |
this.getColNames();
|
|
| 128 | 154 |
// in case the lexical table changes |
| 129 |
getRowNames(); |
|
| 155 |
this.getRowNames();
|
|
| 130 | 156 |
|
| 131 | 157 |
return true; |
| 132 | 158 |
|
| ... | ... | |
| 418 | 444 |
* @return the first dimension |
| 419 | 445 |
*/ |
| 420 | 446 |
public int getFirstDimension() {
|
| 421 |
return pFirstDimension;
|
|
| 447 |
return firstDimension;
|
|
| 422 | 448 |
} |
| 423 | 449 |
|
| 424 | 450 |
/** |
| ... | ... | |
| 647 | 673 |
* @return the second dimension |
| 648 | 674 |
*/ |
| 649 | 675 |
public int getSecondDimension() {
|
| 650 |
return pSecondDimension;
|
|
| 676 |
return secondDimension;
|
|
| 651 | 677 |
} |
| 652 | 678 |
|
| 653 | 679 |
@Override |
| 654 | 680 |
public String getSimpleName() {
|
| 655 |
if (pFirstDimension != null) {
|
|
| 656 |
return getParent().getName() + " " + this.pFirstDimension + "," + this.pSecondDimension + ")"; |
|
| 657 |
} |
|
| 658 |
else {
|
|
| 659 |
return getParent().getName(); |
|
| 660 |
} |
|
| 681 |
return getParent().getName() + " " + this.firstDimension + "," + this.secondDimension + ")"; |
|
| 661 | 682 |
} |
| 662 | 683 |
|
| 663 | 684 |
@Override |
| 664 | 685 |
public String getDetails() {
|
| 665 |
return "Fmin = " + this.getLexicalTable().getFMin();
|
|
| 686 |
return "FMin = " + this.getLexicalTable().getFMin();
|
|
| 666 | 687 |
} |
| 667 | 688 |
|
| 668 | 689 |
@Override |
| ... | ... | |
| 819 | 840 |
return |
| 820 | 841 |
this.parent != null |
| 821 | 842 |
&& this.getLexicalTable().getNColumns() > 3 |
| 822 |
&& this.pFirstDimension > 0
|
|
| 823 |
&& this.pSecondDimension > 0
|
|
| 824 |
&& this.pFirstDimension != this.pSecondDimension
|
|
| 843 |
&& this.firstDimension > 0
|
|
| 844 |
&& this.secondDimension > 0
|
|
| 845 |
&& this.firstDimension != this.secondDimension
|
|
| 825 | 846 |
; |
| 826 | 847 |
} |
| 827 | 848 |
|
| 828 | 849 |
@Override |
| 829 | 850 |
public boolean saveParameters() {
|
| 830 |
// TODO Auto-generated method stub |
|
| 831 |
System.err.println("CA.saveParameters(): not yet implemented.");
|
|
| 832 |
this.saveParameter(CAPreferences.FIRST_DIMENSION, pFirstDimension); |
|
| 833 |
this.saveParameter(CAPreferences.SECOND_DIMENSION, pSecondDimension); |
|
| 851 |
// nothing to do |
|
| 834 | 852 |
return true; |
| 835 | 853 |
} |
| 836 | 854 |
|
| ... | ... | |
| 843 | 861 |
|
| 844 | 862 |
@Override |
| 845 | 863 |
public boolean loadParameters() {
|
| 846 |
System.err.println("CA.loadParameters(): not yet implemented.");
|
|
| 864 |
// nothing to do
|
|
| 847 | 865 |
return true; |
| 848 | 866 |
} |
| 849 | 867 |
} |
| tmp/org.txm.ca.core/src/org/txm/ca/core/functions/Eigenvalues.java (revision 605) | ||
|---|---|---|
| 31 | 31 |
return (CA) this.parent; |
| 32 | 32 |
} |
| 33 | 33 |
|
| 34 |
/* (non-Javadoc) |
|
| 35 |
* @see org.txm.core.results.TXMResult#getName() |
|
| 36 |
*/ |
|
| 37 | 34 |
@Override |
| 38 | 35 |
public String getName() {
|
| 39 | 36 |
// TODO Auto-generated method stub |
| 40 | 37 |
return ""; |
| 41 | 38 |
} |
| 42 | 39 |
|
| 43 |
/* (non-Javadoc) |
|
| 44 |
* @see org.txm.core.results.TXMResult#getSimpleName() |
|
| 45 |
*/ |
|
| 46 | 40 |
@Override |
| 47 | 41 |
public String getSimpleName() {
|
| 48 | 42 |
// TODO Auto-generated method stub |
| 49 |
return null;
|
|
| 43 |
return "";
|
|
| 50 | 44 |
} |
| 51 | 45 |
|
| 52 |
/* (non-Javadoc) |
|
| 53 |
* @see org.txm.core.results.TXMResult#getDetails() |
|
| 54 |
*/ |
|
| 55 | 46 |
@Override |
| 56 | 47 |
public String getDetails() {
|
| 57 | 48 |
// TODO Auto-generated method stub |
| 58 |
return null;
|
|
| 49 |
return "";
|
|
| 59 | 50 |
} |
| 60 | 51 |
|
| 61 |
/* (non-Javadoc) |
|
| 62 |
* @see org.txm.core.results.TXMResult#clean() |
|
| 63 |
*/ |
|
| 64 | 52 |
@Override |
| 65 | 53 |
public void clean() {
|
| 66 | 54 |
// TODO Auto-generated method stub |
| tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/preferences/LexicalTablePreferences.java (revision 605) | ||
|---|---|---|
| 24 | 24 |
/** |
| 25 | 25 |
* The minimal occurrence frequency to show in the table. |
| 26 | 26 |
*/ |
| 27 |
public static final String F_MIN_FILTER = PREFERENCES_PREFIX + "f_min"; //$NON-NLS-1$
|
|
| 27 |
public static final String F_MIN = 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_FILTER = PREFERENCES_PREFIX + "v_max"; //$NON-NLS-1$
|
|
| 32 |
public static final String V_MAX = PREFERENCES_PREFIX + "v_max"; //$NON-NLS-1$ |
|
| 33 | 33 |
|
| 34 | 34 |
/** |
| 35 | 35 |
* The property to count |
| 36 | 36 |
*/ |
| 37 |
public static final String PROPERTY = PREFERENCES_PREFIX + "property_name"; //$NON-NLS-1$
|
|
| 37 |
public static final String PROPERTY = PREFERENCES_PREFIX + "property"; //$NON-NLS-1$ |
|
| 38 | 38 |
|
| 39 | 39 |
/** |
| 40 | 40 |
* if true the table computed from an Index will use all the occurrences from the corpus to add the #RESTE# line composed of the others words |
| ... | ... | |
| 44 | 44 |
@Override |
| 45 | 45 |
public void initializeDefaultPreferences() {
|
| 46 | 46 |
Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE); |
| 47 |
preferences.putInt(F_MIN_FILTER, 2);
|
|
| 48 |
preferences.putInt(V_MAX_FILTER, 200);
|
|
| 47 |
preferences.putInt(F_MIN, 2); |
|
| 48 |
preferences.putInt(V_MAX, 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 605) | ||
|---|---|---|
| 53 | 53 |
/** |
| 54 | 54 |
* Minimum frequency. |
| 55 | 55 |
*/ |
| 56 |
@Parameter(key=LexicalTablePreferences.F_MIN_FILTER)
|
|
| 57 |
private Integer pFMinFilter;
|
|
| 56 |
@Parameter(key=LexicalTablePreferences.F_MIN) |
|
| 57 |
private int pFMinFilter;
|
|
| 58 | 58 |
|
| 59 | 59 |
/** |
| 60 | 60 |
* Maximum number of lines. |
| 61 | 61 |
*/ |
| 62 |
@Parameter(key=LexicalTablePreferences.V_MAX_FILTER) |
|
| 63 |
private Integer pVMaxFilter; |
|
| 62 |
@Parameter(key=LexicalTablePreferences.V_MAX) |
|
| 63 |
private int pVMaxFilter; |
|
| 64 |
|
|
| 64 | 65 |
/** |
| 65 | 66 |
* if true and if built with an Index, a ##REST## lien is added containing the frequencies of the other "words" |
| 66 | 67 |
*/ |
| 67 | 68 |
@Parameter(key=LexicalTablePreferences.USE_ALL_OCCURRENCES) |
| 68 |
protected Boolean pUseAllOccurrences; |
|
Formats disponibles : Unified diff