Revision 618
tmp/org.txm.searchengine.cqp.core/src/org/txm/functions/preview/Preview.java (revision 618) | ||
---|---|---|
8 | 8 |
import org.txm.core.results.TXMResult; |
9 | 9 |
import org.txm.searchengine.cqp.corpus.Corpus; |
10 | 10 |
import org.txm.searchengine.cqp.corpus.Partition; |
11 |
import org.txm.searchengine.cqp.corpus.Property; |
|
12 | 11 |
import org.txm.searchengine.cqp.corpus.query.Match; |
13 | 12 |
|
14 | 13 |
public class Preview extends TXMResult { |
15 | 14 |
|
16 | 15 |
private Corpus corpus; |
17 | 16 |
private Partition partition; |
18 |
private Property prop; |
|
19 | 17 |
|
20 | 18 |
private int n; |
21 | 19 |
|
tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java (revision 618) | ||
---|---|---|
88 | 88 |
/** The n lines. */ |
89 | 89 |
protected int nLines; |
90 | 90 |
|
91 |
|
|
92 |
/** The query result. */ |
|
93 |
private QueryResult queryResult; |
|
94 |
/** The symbol. */ |
|
95 |
private String symbol; |
|
96 |
|
|
97 |
private ArrayList<Property> availableKeywordViewProperties; |
|
98 |
|
|
99 |
private ArrayList<Property> availableLeftViewProperties; |
|
100 |
|
|
101 |
private ArrayList<Property> availableRightViewProperties; |
|
102 |
|
|
103 |
private ArrayList<Property> availableLeftSortProperties; |
|
104 |
|
|
105 |
private ArrayList<Property> availableKeywordSortProperties; |
|
106 |
|
|
107 |
private ArrayList<Property> availableRightSortProperties; |
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
91 | 112 |
/** The keyword analysis properties */ |
92 | 113 |
@Parameter |
93 | 114 |
protected List<Property> pAnalysisKeywordProperties; |
115 |
|
|
94 | 116 |
/** The analysis properties */ |
95 | 117 |
@Parameter |
96 | 118 |
protected List<Property> pAnalysisLeftProperties; |
119 |
|
|
97 | 120 |
/** The ReferncePattern sort properties */ |
98 | 121 |
@Parameter |
99 | 122 |
protected ReferencePattern pAnalysisRefPattern; |
123 |
|
|
100 | 124 |
/** The right c analysis property. */ |
101 | 125 |
@Parameter |
102 | 126 |
protected List<Property> pAnalysisRightProperties; |
127 |
|
|
103 | 128 |
/** used to limit context to the matches of the CQL limit query */ |
104 | 129 |
@Parameter(key=ConcordancePreferences.LIMITCQL) |
105 | 130 |
protected String pLimitCQL; |
131 |
|
|
106 | 132 |
/** The left context size. */ |
107 | 133 |
@Parameter(key=ConcordancePreferences.LEFT_CONTEXT_SIZE) |
108 | 134 |
protected Integer pLeftContextSize; |
135 |
|
|
109 | 136 |
/** The query. */ |
110 | 137 |
@Parameter |
111 | 138 |
protected Query pQuery; |
139 |
|
|
112 | 140 |
/** The right context size. */ |
113 | 141 |
@Parameter(key=ConcordancePreferences.RIGHT_CONTEXT_SIZE) |
114 | 142 |
protected Integer pRightContextSize; |
143 |
|
|
115 | 144 |
/** The top line index shown and the number of lines to show per page */ |
116 | 145 |
@Parameter(key=ConcordancePreferences.TOP_INDEX) |
117 | 146 |
protected Integer pTopIndex; |
147 |
|
|
118 | 148 |
@Parameter(key=ConcordancePreferences.N_LINE_PER_PAGE) |
119 | 149 |
protected Integer pNLinesPerPage; |
150 |
|
|
120 | 151 |
/** The keyword view properties. */ |
121 | 152 |
@Parameter |
122 | 153 |
protected List<Property> pViewKeywordProperties; |
154 |
|
|
123 | 155 |
/** The left c view properties. */ |
124 | 156 |
@Parameter |
125 | 157 |
protected List<Property> pViewLeftProperties; |
158 |
|
|
126 | 159 |
/** The reference pattern. */ |
127 | 160 |
@Parameter |
128 | 161 |
protected ReferencePattern pViewRefPattern; |
162 |
|
|
129 | 163 |
/** The right c view properties. */ |
130 | 164 |
@Parameter |
131 | 165 |
protected List<Property> pViewRightProperties; |
166 |
|
|
132 | 167 |
// /** The view properties. */ |
133 | 168 |
// private List<Property> pViewKeywordProperties; // contains all the view properties |
134 | 169 |
|
135 |
/** The query result. */ |
|
136 |
private QueryResult queryResult; |
|
137 |
/** The symbol. */ |
|
138 |
private String symbol; |
|
139 |
|
|
140 |
private ArrayList<Property> availableKeywordViewProperties; |
|
141 |
|
|
142 |
private ArrayList<Property> availableLeftViewProperties; |
|
143 |
|
|
144 |
private ArrayList<Property> availableRightViewProperties; |
|
145 |
|
|
146 |
private ArrayList<Property> availableLeftSortProperties; |
|
147 |
|
|
148 |
private ArrayList<Property> availableKeywordSortProperties; |
|
149 |
|
|
150 |
private ArrayList<Property> availableRightSortProperties; |
|
151 |
|
|
152 |
|
|
153 | 170 |
/** |
154 | 171 |
* |
155 | 172 |
* @param corpus |
... | ... | |
175 | 192 |
this.queryResult = this.getCorpus().query(pQuery, pQuery.getQueryString().replace(" ", "_") + "_concordance", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
176 | 193 |
|
177 | 194 |
this.nLines = queryResult.getNMatch(); |
178 |
this.lines = new ArrayList<Line>(Collections.nCopies(nLines, |
|
179 |
(Line) null));// lines are lazily fetched; we force an |
|
195 |
this.lines = new ArrayList<Line>(Collections.nCopies(nLines, (Line) null));// lines are lazily fetched; we force an |
|
180 | 196 |
|
181 | 197 |
return true; |
182 | 198 |
} |
... | ... | |
1560 | 1576 |
@Override |
1561 | 1577 |
public boolean saveParameters() { |
1562 | 1578 |
|
1563 |
this.saveParameter(ConcordancePreferences.TOP_INDEX, this.pTopIndex); |
|
1564 |
this.saveParameter(ConcordancePreferences.N_LINE_PER_PAGE, this.pNLinesPerPage); |
|
1565 |
|
|
1566 |
this.saveParameter(ConcordancePreferences.LEFT_CONTEXT_SIZE, this.pLeftContextSize); |
|
1567 |
this.saveParameter(ConcordancePreferences.RIGHT_CONTEXT_SIZE, this.pRightContextSize); |
|
1568 |
|
|
1569 |
this.saveParameter(ConcordancePreferences.LIMITCQL, this.pLimitCQL); |
|
1570 |
|
|
1571 | 1579 |
this.saveParameter(ConcordancePreferences.KEYWORD_VIEW_PROPERTIES, WordProperty.fromListToPreferenceString(this.pViewKeywordProperties)); |
1572 | 1580 |
|
1573 | 1581 |
this.saveParameter(ConcordancePreferences.LEFT_VIEW_PROPERTIES, WordProperty.fromListToPreferenceString(this.pViewLeftProperties)); |
tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java (revision 618) | ||
---|---|---|
314 | 314 |
|
315 | 315 |
@Override |
316 | 316 |
public boolean saveParameters() { |
317 |
|
|
318 |
if (pFmaxFilter != null) this.saveParameter(IndexPreferences.F_MAX, this.pFmaxFilter); |
|
319 |
|
|
320 |
if (pFminFilter != null) this.saveParameter(IndexPreferences.F_MIN, this.pFminFilter); |
|
321 |
|
|
322 |
if (pNLinesPerPage != null) this.saveParameter(IndexPreferences.N_LINES_PER_PAGE, this.pNLinesPerPage); |
|
323 |
|
|
324 |
if (pProperties != null) this.saveParameter(IndexPreferences.PROPERTIES, WordProperty.fromListToPreferenceString(pProperties)); |
|
325 |
|
|
326 |
if (pPropertiesSeparator != null) this.saveParameter(IndexPreferences.PROPERTIES_SEPARATOR, this.pPropertiesSeparator); |
|
327 |
|
|
328 |
if (pQuery != null) this.saveParameter(IndexPreferences.QUERY, this.pQuery.getQueryString()); |
|
329 |
|
|
330 |
if (pTopIndex != null) this.saveParameter(IndexPreferences.N_TOP_INDEX, this.pTopIndex); |
|
331 |
|
|
332 |
if (pVmaxFilter != null) this.saveParameter(IndexPreferences.V_MAX, this.pVmaxFilter); |
|
333 |
|
|
317 |
if (pProperties != null) { |
|
318 |
this.saveParameter(IndexPreferences.PROPERTIES, WordProperty.fromListToPreferenceString(pProperties)); |
|
319 |
} |
|
334 | 320 |
return true; |
335 | 321 |
} |
336 | 322 |
|
337 | 323 |
@Override |
338 | 324 |
public boolean loadParameters() { |
339 |
// this.pFmaxFilter = this.getIntParameterValue(IndexPreferences.FMAX_FILTER); |
|
340 |
// |
|
341 |
// this.pFminFilter = this.getIntParameterValue(IndexPreferences.FMIN_FILTER); |
|
342 |
// |
|
343 |
// this.pNLinesPerPage = this.getIntParameterValue(IndexPreferences.NLINESPERPAGE); |
|
344 |
|
|
345 | 325 |
String s = this.getStringParameterValue(IndexPreferences.PROPERTIES); |
346 | 326 |
this.pProperties = WordProperty.fromStringToList(getCorpus(), s); |
347 |
|
|
348 |
// this.pPropertiesSeparator = this.getStringParameterValue(IndexPreferences.PROPERTIES_SEPARATOR); |
|
349 |
|
|
350 | 327 |
this.pQuery = new Query(this.getStringParameterValue(IndexPreferences.QUERY)); |
351 |
|
|
352 |
// this.pTopIndex = this.getIntParameterValue(IndexPreferences.NTOPINDEX); |
|
353 |
// |
|
354 |
// this.pVmaxFilter = this.getIntParameterValue(IndexPreferences.VMAX_FILTER); |
|
355 |
|
|
356 | 328 |
return true; |
357 | 329 |
} |
358 | 330 |
|
Also available in: Unified diff