Révision 718
| tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/StructuralUnitProperty.java (revision 718) | ||
|---|---|---|
| 27 | 27 |
// |
| 28 | 28 |
package org.txm.searchengine.cqp.corpus; |
| 29 | 29 |
|
| 30 |
import java.io.Serializable; |
|
| 31 | 30 |
import java.util.ArrayList; |
| 32 | 31 |
import java.util.Collections; |
| 33 | 32 |
import java.util.List; |
| ... | ... | |
| 38 | 37 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
| 39 | 38 |
import org.txm.searchengine.cqp.corpus.query.Query; |
| 40 | 39 |
import org.txm.utils.logger.Log; |
| 41 |
// TODO: Auto-generated Javadoc |
|
| 40 |
|
|
| 42 | 41 |
/** |
| 43 | 42 |
* A Property on the structural units the corpus. Represents a |
| 44 | 43 |
* <strong>type</strong>, not a the value for a specific unit. |
| tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/WordProperty.java (revision 718) | ||
|---|---|---|
| 33 | 33 |
public static List<Property> fromStringToList(Corpus corpus, String s) {
|
| 34 | 34 |
ArrayList<Property> properties = new ArrayList<Property>(); |
| 35 | 35 |
if (s == null) return properties; |
| 36 |
|
|
| 36 |
|
|
| 37 | 37 |
String[] split = s.split("\t");
|
| 38 | 38 |
for (String s2 : split) {
|
| 39 | 39 |
try {
|
| ... | ... | |
| 50 | 50 |
} |
| 51 | 51 |
|
| 52 | 52 |
public static String fromListToPreferenceString(List<Property> pProperties) {
|
| 53 |
if (pProperties == null){
|
|
| 54 |
return ""; |
|
| 55 |
} |
|
| 56 |
|
|
| 53 | 57 |
ArrayList<String> names = new ArrayList<String>(); |
| 58 |
|
|
| 54 | 59 |
for (Property p : pProperties) {
|
| 55 | 60 |
names.add(p.getName()); |
| 56 | 61 |
} |
| 62 |
|
|
| 57 | 63 |
return StringUtils.join(names, "\t"); |
| 58 | 64 |
} |
| 59 | 65 |
} |
| 60 | 66 | |
| tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java (revision 718) | ||
|---|---|---|
| 1597 | 1597 |
@Override |
| 1598 | 1598 |
public boolean saveParameters() {
|
| 1599 | 1599 |
|
| 1600 |
if (pQuery != null) {
|
|
| 1601 |
this.saveParameter(ConcordancePreferences.QUERY, pQuery.getQueryString()); |
|
| 1602 |
} |
|
| 1603 |
|
|
| 1600 | 1604 |
this.saveParameter(ConcordancePreferences.KEYWORD_VIEW_PROPERTIES, WordProperty.fromListToPreferenceString(this.pViewKeywordProperties)); |
| 1601 | 1605 |
|
| 1602 | 1606 |
this.saveParameter(ConcordancePreferences.LEFT_VIEW_PROPERTIES, WordProperty.fromListToPreferenceString(this.pViewLeftProperties)); |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 718) | ||
|---|---|---|
| 582 | 582 |
this.setPartName(this.getResult().getName()); |
| 583 | 583 |
firePropertyChange(TXMEditor.PROP_DIRTY); |
| 584 | 584 |
|
| 585 |
if(!update) {
|
|
| 585 |
//MD remove 'if (!update) {...}'
|
|
| 586 | 586 |
// FIXME: debug |
| 587 | 587 |
System.err.println("TXMEditor.refresh(): auto updating editor from result.");
|
| 588 |
this.autoUpdateEditorFieldsFromResult(); // auto update from Parameter annotations |
|
| 588 |
this.autoUpdateEditorFieldsFromResult(update); // auto update from Parameter annotations
|
|
| 589 | 589 |
|
| 590 | 590 |
// FIXME: debug |
| 591 |
System.err.println("TXMEditor.refresh(): manually updating editor from result.");
|
|
| 591 |
System.err.println("TXMEditor.refresh(): subclass editor updating editor from result.");
|
|
| 592 | 592 |
this.updateEditorFromResult(update); // subclasses manual settings |
| 593 |
} |
|
| 594 | 593 |
|
| 595 | 594 |
//this.__updateEditorFromResult(update); // essentially for ChartEditor |
| 596 | 595 |
|
| ... | ... | |
| 604 | 603 |
|
| 605 | 604 |
/** |
| 606 | 605 |
* Synchronizes the result with editor parameters. |
| 606 |
* <p> |
|
| 607 | 607 |
* It should be called or called itself in the UI thread when accessing Widget parameters. |
| 608 | 608 |
*/ |
| 609 | 609 |
public abstract void updateResultFromEditor(); |
| ... | ... | |
| 611 | 611 |
/** |
| 612 | 612 |
* Synchronizes the editor with the result. |
| 613 | 613 |
* Dedicated to dynamically change the editor components from the stored result. |
| 614 |
* <p> |
|
| 615 |
* Use this method if you need to save parameter with Type not managed by the autoUpdateEditorFieldsFromResult method |
|
| 614 | 616 |
*/ |
| 615 | 617 |
public abstract void updateEditorFromResult(boolean update); |
| 616 | 618 |
|
| ... | ... | |
| 618 | 620 |
|
| 619 | 621 |
/** |
| 620 | 622 |
* Updates the editor fields from result and declared parameters annotations. |
| 621 |
* Manages these widgets at this moment: ToolItem, FloatSpinner, Spinner, Text, Button, Viewer, PropertiesSelector, NewNavigationWidget. |
|
| 623 |
* <p> |
|
| 624 |
* Manages these widgets at this moment: |
|
| 625 |
* ToolItem+Boolean, |
|
| 626 |
* FloatSpinner+Float, |
|
| 627 |
* Spinner+Integer, |
|
| 628 |
* Text+String, |
|
| 629 |
* Button+Boolean, Viewer+any, PropertiesSelector+<P extends Property>, NewNavigationWidget+Integer. |
|
| 622 | 630 |
*/ |
| 623 |
public void autoUpdateEditorFieldsFromResult() {
|
|
| 631 |
public void autoUpdateEditorFieldsFromResult(boolean update) {
|
|
| 624 | 632 |
|
| 625 | 633 |
List<Field> fields = this.getAllParameterFields(); |
| 626 | 634 |
|
| ... | ... | |
| 654 | 662 |
// FIXME: fire a new selection changed event leading to a cyclic recursion... |
| 655 | 663 |
// FIXME: became useless? since there is now a test above on !this.getResult().hasParameterChanged(parameter.key(), this.lastComputingParameters) |
| 656 | 664 |
((Viewer)object).setData("ignore", true); //$NON-NLS-1$
|
| 657 |
((Viewer)object).setSelection(new StructuredSelection(value), true); |
|
| 665 |
if (value instanceof StructuredSelection) { // no need to create a new StructuredSelection
|
|
| 666 |
((Viewer)object).setSelection((StructuredSelection)value, true); |
|
| 667 |
} else {
|
|
| 668 |
((Viewer)object).setSelection(new StructuredSelection(value), true); |
|
| 669 |
} |
|
| 658 | 670 |
((Viewer)object).setData("ignore", false); //$NON-NLS-1$
|
| 659 | 671 |
} |
| 660 | 672 |
} |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PropertiesSelector.java (revision 718) | ||
|---|---|---|
| 77 | 77 |
|
| 78 | 78 |
/** The prop separator. */ |
| 79 | 79 |
String propSeparator = " ; "; //$NON-NLS-1$ |
| 80 |
|
|
| 80 |
|
|
| 81 | 81 |
/** |
| 82 | 82 |
* Instantiates a new properties selector. |
| 83 | 83 |
* |
| tmp/org.txm.jodconverter.core/resources/documents/test.txt (revision 718) | ||
|---|---|---|
| 1 |
Test document |
|
| tmp/org.txm.jodconverter.core/resources/documents/test.html (revision 718) | ||
|---|---|---|
| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|
| 2 |
<HTML> |
|
| 3 |
<HEAD> |
|
| 4 |
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8"> |
|
| 5 |
<TITLE></TITLE> |
|
| 6 |
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Linux)"> |
|
| 7 |
<META NAME="AUTHOR" CONTENT="Mirko Nasato"> |
|
| 8 |
<META NAME="CREATED" CONTENT="20080712;15031700"> |
|
| 9 |
<META NAME="CHANGEDBY" CONTENT="Mirko Nasato"> |
|
| 10 |
<META NAME="CHANGED" CONTENT="20080712;15034700"> |
|
| 11 |
<STYLE TYPE="text/css"> |
|
| 12 |
<!-- |
|
| 13 |
@page { margin: 2cm }
|
|
| 14 |
P { margin-bottom: 0.21cm }
|
|
| 15 |
P.western { so-language: en-GB }
|
|
| 16 |
--> |
|
| 17 |
</STYLE> |
|
| 18 |
</HEAD> |
|
| 19 |
<BODY LANG="en-GB" DIR="LTR"> |
|
| 20 |
<P CLASS="western" STYLE="margin-bottom: 0cm">Test document</P> |
|
| 21 |
</BODY> |
|
| 22 |
</HTML> |
|
| tmp/org.txm.jodconverter.core/resources/documents/test.csv (revision 718) | ||
|---|---|---|
| 1 |
"Test spreadsheet" |
|
| tmp/org.txm.jodconverter.core/resources/documents/test.rtf (revision 718) | ||
|---|---|---|
| 1 |
{\rtf1\ansi\deff0\adeflang1025
|
|
| 2 |
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\fnil\fprq2\fcharset0 DejaVu Sans;}}
|
|
| 3 |
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
|
|
| 4 |
{\stylesheet{\s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang2057\loch\f0\fs24\lang2057\snext1 Normal;}
|
|
| 5 |
{\s2\sb240\sa120\keepn\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\afs28\lang255\ltrch\dbch\langfe255\hich\f2\fs28\lang2057\loch\f2\fs28\lang2057\sbasedon1\snext3 Heading;}
|
|
| 6 |
{\s3\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang2057\loch\f0\fs24\lang2057\sbasedon1\snext3 Body Text;}
|
|
| 7 |
{\s4\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang2057\loch\f0\fs24\lang2057\sbasedon3\snext4 List;}
|
|
| 8 |
{\s5\sb120\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ai\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang2057\i\loch\f0\fs24\lang2057\i\sbasedon1\snext5 caption;}
|
|
| 9 |
{\s6\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang2057\loch\f0\fs24\lang2057\sbasedon1\snext6 Index;}
|
|
| 10 |
} |
|
| 11 |
{\info{\author Mirko Nasato}{\creatim\yr2008\mo7\dy12\hr15\min3}{\author Mirko Nasato}{\revtim\yr2008\mo7\dy12\hr15\min3}{\printim\yr0\mo0\dy0\hr0\min0}{\comment StarWriter}{\vern6800}}\deftab709
|
|
| 12 |
{\*\pgdsctbl
|
|
| 13 |
{\pgdsc0\pgdscuse195\pgwsxn11905\pghsxn16837\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0 Standard;}}
|
|
| 14 |
\paperh16837\paperw11905\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\pgwsxn11905\pghsxn16837\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc |
|
| 15 |
\pard\plain \ltrpar\s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang2057\loch\f0\fs24\lang2057 {\rtlch \ltrch\loch\f0\fs24\lang2057\i0\b0 Test document}
|
|
| 16 |
\par } |
|
| tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java (revision 718) | ||
|---|---|---|
| 44 | 44 |
import org.rosuda.REngine.REXPMismatchException; |
| 45 | 45 |
import org.txm.concordance.core.functions.Concordance; |
| 46 | 46 |
import org.txm.concordance.core.functions.Line; |
| 47 |
import org.txm.concordance.core.preferences.ConcordancePreferences; |
|
| 47 | 48 |
import org.txm.cooccurrence.core.functions.comparators.CLineComparator; |
| 48 | 49 |
import org.txm.cooccurrence.core.messages.CooccurrenceCoreMessages; |
| 49 | 50 |
import org.txm.cooccurrence.core.preferences.CooccurrencePreferences; |
| ... | ... | |
| 1544 | 1545 |
|
| 1545 | 1546 |
@Override |
| 1546 | 1547 |
public boolean saveParameters() {
|
| 1547 |
// TODO Auto-generated method stub |
|
| 1548 |
System.err.println("Cooccurrence.saveParameters(): not yet implemented.");
|
|
| 1548 |
this.saveParameter(CooccurrencePreferences.PROPERTIES, WordProperty.fromListToPreferenceString(this.pProperties)); |
|
| 1549 |
|
|
| 1550 |
if (pQuery != null) {
|
|
| 1551 |
this.saveParameter(CooccurrencePreferences.QUERY, pQuery.getQueryString()); |
|
| 1552 |
} |
|
| 1553 |
|
|
| 1554 |
if (pStructuralUnitLimit != null) {
|
|
| 1555 |
this.saveParameter(CooccurrencePreferences.STRUCTURE_LIMIT, this.pStructuralUnitLimit.getName()); |
|
| 1556 |
} |
|
| 1557 |
|
|
| 1549 | 1558 |
return true; |
| 1550 | 1559 |
} |
| 1551 |
|
|
| 1552 | 1560 |
|
| 1553 |
|
|
| 1554 |
|
|
| 1555 | 1561 |
public void setQuery(Query query) {
|
| 1556 | 1562 |
this.pQuery = query; |
| 1557 | 1563 |
} |
Formats disponibles : Unified diff