Revision 758
tmp/org.txm.concordance.core/src/org/txm/concordance/core/tests/TestConcordance.java (revision 758) | ||
---|---|---|
17 | 17 |
import org.txm.searchengine.cqp.corpus.Corpus; |
18 | 18 |
import org.txm.searchengine.cqp.corpus.CorpusManager; |
19 | 19 |
import org.txm.searchengine.cqp.corpus.Property; |
20 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
20 | 21 |
import org.txm.searchengine.cqp.corpus.query.Query; |
21 | 22 |
|
22 | 23 |
/** |
... | ... | |
59 | 60 |
} |
60 | 61 |
Query query = new Query(Query.fixQuery(queryString)); |
61 | 62 |
|
62 |
List<Property> leftCSortProperties = new ArrayList<Property>();
|
|
63 |
List<WordProperty> leftCSortProperties = new ArrayList<WordProperty>();
|
|
63 | 64 |
for (String p : leftCSortPropertiesString) leftCSortProperties.add(corpus.getProperty(p)); |
64 | 65 |
|
65 |
List<Property> rightCSortProperties = new ArrayList<Property>();
|
|
66 |
List<WordProperty> rightCSortProperties = new ArrayList<WordProperty>();
|
|
66 | 67 |
for (String p : rightCSortPropertiesString) rightCSortProperties.add(corpus.getProperty(p)); |
67 | 68 |
|
68 |
List<Property> keywordSortProperties = new ArrayList<Property>();
|
|
69 |
List<WordProperty> keywordSortProperties = new ArrayList<WordProperty>();
|
|
69 | 70 |
for (String p : keywordSortPropertiesString) keywordSortProperties.add(corpus.getProperty(p)); |
70 | 71 |
|
71 |
List<Property> leftCViewProperties = new ArrayList<Property>();
|
|
72 |
List<WordProperty> leftCViewProperties = new ArrayList<WordProperty>();
|
|
72 | 73 |
for (String p : leftCViewPropertiesString) leftCViewProperties.add(corpus.getProperty(p)); |
73 | 74 |
|
74 |
List<Property> rightCViewProperties = new ArrayList<Property>();
|
|
75 |
List<WordProperty> rightCViewProperties = new ArrayList<WordProperty>();
|
|
75 | 76 |
for (String p : rightCViewPropertiesString) rightCViewProperties.add(corpus.getProperty(p)); |
76 | 77 |
|
77 |
List<Property> keywordViewProperties = new ArrayList<Property>();
|
|
78 |
List<WordProperty> keywordViewProperties = new ArrayList<WordProperty>();
|
|
78 | 79 |
for (String p : keywordViewPropertiesString) keywordViewProperties.add(corpus.getProperty(p)); |
79 | 80 |
|
80 | 81 |
ArrayList<Property> refPatterns = new ArrayList<Property>(); |
tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/comparators/LexicographicKeywordComparator.java (revision 758) | ||
---|---|---|
34 | 34 |
import org.txm.concordance.core.functions.Line; |
35 | 35 |
import org.txm.concordance.core.messages.ConcordanceMessages; |
36 | 36 |
import org.txm.searchengine.cqp.corpus.Property; |
37 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
37 | 38 |
|
38 | 39 |
// TODO: Auto-generated Javadoc |
39 | 40 |
/** |
... | ... | |
45 | 46 |
/** The Constant NAME. */ |
46 | 47 |
private static final String NAME = ConcordanceMessages.LexicographicKeywordComparator_0; |
47 | 48 |
private Concordance conc; |
48 |
private List<Property> props; |
|
49 |
private List<WordProperty> props;
|
|
49 | 50 |
|
50 | 51 |
/** |
51 | 52 |
* Instantiates a new lexicographic keyword comparator. |
tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/comparators/LexicographicLeftContextComparator.java (revision 758) | ||
---|---|---|
34 | 34 |
import org.txm.concordance.core.functions.Line; |
35 | 35 |
import org.txm.concordance.core.messages.ConcordanceMessages; |
36 | 36 |
import org.txm.searchengine.cqp.corpus.Property; |
37 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
37 | 38 |
|
38 | 39 |
// TODO: Auto-generated Javadoc |
39 | 40 |
/** |
... | ... | |
45 | 46 |
/** The Constant NAME. */ |
46 | 47 |
private static final String NAME = ConcordanceMessages.LexicographicLeftContextComparator_0; |
47 | 48 |
private Concordance conc; |
48 |
private List<Property> props; |
|
49 |
private List<WordProperty> props;
|
|
49 | 50 |
|
50 | 51 |
/** |
51 | 52 |
* Instantiates a new lexicographic left context comparator. |
tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/comparators/LexicographicRightContextComparator.java (revision 758) | ||
---|---|---|
34 | 34 |
import org.txm.concordance.core.functions.Line; |
35 | 35 |
import org.txm.concordance.core.messages.ConcordanceMessages; |
36 | 36 |
import org.txm.searchengine.cqp.corpus.Property; |
37 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
37 | 38 |
|
38 | 39 |
// TODO: Auto-generated Javadoc |
39 | 40 |
/** |
... | ... | |
45 | 46 |
/** The Constant NAME. */ |
46 | 47 |
private static final String NAME = ConcordanceMessages.LexicographicRightContextComparator_0; |
47 | 48 |
private Concordance conc; |
48 |
private List<Property> props; |
|
49 |
private List<WordProperty> props;
|
|
49 | 50 |
|
50 | 51 |
/** |
51 | 52 |
* Instantiates a new lexicographic right context comparator. |
tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java (revision 758) | ||
---|---|---|
94 | 94 |
/** The symbol. */ |
95 | 95 |
private String symbol; |
96 | 96 |
|
97 |
private ArrayList<Property> availableKeywordViewProperties; |
|
97 |
private ArrayList<WordProperty> availableKeywordViewProperties;
|
|
98 | 98 |
|
99 |
private ArrayList<Property> availableLeftViewProperties; |
|
99 |
private ArrayList<WordProperty> availableLeftViewProperties;
|
|
100 | 100 |
|
101 |
private ArrayList<Property> availableRightViewProperties; |
|
101 |
private ArrayList<WordProperty> availableRightViewProperties;
|
|
102 | 102 |
|
103 |
private ArrayList<Property> availableLeftSortProperties; |
|
103 |
private ArrayList<WordProperty> availableLeftSortProperties;
|
|
104 | 104 |
|
105 |
private ArrayList<Property> availableKeywordSortProperties; |
|
105 |
private ArrayList<WordProperty> availableKeywordSortProperties;
|
|
106 | 106 |
|
107 |
private ArrayList<Property> availableRightSortProperties; |
|
107 |
private ArrayList<WordProperty> availableRightSortProperties;
|
|
108 | 108 |
|
109 | 109 |
|
110 | 110 |
|
... | ... | |
114 | 114 |
|
115 | 115 |
|
116 | 116 |
/** The keyword analysis properties */ |
117 |
@Parameter |
|
118 |
protected List<Property> pAnalysisKeywordProperties; |
|
117 |
@Parameter(key=ConcordancePreferences.KEYWORD_ANALYSIS_PROPERTIES)
|
|
118 |
protected List<WordProperty> pAnalysisKeywordProperties;
|
|
119 | 119 |
|
120 | 120 |
/** The analysis properties */ |
121 |
@Parameter |
|
122 |
protected List<Property> pAnalysisLeftProperties; |
|
121 |
@Parameter(key=ConcordancePreferences.LEFT_ANALYSIS_PROPERTIES)
|
|
122 |
protected List<WordProperty> pAnalysisLeftProperties;
|
|
123 | 123 |
|
124 | 124 |
/** The ReferncePattern sort properties */ |
125 |
@Parameter |
|
125 |
@Parameter(key=ConcordancePreferences.ANALYSIS_REFERENCE_PATTERN)
|
|
126 | 126 |
protected ReferencePattern pAnalysisRefPattern; |
127 | 127 |
|
128 | 128 |
/** The right c analysis property. */ |
129 |
@Parameter |
|
130 |
protected List<Property> pAnalysisRightProperties; |
|
129 |
@Parameter(key=ConcordancePreferences.RIGHT_ANALYSIS_PROPERTIES)
|
|
130 |
protected List<WordProperty> pAnalysisRightProperties;
|
|
131 | 131 |
|
132 | 132 |
/** used to limit context to the matches of the CQL limit query */ |
133 | 133 |
@Parameter(key=ConcordancePreferences.LIMIT_CQL) |
... | ... | |
149 | 149 |
protected Integer pNLinesPerPage; |
150 | 150 |
|
151 | 151 |
/** The keyword view properties. */ |
152 |
@Parameter |
|
153 |
protected List<Property> pViewKeywordProperties; |
|
152 |
@Parameter(key=ConcordancePreferences.KEYWORD_VIEW_PROPERTIES)
|
|
153 |
protected List<WordProperty> pViewKeywordProperties;
|
|
154 | 154 |
|
155 | 155 |
/** The left c view properties. */ |
156 |
@Parameter |
|
157 |
protected List<Property> pViewLeftProperties; |
|
156 |
@Parameter(key=ConcordancePreferences.LEFT_VIEW_PROPERTIES)
|
|
157 |
protected List<WordProperty> pViewLeftProperties;
|
|
158 | 158 |
|
159 | 159 |
/** The reference pattern. */ |
160 |
@Parameter |
|
160 |
@Parameter(key=ConcordancePreferences.VIEW_REFERENCE_PATTERN)
|
|
161 | 161 |
protected ReferencePattern pViewRefPattern; |
162 | 162 |
|
163 | 163 |
/** The right c view properties. */ |
164 |
@Parameter |
|
165 |
protected List<Property> pViewRightProperties; |
|
164 |
@Parameter(key=ConcordancePreferences.RIGHT_VIEW_PROPERTIES)
|
|
165 |
protected List<WordProperty> pViewRightProperties;
|
|
166 | 166 |
|
167 | 167 |
/** |
168 | 168 |
* Optional parameterQuery result already resolved. If set the pQuery is optional |
... | ... | |
170 | 170 |
@Parameter |
171 | 171 |
private QueryResult pQueryResult; |
172 | 172 |
|
173 |
// /** The view properties. */ |
|
174 |
// private List<Property> pViewKeywordProperties; // contains all the view properties |
|
175 |
|
|
176 | 173 |
/** |
177 | 174 |
* |
178 | 175 |
* @param corpus |
... | ... | |
303 | 300 |
* |
304 | 301 |
* @return the analysisProperty |
305 | 302 |
*/ |
306 |
public List<Property> getAnalysisProperty() { |
|
303 |
public List<WordProperty> getAnalysisProperty() {
|
|
307 | 304 |
return pAnalysisKeywordProperties; |
308 | 305 |
} |
309 | 306 |
|
... | ... | |
355 | 352 |
* |
356 | 353 |
* @return the analysisProperty |
357 | 354 |
*/ |
358 |
public List<Property> getKeywordAnalysisProperties() { |
|
355 |
public List<WordProperty> getKeywordAnalysisProperties() {
|
|
359 | 356 |
return pAnalysisKeywordProperties; |
360 | 357 |
} |
361 | 358 |
|
... | ... | |
387 | 384 |
* |
388 | 385 |
* @return the keywordViewProperties |
389 | 386 |
*/ |
390 |
public List<Property> getKeywordViewProperties() { |
|
387 |
public List<WordProperty> getKeywordViewProperties() {
|
|
391 | 388 |
return pViewKeywordProperties; |
392 | 389 |
} |
393 | 390 |
|
... | ... | |
396 | 393 |
* |
397 | 394 |
* @return the analysisProperty |
398 | 395 |
*/ |
399 |
public List<Property> getLeftAnalysisProperties() { |
|
396 |
public List<WordProperty> getLeftAnalysisProperties() {
|
|
400 | 397 |
return pAnalysisLeftProperties; |
401 | 398 |
} |
402 | 399 |
|
... | ... | |
414 | 411 |
* |
415 | 412 |
* @return the leftCViewProperties |
416 | 413 |
*/ |
417 |
public List<Property> getLeftViewProperties() { |
|
414 |
public List<WordProperty> getLeftViewProperties() {
|
|
418 | 415 |
return pViewLeftProperties; |
419 | 416 |
} |
420 | 417 |
|
... | ... | |
790 | 787 |
* |
791 | 788 |
* @return the analysisProperty |
792 | 789 |
*/ |
793 |
public List<Property> getRightAnalysisProperties() { |
|
790 |
public List<WordProperty> getRightAnalysisProperties() {
|
|
794 | 791 |
return pAnalysisRightProperties; |
795 | 792 |
} |
796 | 793 |
|
... | ... | |
808 | 805 |
* |
809 | 806 |
* @return the rightCViewProperties |
810 | 807 |
*/ |
811 |
public List<Property> getRightViewProperties() { |
|
808 |
public List<WordProperty> getRightViewProperties() {
|
|
812 | 809 |
return pViewRightProperties; |
813 | 810 |
} |
814 | 811 |
|
... | ... | |
1029 | 1026 |
* |
1030 | 1027 |
* @param list the new analysis property |
1031 | 1028 |
*/ |
1032 |
public void setAnalysisProperty(List<Property> list) { |
|
1029 |
public void setAnalysisProperty(List<WordProperty> list) {
|
|
1033 | 1030 |
this.pAnalysisLeftProperties = list; |
1034 | 1031 |
this.pAnalysisRightProperties = list; |
1035 | 1032 |
this.pAnalysisKeywordProperties = list; |
... | ... | |
1043 | 1040 |
* @param keywordProps list the new analysis property |
1044 | 1041 |
* @param rightProps list the new analysis property |
1045 | 1042 |
*/ |
1046 |
public void setAnalysisProperty(List<Property> leftProps, List<Property> keywordProps, List<Property> rightProps) {
|
|
1043 |
public void setAnalysisProperty(List<WordProperty> leftProps, List<WordProperty> keywordProps, List<WordProperty> rightProps) {
|
|
1047 | 1044 |
this.pAnalysisLeftProperties = leftProps; |
1048 | 1045 |
this.pAnalysisRightProperties = keywordProps; |
1049 | 1046 |
this.pAnalysisKeywordProperties = rightProps; |
... | ... | |
1082 | 1079 |
* @param selectedKeywordSortProperty |
1083 | 1080 |
* the new analysis property |
1084 | 1081 |
*/ |
1085 |
public void setKeywordAnalysisProperties(List<Property> selectedKeywordSortProperty) { |
|
1082 |
public void setKeywordAnalysisProperties(List<WordProperty> selectedKeywordSortProperty) {
|
|
1086 | 1083 |
//updateDirty(pAnalysisKeywordProperties, selectedKeywordSortProperty); |
1087 | 1084 |
this.pAnalysisKeywordProperties = selectedKeywordSortProperty; |
1088 | 1085 |
resetLines(); |
... | ... | |
1094 | 1091 |
* @param selectedLeftSortProperty |
1095 | 1092 |
* the new analysis property |
1096 | 1093 |
*/ |
1097 |
public void setLeftAnalysisProperties(List<Property> selectedLeftSortProperty) { |
|
1094 |
public void setLeftAnalysisProperties(List<WordProperty> selectedLeftSortProperty) {
|
|
1098 | 1095 |
//updateDirty(pAnalysisLeftProperties, selectedLeftSortProperty); |
1099 | 1096 |
this.pAnalysisLeftProperties = selectedLeftSortProperty; |
1100 | 1097 |
resetLines(); |
... | ... | |
1114 | 1111 |
|
1115 | 1112 |
|
1116 | 1113 |
public void setParameters(Query query, |
1117 |
List<Property> selectedLeftCSortProperty, |
|
1118 |
List<Property> selectedRightCSortProperty, |
|
1119 |
List<Property> selectedKeywordSortProperty, |
|
1120 |
List<Property> selectedLeftCViewProperties, |
|
1121 |
List<Property> selectedRightCViewProperties, |
|
1122 |
List<Property> selectedKeywordViewProperties, |
|
1114 |
List<WordProperty> selectedLeftCSortProperty,
|
|
1115 |
List<WordProperty> selectedRightCSortProperty,
|
|
1116 |
List<WordProperty> selectedKeywordSortProperty,
|
|
1117 |
List<WordProperty> selectedLeftCViewProperties,
|
|
1118 |
List<WordProperty> selectedRightCViewProperties,
|
|
1119 |
List<WordProperty> selectedKeywordViewProperties,
|
|
1123 | 1120 |
ReferencePattern referencePattern, |
1124 | 1121 |
ReferencePattern refAnalysePattern, |
1125 | 1122 |
Integer leftContextSize, |
... | ... | |
1153 | 1150 |
|
1154 | 1151 |
p = parameters.get(ConcordancePreferences.LEFT_ANALYSIS_PROPERTIES); |
1155 | 1152 |
if (p != null) { |
1156 |
if (p instanceof List<?>) this.pAnalysisLeftProperties = (List<Property>)p; |
|
1153 |
if (p instanceof List<?>) this.pAnalysisLeftProperties = (List<WordProperty>)p;
|
|
1157 | 1154 |
else { |
1158 | 1155 |
String v = p.toString(); |
1159 |
this.pAnalysisLeftProperties = (List<Property>) Property.stringToProperties(getCorpus(), v); |
|
1156 |
this.pAnalysisLeftProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v);
|
|
1160 | 1157 |
} |
1161 | 1158 |
} |
1162 | 1159 |
|
1163 | 1160 |
p = parameters.get(ConcordancePreferences.RIGHT_ANALYSIS_PROPERTIES); |
1164 | 1161 |
if (p != null) { |
1165 |
if (p instanceof List<?>) this.pAnalysisRightProperties = (List<Property>)p; |
|
1162 |
if (p instanceof List<?>) this.pAnalysisRightProperties = (List<WordProperty>)p;
|
|
1166 | 1163 |
else { |
1167 | 1164 |
String v = p.toString(); |
1168 |
this.pAnalysisRightProperties = (List<Property>) Property.stringToProperties(getCorpus(), v); |
|
1165 |
this.pAnalysisRightProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v);
|
|
1169 | 1166 |
} |
1170 | 1167 |
} |
1171 | 1168 |
|
1172 | 1169 |
p = parameters.get(ConcordancePreferences.KEYWORD_ANALYSIS_PROPERTIES); |
1173 | 1170 |
if (p != null) { |
1174 |
if (p instanceof List<?>) this.pAnalysisKeywordProperties = (List<Property>)p; |
|
1171 |
if (p instanceof List<?>) this.pAnalysisKeywordProperties = (List<WordProperty>)p;
|
|
1175 | 1172 |
else { |
1176 | 1173 |
String v = p.toString(); |
1177 |
this.pAnalysisKeywordProperties = (List<Property>) Property.stringToProperties(getCorpus(), v); |
|
1174 |
this.pAnalysisKeywordProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v);
|
|
1178 | 1175 |
} |
1179 | 1176 |
} |
1180 | 1177 |
|
1181 | 1178 |
p = parameters.get(ConcordancePreferences.LEFT_VIEW_PROPERTIES); |
1182 | 1179 |
if (p != null) { |
1183 |
if (p instanceof List<?>) this.pViewLeftProperties = (List<Property>)p; |
|
1180 |
if (p instanceof List<?>) this.pViewLeftProperties = (List<WordProperty>)p;
|
|
1184 | 1181 |
else { |
1185 | 1182 |
String v = p.toString(); |
1186 |
this.pViewLeftProperties = (List<Property>) Property.stringToProperties(getCorpus(), v); |
|
1183 |
this.pViewLeftProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v);
|
|
1187 | 1184 |
} |
1188 | 1185 |
} |
1189 | 1186 |
|
1190 | 1187 |
p = parameters.get(ConcordancePreferences.RIGHT_VIEW_PROPERTIES); |
1191 | 1188 |
if (p != null) { |
1192 |
if (p instanceof List<?>) this.pViewRightProperties = (List<Property>)p; |
|
1189 |
if (p instanceof List<?>) this.pViewRightProperties = (List<WordProperty>)p;
|
|
1193 | 1190 |
else { |
1194 | 1191 |
String v = p.toString(); |
1195 |
this.pViewRightProperties = (List<Property>) Property.stringToProperties(getCorpus(), v); |
|
1192 |
this.pViewRightProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v);
|
|
1196 | 1193 |
} |
1197 | 1194 |
} |
1198 | 1195 |
|
1199 | 1196 |
p = parameters.get(ConcordancePreferences.KEYWORD_VIEW_PROPERTIES); |
1200 | 1197 |
if (p != null) { |
1201 |
if (p instanceof List<?>) this.pViewKeywordProperties = (List<Property>)p; |
|
1198 |
if (p instanceof List<?>) this.pViewKeywordProperties = (List<WordProperty>)p;
|
|
1202 | 1199 |
else { |
1203 | 1200 |
String v = p.toString(); |
1204 |
this.pViewKeywordProperties = (List<Property>) Property.stringToProperties(getCorpus(), v); |
|
1201 |
this.pViewKeywordProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), v);
|
|
1205 | 1202 |
} |
1206 | 1203 |
} |
1207 | 1204 |
|
... | ... | |
1261 | 1258 |
* @param selectedRightSortProperty |
1262 | 1259 |
* the new analysis property |
1263 | 1260 |
*/ |
1264 |
public void setRightAnalysisProperties(List<Property> selectedRightSortProperty) { |
|
1261 |
public void setRightAnalysisProperties(List<WordProperty> selectedRightSortProperty) {
|
|
1265 | 1262 |
//updateDirty(pAnalysisRightProperties, selectedRightSortProperty); |
1266 | 1263 |
this.pAnalysisRightProperties = selectedRightSortProperty; |
1267 | 1264 |
resetLines(); |
... | ... | |
1285 | 1282 |
* @param viewProperties |
1286 | 1283 |
* the new view properties |
1287 | 1284 |
*/ |
1288 |
public void setViewProperties(List<Property> viewProperties) { |
|
1285 |
public void setViewProperties(List<WordProperty> viewProperties) {
|
|
1289 | 1286 |
this.pViewLeftProperties = viewProperties; |
1290 | 1287 |
this.pViewRightProperties = viewProperties; |
1291 | 1288 |
this.pViewKeywordProperties = viewProperties; |
... | ... | |
1304 | 1301 |
* @param keywordViewProperties |
1305 | 1302 |
* keyword view properties |
1306 | 1303 |
*/ |
1307 |
public void setViewProperties(List<Property> leftCViewProperties, |
|
1308 |
List<Property> rightCViewProperties, |
|
1309 |
List<Property> keywordViewProperties) { |
|
1304 |
public void setViewProperties(List<WordProperty> leftCViewProperties,
|
|
1305 |
List<WordProperty> rightCViewProperties,
|
|
1306 |
List<WordProperty> keywordViewProperties) {
|
|
1310 | 1307 |
// reset list or use the given ones |
1311 | 1308 |
if (leftCViewProperties != null) { |
1312 | 1309 |
this.pViewLeftProperties = leftCViewProperties; |
1313 | 1310 |
} |
1314 | 1311 |
else { |
1315 |
this.pViewLeftProperties = new ArrayList<Property>(); |
|
1312 |
this.pViewLeftProperties = new ArrayList<WordProperty>();
|
|
1316 | 1313 |
} |
1317 | 1314 |
|
1318 | 1315 |
if (rightCViewProperties != null) { |
1319 | 1316 |
this.pViewRightProperties = rightCViewProperties; |
1320 | 1317 |
} |
1321 | 1318 |
else { |
1322 |
this.pViewRightProperties = new ArrayList<Property>(); |
|
1319 |
this.pViewRightProperties = new ArrayList<WordProperty>();
|
|
1323 | 1320 |
} |
1324 | 1321 |
|
1325 | 1322 |
if (keywordViewProperties != null) { |
1326 | 1323 |
this.pViewKeywordProperties = keywordViewProperties; |
1327 | 1324 |
} |
1328 | 1325 |
else { |
1329 |
this.pViewKeywordProperties = new ArrayList<Property>(); |
|
1326 |
this.pViewKeywordProperties = new ArrayList<WordProperty>();
|
|
1330 | 1327 |
} |
1331 | 1328 |
|
1332 | 1329 |
this.dirty = true; |
... | ... | |
1565 | 1562 |
return pTopIndex; |
1566 | 1563 |
} |
1567 | 1564 |
|
1568 |
public List<Property> getAvailableKeywordViewProperties() { |
|
1565 |
public List<WordProperty> getAvailableKeywordViewProperties() {
|
|
1569 | 1566 |
return availableKeywordViewProperties; |
1570 | 1567 |
} |
1571 | 1568 |
|
1572 |
public List<Property> getAvailableKeywordSortProperties() { |
|
1569 |
public List<WordProperty> getAvailableKeywordSortProperties() {
|
|
1573 | 1570 |
return availableKeywordSortProperties; |
1574 | 1571 |
} |
1575 | 1572 |
|
... | ... | |
1577 | 1574 |
return pLimitCQL; |
1578 | 1575 |
} |
1579 | 1576 |
|
1580 |
public List<Property> getAvailableLeftViewProperties() { |
|
1577 |
public List<WordProperty> getAvailableLeftViewProperties() {
|
|
1581 | 1578 |
return availableLeftViewProperties; |
1582 | 1579 |
} |
1583 | 1580 |
|
1584 |
public List<Property> getAvailableRightViewProperties() { |
|
1581 |
public List<WordProperty> getAvailableRightViewProperties() {
|
|
1585 | 1582 |
return availableRightViewProperties; |
1586 | 1583 |
} |
1587 | 1584 |
|
1588 |
public void setLeftViewProperties(List<Property> selectedViewProperties) { |
|
1585 |
public void setLeftViewProperties(List<WordProperty> selectedViewProperties) {
|
|
1589 | 1586 |
//updateDirty(pViewLeftProperties, selectedViewProperties); |
1590 | 1587 |
this.pViewLeftProperties = selectedViewProperties; |
1591 | 1588 |
} |
1592 | 1589 |
|
1593 |
public void setRightViewProperties(List<Property> selectedViewProperties) { |
|
1590 |
public void setRightViewProperties(List<WordProperty> selectedViewProperties) {
|
|
1594 | 1591 |
//updateDirty(pViewRightProperties, selectedViewProperties); |
1595 | 1592 |
this.pViewRightProperties = selectedViewProperties; |
1596 | 1593 |
} |
1597 | 1594 |
|
1598 |
public void setKeywordViewProperties(List<Property> selectedViewProperties) { |
|
1595 |
public void setKeywordViewProperties(List<WordProperty> selectedViewProperties) {
|
|
1599 | 1596 |
//updateDirty(pViewKeywordProperties, selectedViewProperties); |
1600 | 1597 |
this.pViewKeywordProperties = selectedViewProperties; |
1601 | 1598 |
} |
1602 | 1599 |
|
1603 |
public List<Property> getAvailableLeftSortProperties() { |
|
1600 |
public List<WordProperty> getAvailableLeftSortProperties() {
|
|
1604 | 1601 |
return this.availableLeftSortProperties; |
1605 | 1602 |
} |
1606 | 1603 |
|
1607 |
public List<Property> getAvailableRightSortProperties() { |
|
1604 |
public List<WordProperty> getAvailableRightSortProperties() {
|
|
1608 | 1605 |
return this.availableRightSortProperties; |
1609 | 1606 |
} |
1610 | 1607 |
|
... | ... | |
1670 | 1667 |
// this.pLimitCQL = this.getStringParameterValue(ConcordancePreferences.LIMITCQL); |
1671 | 1668 |
|
1672 | 1669 |
String propertyNames = this.getStringParameterValue(ConcordancePreferences.KEYWORD_VIEW_PROPERTIES); |
1673 |
this.pViewKeywordProperties = (List<Property>) Property.stringToProperties(getCorpus(), propertyNames);
|
|
1674 |
this.availableKeywordViewProperties = new ArrayList<Property>(getCorpus().getOrderedProperties()); |
|
1670 |
this.pViewKeywordProperties = (List<WordProperty>) WordProperty.stringToProperties(getCorpus(), propertyNames);
|
|
1671 |
this.availableKeywordViewProperties = new ArrayList<WordProperty>(getCorpus().getOrderedProperties());
|
|
1675 | 1672 |
this.availableKeywordViewProperties.removeAll(pViewKeywordProperties); |
1676 | 1673 |
|
1677 | 1674 |
propertyNames = this.getStringParameterValue(ConcordancePreferences.LEFT_VIEW_PROPERTIES); |
1678 |
this.pViewLeftProperties = (List<Property>) Property.stringToProperties(getCorpus(), propertyNames); |
|
1679 |
this.availableLeftViewProperties = new ArrayList<Property>(getCorpus().getOrderedProperties()); |
|
1675 |
this.pViewLeftProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), propertyNames);
|
|
1676 |
this.availableLeftViewProperties = new ArrayList<WordProperty>(getCorpus().getOrderedProperties());
|
|
1680 | 1677 |
this.availableLeftViewProperties.removeAll(pViewLeftProperties); |
1681 | 1678 |
|
1682 | 1679 |
propertyNames = this.getStringParameterValue(ConcordancePreferences.RIGHT_VIEW_PROPERTIES); |
1683 |
this.pViewRightProperties = (List<Property>) Property.stringToProperties(getCorpus(), propertyNames); |
|
1684 |
this.availableRightViewProperties = new ArrayList<Property>(getCorpus().getOrderedProperties()); |
|
1680 |
this.pViewRightProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), propertyNames);
|
|
1681 |
this.availableRightViewProperties = new ArrayList<WordProperty>(getCorpus().getOrderedProperties());
|
|
1685 | 1682 |
this.availableRightViewProperties.removeAll(pViewRightProperties); |
1686 | 1683 |
|
1687 | 1684 |
propertyNames = this.getStringParameterValue(ConcordancePreferences.KEYWORD_ANALYSIS_PROPERTIES); |
1688 |
this.pAnalysisKeywordProperties = (List<Property>) Property.stringToProperties(getCorpus(), propertyNames); |
|
1689 |
this.availableKeywordSortProperties = new ArrayList<Property>(getCorpus().getOrderedProperties()); |
|
1685 |
this.pAnalysisKeywordProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), propertyNames);
|
|
1686 |
this.availableKeywordSortProperties = new ArrayList<WordProperty>(getCorpus().getOrderedProperties());
|
|
1690 | 1687 |
this.availableKeywordSortProperties.removeAll(pAnalysisKeywordProperties); |
1691 | 1688 |
|
1692 | 1689 |
propertyNames = this.getStringParameterValue(ConcordancePreferences.LEFT_ANALYSIS_PROPERTIES); |
1693 |
this.pAnalysisLeftProperties = (List<Property>) Property.stringToProperties(getCorpus(), propertyNames); |
|
1694 |
this.availableLeftSortProperties = new ArrayList<Property>(getCorpus().getOrderedProperties()); |
|
1690 |
this.pAnalysisLeftProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), propertyNames);
|
|
1691 |
this.availableLeftSortProperties = new ArrayList<WordProperty>(getCorpus().getOrderedProperties());
|
|
1695 | 1692 |
this.availableLeftSortProperties.removeAll(pAnalysisLeftProperties); |
1696 | 1693 |
|
1697 | 1694 |
propertyNames = this.getStringParameterValue(ConcordancePreferences.RIGHT_ANALYSIS_PROPERTIES); |
1698 |
this.pAnalysisRightProperties = (List<Property>) Property.stringToProperties(getCorpus(), propertyNames); |
|
1699 |
this.availableRightSortProperties = new ArrayList<Property>(getCorpus().getOrderedProperties()); |
|
1695 |
this.pAnalysisRightProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), propertyNames);
|
|
1696 |
this.availableRightSortProperties = new ArrayList<WordProperty>(getCorpus().getOrderedProperties());
|
|
1700 | 1697 |
this.availableRightSortProperties.removeAll(pAnalysisRightProperties); |
1701 | 1698 |
|
1702 | 1699 |
String refPropertyNames = this.getStringParameterValue(ConcordancePreferences.VIEW_REFERENCE_PATTERN); |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemaSummaryMacro.groovy (revision 758) | ||
---|---|---|
1 |
// Copyright ยฉ 2016 ENS de Lyon, CNRS, University of Franche-Comtรฉ |
|
2 |
// Licensed under the terms of the GNU General Public License (http://www.gnu.org/licenses) |
|
3 |
// @author mdecorde |
|
4 |
// @author sheiden |
|
5 |
// STANDARD DECLARATIONS |
|
6 |
package org.txm.macro.analec.exploit |
|
7 |
|
|
8 |
import org.apache.commons.lang.StringUtils |
|
9 |
import org.kohsuke.args4j.* |
|
10 |
|
|
11 |
import groovy.transform.Field |
|
12 |
|
|
13 |
import org.txm.Toolbox |
|
14 |
import org.txm.macro.analec.AnalecUtils; |
|
15 |
import org.txm.rcp.swt.widget.parameters.* |
|
16 |
import org.txm.analec.* |
|
17 |
import org.txm.searchengine.cqp.AbstractCqiClient |
|
18 |
import org.txm.searchengine.cqp.corpus.* |
|
19 |
|
|
20 |
import visuAnalec.donnees.Structure |
|
21 |
import visuAnalec.elements.* |
|
22 |
|
|
23 |
def scriptName = this.class.getSimpleName() |
|
24 |
|
|
25 |
def selection = [] |
|
26 |
for (def s : corpusViewSelections) { |
|
27 |
if (s instanceof Corpus) selection << s |
|
28 |
else if (s instanceof Partition) selection.addAll(s.getParts()) |
|
29 |
} |
|
30 |
|
|
31 |
if (selection.size() == 0) { |
|
32 |
println "** $scriptName: please select a Corpus or a Partition in the Corpus view: "+corpusViewSelections |
|
33 |
return false |
|
34 |
} |
|
35 |
|
|
36 |
// BEGINNING OF PARAMETERS |
|
37 |
@Field @Option(name="schema_ursql", usage="TYPE@PROP=VALUE", widget="String", required=true, def="CHAINE") |
|
38 |
String schema_ursql |
|
39 |
@Field @Option(name="minimum_schema_size", usage="Minimum size needed to consider a schema", widget="Integer", required=true, def="3") |
|
40 |
int minimum_schema_size |
|
41 |
@Field @Option(name="maximum_schema_size", usage="Maximum size needed to consider a schema", widget="Integer", required=true, def="9999999") |
|
42 |
int maximum_schema_size |
|
43 |
@Field @Option(name="debug", usage="Show internal variable content", widget="StringArray", metaVar="OFF ON ALL REALLY ALL", required=true, def="OFF") |
|
44 |
debug |
|
45 |
if (!ParametersDialog.open(this)) return |
|
46 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3 |
|
47 |
|
|
48 |
def CQI = CQPEngine.getCqiClient() |
|
49 |
|
|
50 |
def allresults = new LinkedHashMap() |
|
51 |
def props = new HashSet() |
|
52 |
for (def corpus : selection) { |
|
53 |
|
|
54 |
mainCorpus = corpus.getMainCorpus() |
|
55 |
|
|
56 |
def word = mainCorpus.getWordProperty() |
|
57 |
def analecCorpus = AnalecCorpora.getCorpus(mainCorpus.getName()) |
|
58 |
for (def type : analecCorpus.getStructure().getUnites()) |
|
59 |
props.addAll(analecCorpus.getStructure().getUniteProperties(type)); |
|
60 |
|
|
61 |
def selectedSchemas = AnalecUtils.selectSchemasInCorpus(debug, analecCorpus, corpus, schema_ursql, minimum_schema_size, maximum_schema_size); |
|
62 |
if (selectedSchemas.size() > 0) |
|
63 |
allresults[corpus] = selectedSchemas.sort(){it.getUnite0()}; |
|
64 |
} |
|
65 |
|
|
66 |
// tabulate summary |
|
67 |
def keys = allresults.keySet().sort(); |
|
68 |
println "Statistiques des schรฉmas de "+corpusViewSelections.join(",") |
|
69 |
println "\t"+keys.join("\t") |
|
70 |
|
|
71 |
// number of schemas |
|
72 |
print "Schemas" |
|
73 |
for (def k : keys) { |
|
74 |
print "\t"+allresults[k].size(); |
|
75 |
} |
|
76 |
println "" |
|
77 |
|
|
78 |
// Average length |
|
79 |
print "Average len" |
|
80 |
for (def k : keys) { |
|
81 |
int total = 0; |
|
82 |
for (Schema s : allresults[k]) total+= s.contenu.size(); |
|
83 |
|
|
84 |
print "\t"+total / allresults[k].size() |
|
85 |
} |
|
86 |
println "" |
|
87 |
|
|
88 |
// median length |
|
89 |
print "Median len" |
|
90 |
for (def k : keys) { |
|
91 |
print "\t"+allresults[k][(int)(allresults[k].size() / 2)].contenu.size(); |
|
92 |
} |
|
93 |
println "" |
|
94 |
|
|
95 |
// number of properties values |
|
96 |
for (def p : props) { |
|
97 |
print "$p" |
|
98 |
for (def k : keys) { |
|
99 |
def propsvalues = new HashSet() |
|
100 |
for (def u : allresults[k]) { |
|
101 |
propsvalues.add(u.getProp(p)) |
|
102 |
} |
|
103 |
if (debug) println "k @p values="+propsvalues |
|
104 |
print "\t"+propsvalues.size(); |
|
105 |
} |
|
106 |
println "" |
|
107 |
} |
|
108 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/SchemasSummaryMacro.groovy (revision 758) | ||
---|---|---|
1 |
// Copyright ยฉ 2016 ENS de Lyon, CNRS, University of Franche-Comtรฉ |
|
2 |
// Licensed under the terms of the GNU General Public License (http://www.gnu.org/licenses) |
|
3 |
// @author mdecorde |
|
4 |
// @author sheiden |
|
5 |
// STANDARD DECLARATIONS |
|
6 |
package org.txm.macro.analec.exploit |
|
7 |
|
|
8 |
import org.apache.commons.lang.StringUtils |
|
9 |
import org.kohsuke.args4j.* |
|
10 |
|
|
11 |
import groovy.transform.Field |
|
12 |
|
|
13 |
import org.txm.Toolbox |
|
14 |
import org.txm.macro.analec.AnalecUtils; |
|
15 |
import org.txm.rcp.swt.widget.parameters.* |
|
16 |
import org.txm.analec.* |
|
17 |
import org.txm.searchengine.cqp.AbstractCqiClient |
|
18 |
import org.txm.searchengine.cqp.corpus.* |
|
19 |
|
|
20 |
import visuAnalec.donnees.Structure |
|
21 |
import visuAnalec.elements.* |
|
22 |
|
|
23 |
def scriptName = this.class.getSimpleName() |
|
24 |
|
|
25 |
def selection = [] |
|
26 |
for (def s : corpusViewSelections) { |
|
27 |
if (s instanceof Corpus) selection << s |
|
28 |
else if (s instanceof Partition) selection.addAll(s.getParts()) |
|
29 |
} |
|
30 |
|
|
31 |
if (selection.size() == 0) { |
|
32 |
println "** $scriptName: please select a Corpus or a Partition in the Corpus view: "+corpusViewSelections |
|
33 |
return false |
|
34 |
} |
|
35 |
|
|
36 |
// BEGINNING OF PARAMETERS |
|
37 |
@Field @Option(name="schema_ursql", usage="TYPE@PROP=VALUE", widget="String", required=true, def="CHAINE") |
|
38 |
String schema_ursql |
|
39 |
@Field @Option(name="minimum_schema_size", usage="Minimum size needed to consider a schema", widget="Integer", required=true, def="3") |
|
40 |
int minimum_schema_size |
|
41 |
@Field @Option(name="maximum_schema_size", usage="Maximum size needed to consider a schema", widget="Integer", required=true, def="9999999") |
|
42 |
int maximum_schema_size |
|
43 |
@Field @Option(name="debug", usage="Show internal variable content", widget="StringArray", metaVar="OFF ON ALL REALLY ALL", required=true, def="OFF") |
|
44 |
debug |
|
45 |
if (!ParametersDialog.open(this)) return |
|
46 |
if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3 |
|
47 |
|
|
48 |
def CQI = CQPEngine.getCqiClient() |
|
49 |
|
|
50 |
def allresults = new LinkedHashMap() |
|
51 |
def props = new HashSet() |
|
52 |
for (def corpus : selection) { |
|
53 |
|
|
54 |
mainCorpus = corpus.getMainCorpus() |
|
55 |
|
|
56 |
def word = mainCorpus.getWordProperty() |
|
57 |
def analecCorpus = AnalecCorpora.getCorpus(mainCorpus.getName()) |
|
58 |
for (def type : analecCorpus.getStructure().getUnites()) |
|
59 |
props.addAll(analecCorpus.getStructure().getUniteProperties(type)); |
|
60 |
|
|
61 |
def selectedSchemas = AnalecUtils.selectSchemasInCorpus(debug, analecCorpus, corpus, schema_ursql, minimum_schema_size, maximum_schema_size); |
|
62 |
if (selectedSchemas.size() > 0) |
|
63 |
allresults[corpus] = selectedSchemas.sort(){it.getUnite0()}; |
|
64 |
} |
|
65 |
|
|
66 |
// tabulate summary |
|
67 |
def keys = allresults.keySet().sort(); |
|
68 |
println "Statistiques des schรฉmas de "+corpusViewSelections.join(",") |
|
69 |
println "\t"+keys.join("\t") |
|
70 |
|
|
71 |
// number of schemas |
|
72 |
print "Schemas" |
|
73 |
for (def k : keys) { |
|
74 |
print "\t"+allresults[k].size(); |
|
75 |
} |
|
76 |
println "" |
|
77 |
|
|
78 |
// Average length |
|
79 |
print "Average len" |
|
80 |
for (def k : keys) { |
|
81 |
int total = 0; |
|
82 |
for (Schema s : allresults[k]) total+= s.contenu.size(); |
|
83 |
|
|
84 |
print "\t"+total / allresults[k].size() |
|
85 |
} |
|
86 |
println "" |
|
87 |
|
|
88 |
// median length |
|
89 |
print "Median len" |
|
90 |
for (def k : keys) { |
|
91 |
print "\t"+allresults[k][(int)(allresults[k].size() / 2)].contenu.size(); |
|
92 |
} |
|
93 |
println "" |
|
94 |
|
|
95 |
// number of properties values |
|
96 |
for (def p : props) { |
|
97 |
print "$p" |
|
98 |
for (def k : keys) { |
|
99 |
def propsvalues = new HashSet() |
|
100 |
for (def u : allresults[k]) { |
|
101 |
propsvalues.add(u.getProp(p)) |
|
102 |
} |
|
103 |
if (debug) println "k @p values="+propsvalues |
|
104 |
print "\t"+propsvalues.size(); |
|
105 |
} |
|
106 |
println "" |
|
107 |
} |
|
108 |
|
tmp/org.txm.analec.rcp/src/org/txm/analec/view/ElementSearchView.java (revision 758) | ||
---|---|---|
47 | 47 |
import org.txm.searchengine.cqp.clientExceptions.InvalidCqpIdException; |
48 | 48 |
import org.txm.searchengine.cqp.corpus.FakeQueryResult; |
49 | 49 |
import org.txm.searchengine.cqp.corpus.Property; |
50 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
50 | 51 |
import org.txm.searchengine.cqp.corpus.query.Query; |
51 | 52 |
import org.txm.synopticedition.rcp.handlers.BackToText; |
52 | 53 |
import org.txm.utils.logger.Log; |
... | ... | |
500 | 501 |
sizes.add(size); |
501 | 502 |
} |
502 | 503 |
|
503 |
List<Property> viewProperties = Arrays.asList(corpus.getWordProperty()); |
|
504 |
List<WordProperty> viewProperties = Arrays.asList(corpus.getWordProperty());
|
|
504 | 505 |
ReferencePattern ref = new ReferencePattern(corpus.getStructuralUnit("text").getProperty("id")); |
505 | 506 |
final Concordance concordance = new Concordance(corpus); |
506 | 507 |
concordance.setParameters(new Query(""), |
tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/preferences/RPreferences.java (revision 758) | ||
---|---|---|
10 | 10 |
import org.osgi.service.prefs.Preferences; |
11 | 11 |
import org.txm.core.preferences.TXMPreferences; |
12 | 12 |
import org.txm.utils.BundleUtils; |
13 |
import org.txm.utils.StreamHog; |
|
13 | 14 |
import org.txm.utils.logger.Log; |
14 | 15 |
|
15 | 16 |
/** |
... | ... | |
130 | 131 |
if (!osname.contains("windows")) { |
131 | 132 |
try { |
132 | 133 |
Log.info("Setting execution file rights to: "+OSDir.getAbsolutePath()); |
133 |
Runtime.getRuntime().exec("chmod -R +x "+OSDir.getAbsolutePath()).waitFor(); |
|
134 |
Process p = Runtime.getRuntime().exec("chmod -R +x "+OSDir.getAbsolutePath()); |
|
135 |
new StreamHog(p.getInputStream(), false); |
|
136 |
new StreamHog(p.getErrorStream(), false); |
|
137 |
p.waitFor(); |
|
134 | 138 |
} catch (Exception e) { |
135 | 139 |
System.out.println("Error while setting execution file rights to: "+OSDir.getAbsolutePath()); |
136 | 140 |
e.printStackTrace(); |
tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RStatsEngine.java (revision 758) | ||
---|---|---|
96 | 96 |
*/ |
97 | 97 |
public static void kill() { |
98 | 98 |
if (!TXMPreferences.getBoolean(RPreferences.REMOTE, RPreferences.PREFERENCES_NODE)) { |
99 |
|
|
100 |
try { |
|
101 |
if (StartRserve.Rserveprocess != null) { |
|
102 |
StartRserve.Rserveprocess.destroy(); |
|
103 |
} |
|
104 |
} catch (Exception e1) { |
|
105 |
// TODO Auto-generated catch block |
|
106 |
e1.printStackTrace(); |
|
107 |
} |
|
108 |
|
|
99 | 109 |
// Windows OS |
100 | 110 |
if (OSDetector.isFamilyWindows()) { |
101 | 111 |
try { |
tmp/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TSIndex.java (revision 758) | ||
---|---|---|
27 | 27 |
import org.txm.searchengine.cqp.corpus.Partition; |
28 | 28 |
import org.txm.searchengine.cqp.corpus.Property; |
29 | 29 |
import org.txm.searchengine.cqp.corpus.StructuralUnitProperty; |
30 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
30 | 31 |
import org.txm.searchengine.cqp.corpus.query.Match; |
31 | 32 |
import org.txm.searchengine.cqp.corpus.query.Query; |
32 | 33 |
import org.txm.searchengine.cqp.serverException.CqiServerError; |
... | ... | |
38 | 39 |
public class TSIndex extends Index { |
39 | 40 |
|
40 | 41 |
|
41 |
public TSIndex(Corpus corpus, List<Property> props) |
|
42 |
public TSIndex(Corpus corpus, List<WordProperty> props)
|
|
42 | 43 |
throws CqiClientException, IOException, CqiServerError { |
43 | 44 |
super(corpus); |
44 | 45 |
this.setParameters(new Query("[]"), props, null, null, null, null); |
45 | 46 |
} |
46 | 47 |
|
47 |
public TSIndex(Corpus corpus, Query query, List<Property> props) |
|
48 |
public TSIndex(Corpus corpus, Query query, List<WordProperty> props)
|
|
48 | 49 |
throws CqiClientException, IOException, CqiServerError { |
49 | 50 |
super(corpus); |
50 | 51 |
this.setParameters(query, props, null, null, null, null); |
51 | 52 |
} |
52 | 53 |
|
53 |
public TSIndex(Partition partition, Query query, List<Property> props) |
|
54 |
public TSIndex(Partition partition, Query query, List<WordProperty> props)
|
|
54 | 55 |
throws CqiClientException, IOException, CqiServerError { |
55 | 56 |
super(partition); |
56 | 57 |
this.setParameters(query, props, null, null, null, null); |
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TSIndexEditor.java (revision 758) | ||
---|---|---|
97 | 97 |
import org.txm.searchengine.cqp.corpus.Partition; |
98 | 98 |
import org.txm.searchengine.cqp.corpus.Property; |
99 | 99 |
import org.txm.searchengine.cqp.corpus.StructuralUnitProperty; |
100 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
100 | 101 |
import org.txm.searchengine.cqp.corpus.query.Query; |
101 | 102 |
import org.txm.statsengine.r.rcp.views.RVariablesView; |
102 | 103 |
import org.txm.utils.logger.Log; |
... | ... | |
134 | 135 |
protected Button go; |
135 | 136 |
|
136 | 137 |
/** The props area. */ |
137 |
protected PropertiesSelector propsArea; |
|
138 |
protected PropertiesSelector<WordProperty> propsArea;
|
|
138 | 139 |
// seuils |
139 | 140 |
/** The Fmin spinner. */ |
140 | 141 |
protected Spinner FminSpinner; |
... | ... | |
301 | 302 |
final int Fmin = Integer.parseInt(FminSpinner.getText()); |
302 | 303 |
final int Fmax = Integer.parseInt(FmaxSpinner.getText()); |
303 | 304 |
final int Tmax = Integer.parseInt(this.TmaxSpinner.getText()); |
304 |
final List<Property> properties = propsArea.getSelectedProperties(); |
|
305 |
final List<WordProperty> properties = propsArea.getSelectedProperties();
|
|
305 | 306 |
try { |
306 | 307 |
title = NLS.bind(IndexUIMessages.IndexEditor_2, new Object[]{ |
307 | 308 |
query.getQueryString(), properties, corpus.getName()}); |
... | ... | |
1050 | 1051 |
// query |
1051 | 1052 |
//this.queryWidget.memorize(index.getQuery().getQueryString()); |
1052 | 1053 |
// props |
1053 |
ArrayList<Property> availables = new ArrayList<Property>();
|
|
1054 |
ArrayList<WordProperty> availables = new ArrayList<WordProperty>();
|
|
1054 | 1055 |
try { |
1055 |
for (Property p : index.getCorpus().getOrderedProperties()) |
|
1056 |
for (WordProperty p : index.getCorpus().getOrderedProperties())
|
|
1056 | 1057 |
if (!index.getProperties().contains(p)) |
1057 | 1058 |
availables.add(p); |
1058 | 1059 |
} catch (CqiClientException e) { |
1059 | 1060 |
Log.printStackTrace(e); |
1060 | 1061 |
initializing = false; |
1061 | 1062 |
} |
1062 |
ArrayList<Property> props = new ArrayList<Property>();
|
|
1063 |
ArrayList<WordProperty> props = new ArrayList<WordProperty>();
|
|
1063 | 1064 |
props.addAll(index.getProperties()); |
1064 | 1065 |
this.propsArea.setProperties(availables, props); |
1065 | 1066 |
// min, max |
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeRecette1.java (revision 758) | ||
---|---|---|
40 | 40 |
import org.txm.searchengine.cqp.corpus.Corpus; |
41 | 41 |
import org.txm.searchengine.cqp.corpus.Property; |
42 | 42 |
import org.txm.searchengine.cqp.corpus.Subcorpus; |
43 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
43 | 44 |
import org.txm.searchengine.cqp.corpus.query.Query; |
44 | 45 |
import org.txm.searchengine.cqp.serverException.CqiServerError; |
45 | 46 |
|
... | ... | |
84 | 85 |
System.out.println("****** RECETTE 1 ******"); |
85 | 86 |
|
86 | 87 |
Query query = new Query("#pivot:[word=/[Cc][ou]m?me?/ & pos=\"CONsub\"]"); |
87 |
ArrayList<Property> props = new ArrayList<Property>();
|
|
88 |
ArrayList<WordProperty> props = new ArrayList<WordProperty>();
|
|
88 | 89 |
props.add(corpus.getProperty("word")); |
89 | 90 |
|
90 | 91 |
TSIndex tsi = null; |
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeRecette2.java (revision 758) | ||
---|---|---|
44 | 44 |
import org.txm.searchengine.cqp.corpus.Corpus; |
45 | 45 |
import org.txm.searchengine.cqp.corpus.Property; |
46 | 46 |
import org.txm.searchengine.cqp.corpus.Subcorpus; |
47 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
47 | 48 |
import org.txm.searchengine.cqp.corpus.query.Query; |
48 | 49 |
import org.txm.searchengine.cqp.serverException.CqiServerError; |
49 | 50 |
import org.txm.utils.logger.Log; |
... | ... | |
144 | 145 |
System.out.println("****** RECETTE 2 ******"); |
145 | 146 |
|
146 | 147 |
Query query = new Query("#pivot:[word=/[Cc][ou]m?me?/ & pos=\"CONsub\"]"); |
147 |
ArrayList<Property> props = new ArrayList<Property>();
|
|
148 |
ArrayList<WordProperty> props = new ArrayList<WordProperty>();
|
|
148 | 149 |
props.add(corpus1.getProperty("id")); |
149 | 150 |
|
150 | 151 |
TSIndex tsi = null, tsi2 = null; |
... | ... | |
156 | 157 |
System.out.println("5 first lines: "+tsi.getAllLines()); |
157 | 158 |
|
158 | 159 |
System.out.println("TSIndex with "+query+" and "+corpus2); |
159 |
props = new ArrayList<Property>(); |
|
160 |
props = new ArrayList<WordProperty>();
|
|
160 | 161 |
props.add(corpus2.getProperty("id")); |
161 | 162 |
tsi2 = new TSIndex(corpus2, query, props); |
162 | 163 |
System.out.println("T="+tsi2.getT()); |
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Corpus.java (revision 758) | ||
---|---|---|
124 | 124 |
|
125 | 125 |
protected static String WORD = TXMPreferences.DEFAULT_UNIT_PROPERTY; |
126 | 126 |
|
127 |
protected Property wordProperty = null; |
|
127 |
protected WordProperty wordProperty = null;
|
|
128 | 128 |
|
129 | 129 |
protected static Integer SUBCORPUS_COUNTER = new Integer(0); |
130 | 130 |
|
... | ... | |
993 | 993 |
|
994 | 994 |
abstract public int[] getStartLimits(String structural_unit_property) throws IOException, CqiServerError, InvalidCqpIdException, CqiClientException; |
995 | 995 |
|
996 |
public Property getWordProperty() throws CqiClientException { |
|
996 |
public WordProperty getWordProperty() throws CqiClientException {
|
|
997 | 997 |
if (wordProperty == null) |
998 | 998 |
wordProperty = getProperty(WORD); |
999 | 999 |
return wordProperty; |
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/WordProperty.java (revision 758) | ||
---|---|---|
22 | 22 |
public String getFullName() { |
23 | 23 |
return getName(); |
24 | 24 |
} |
25 |
|
|
26 |
|
|
27 | 25 |
|
28 | 26 |
} |
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java (revision 758) | ||
---|---|---|
37 | 37 |
import org.txm.searchengine.cqp.corpus.Property; |
38 | 38 |
import org.txm.searchengine.cqp.corpus.StructuralUnit; |
39 | 39 |
import org.txm.searchengine.cqp.corpus.StructuralUnitProperty; |
40 |
import org.txm.utils.logger.Log; |
|
40 | 41 |
|
41 | 42 |
// TODO: Auto-generated Javadoc |
42 | 43 |
/** |
... | ... | |
85 | 86 |
return null; |
86 | 87 |
} |
87 | 88 |
} |
88 |
|
|
89 |
|
|
89 | 90 |
/** |
90 | 91 |
* Instantiates a new reference pattern. |
91 | 92 |
*/ |
... | ... | |
103 | 104 |
properties.add(prop); |
104 | 105 |
this.properties = properties; |
105 | 106 |
} |
106 |
|
|
107 |
|
|
107 | 108 |
/** |
108 | 109 |
* Instantiates a new reference pattern. |
109 | 110 |
* |
... | ... | |
114 | 115 |
properties.add(prop); |
115 | 116 |
this.properties = properties; |
116 | 117 |
} |
117 |
|
|
118 |
|
|
118 | 119 |
/** |
119 | 120 |
* Instantiates a new reference pattern. |
120 | 121 |
* |
... | ... | |
123 | 124 |
public ReferencePattern(List<Property> properties) { |
124 | 125 |
this.properties = properties; |
125 | 126 |
} |
126 |
|
|
127 |
|
|
127 |
|
|
128 |
|
|
128 | 129 |
/** |
129 | 130 |
* Adds the property. |
130 | 131 |
* |
... | ... | |
173 | 174 |
public String getTitle() { |
174 | 175 |
if (this.properties == null) return "none"; |
175 | 176 |
else if (this.properties.size() == 0) return "none"; |
176 |
|
|
177 |
|
|
177 | 178 |
String title = ""; //$NON-NLS-1$ |
178 | 179 |
for (Property p : this.properties) { |
179 | 180 |
if (p == null) continue; |
... | ... | |
206 | 207 |
} |
207 | 208 |
return properties.get(0).getCorpus(); |
208 | 209 |
} |
210 |
|
|
211 |
public static List<Property> getPossibleValues(Corpus corpus) { |
|
212 |
List<Property> availableReferenceItems = new ArrayList<Property>(); |
|
213 |
try { |
|
214 |
// add word properties |
|
215 |
availableReferenceItems.addAll(corpus.getOrderedProperties()); |
|
216 |
|
|
217 |
// add structural units properties |
|
218 |
for (StructuralUnit unit : corpus.getOrderedStructuralUnits()) { |
|
219 |
availableReferenceItems.addAll(unit.getProperties()); |
|
220 |
} |
|
221 |
|
|
222 |
} catch (Exception e) { |
|
223 |
Log.printStackTrace(e); |
|
224 |
} |
|
225 |
return availableReferenceItems; |
|
226 |
} |
|
209 | 227 |
} |
tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java (revision 758) | ||
---|---|---|
52 | 52 |
import org.txm.rcp.handlers.BaseAbstractHandler; |
53 | 53 |
import org.txm.searchengine.cqp.corpus.Partition; |
54 | 54 |
import org.txm.searchengine.cqp.corpus.Property; |
55 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
55 | 56 |
import org.txm.utils.logger.Log; |
56 | 57 |
|
57 | 58 |
/** |
... | ... | |
131 | 132 |
} |
132 | 133 |
} |
133 | 134 |
|
134 |
List<Property> properties = vocabularies.get(0).getProperties(); |
|
135 |
List<WordProperty> properties = vocabularies.get(0).getProperties();
|
|
135 | 136 |
for (Index voc : vocabularies) { |
136 | 137 |
if (!properties.equals(voc.getProperties())) { |
137 | 138 |
Log.warning(NLS.bind(LexicalTableUIMessages.ComputeLexicalTable_6, properties)); |
tmp/org.txm.internalview.rcp/src/org/txm/internalview/rcp/editors/InternalViewEditor.java (revision 758) | ||
---|---|---|
141 | 141 |
structuralUnitPropertiesSelector = new PropertiesSelector<StructuralUnitProperty>(parametersArea); |
142 | 142 |
structuralUnitPropertiesSelector.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, true)); |
143 | 143 |
structuralUnitPropertiesSelector.setLayout(new GridLayout(3, false)); |
144 |
structuralUnitPropertiesSelector.setText(InternalViewUIMessages.InternalViewEditor_5);
|
|
144 |
structuralUnitPropertiesSelector.setTitle(InternalViewUIMessages.InternalViewEditor_5);
|
|
145 | 145 |
structuralUnitPropertiesSelector.addSelectionListener(computeSelectionListener); |
146 | 146 |
|
147 | 147 |
navigationPanel = getBottomToolbar().installGLComposite("navigation", 4 , false); |
... | ... | |
184 | 184 |
@Override |
185 | 185 |
public Object[] getElements(Object inputElement) { |
186 | 186 |
int nlines = internalView.getSegmentLength(); |
187 |
List<Property> props = internalView.getProperties(); |
|
187 |
List<WordProperty> props = internalView.getProperties();
|
|
188 | 188 |
|
189 | 189 |
ArrayList<Object[]> lines = new ArrayList<Object[]>(); |
190 | 190 |
for (int i = 0 ; i < nlines ; i++) { |
tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/ReferencerEditor.java (revision 758) | ||
---|---|---|
183 | 183 |
patternArea = new PropertiesSelector<StructuralUnitProperty>(paramArea, SWT.NONE); |
184 | 184 |
patternArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false,3,1)); |
185 | 185 |
patternArea.setLayout(new GridLayout(3, false)); |
186 |
patternArea.setText(ReferencerUIMessages.ReferencerEditor_6);
|
|
186 |
patternArea.setTitle(ReferencerUIMessages.ReferencerEditor_6);
|
|
187 | 187 |
patternArea.addSelectionListener(computeSelectionListener); |
188 | 188 |
|
189 | 189 |
|
tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Train.java (revision 758) | ||
---|---|---|
38 | 38 |
import org.txm.searchengine.cqp.corpus.Corpus; |
39 | 39 |
import org.txm.searchengine.cqp.corpus.MainCorpus; |
40 | 40 |
import org.txm.searchengine.cqp.corpus.Property; |
41 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
41 | 42 |
import org.txm.searchengine.cqp.corpus.query.Match; |
42 | 43 |
import org.txm.searchengine.cqp.corpus.query.Query; |
43 | 44 |
import org.txm.treetagger.core.preferences.TreeTaggerPreferences; |
... | ... | |
137 | 138 |
System.out.println("Warning: no lexicon file or given lexicon file does not exist ("+lexique2+"). Using corpus Index..."); |
138 | 139 |
|
139 | 140 |
File lexiconfile = new File(treetaggerSrcDirectory, "lexicon.txt"); |
140 |
List<Property> corpusProperties = new ArrayList<Property>();
|
|
141 |
List<WordProperty> corpusProperties = new ArrayList<WordProperty>();
|
|
141 | 142 |
corpusProperties.add(mainCorpus.getProperty("word")); |
142 | 143 |
for (String p : properties) { |
143 |
Property prop = mainCorpus.getProperty(p); |
|
144 |
WordProperty prop = mainCorpus.getProperty(p);
|
|
144 | 145 |
if (prop == null) { |
145 | 146 |
System.out.println("Error, a property is missing: "+p); |
146 | 147 |
return Status.CANCEL_STATUS; |
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java (revision 758) | ||
---|---|---|
94 | 94 |
import org.txm.searchengine.cqp.clientExceptions.CqiClientException; |
95 | 95 |
import org.txm.searchengine.cqp.corpus.Corpus; |
96 | 96 |
import org.txm.searchengine.cqp.corpus.Property; |
97 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
97 | 98 |
import org.txm.statsengine.r.rcp.views.RVariablesView; |
98 | 99 |
import org.txm.utils.logger.Log; |
99 | 100 |
|
... | ... | |
156 | 157 |
|
157 | 158 |
/** The props area. */ |
158 | 159 |
@Parameter(key=CooccurrencePreferences.PROPERTIES) |
159 |
PropertiesSelector<Property> propertiesSelector; |
|
160 |
PropertiesSelector<WordProperty> propertiesSelector;
|
|
160 | 161 |
|
161 | 162 |
|
162 | 163 |
|
... | ... | |
298 | 299 |
filtercontrols.setLayout(layout); |
299 | 300 |
|
300 | 301 |
// | Properties: word_pos [Edit] | |
301 |
propertiesSelector = new PropertiesSelector<Property>(filtercontrols, SWT.NONE); |
|
302 |
propertiesSelector = new PropertiesSelector<WordProperty>(filtercontrols, SWT.NONE);
|
|
302 | 303 |
propertiesSelector.setLayout(new GridLayout(4, false)); |
303 | 304 |
propertiesSelector.setCorpus(this.getCorpus()); |
304 |
propertiesSelector.setText(CooccurrenceUIMessages.CooccurrencesEditor_3);
|
|
305 |
propertiesSelector.setTitle(CooccurrenceUIMessages.CooccurrencesEditor_3);
|
|
305 | 306 |
//propertiesSelector.addValueChangeListener(new ComputeListener(this)); |
306 | 307 |
propertiesSelector.addSelectionListener(computeSelectionListener); |
307 | 308 |
|
... | ... | |
592 | 593 |
protected void initializeFields() { |
593 | 594 |
|
594 | 595 |
if (this.cooc.getProperties() != null) { |
595 |
List<Property> available; |
|
596 |
List<WordProperty> available;
|
|
596 | 597 |
try { |
597 |
available = new ArrayList<Property>(this.cooc.getCorpus().getProperties()); |
|
598 |
available = new ArrayList<WordProperty>(this.cooc.getCorpus().getProperties());
|
|
598 | 599 |
available.removeAll(cooc.getProperties()); |
599 | 600 |
this.propertiesSelector.setProperties(available, cooc.getProperties()); |
600 | 601 |
} catch (Exception e) { |
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java (revision 758) | ||
---|---|---|
44 | 44 |
import org.txm.searchengine.cqp.corpus.Corpus; |
45 | 45 |
import org.txm.searchengine.cqp.corpus.Property; |
46 | 46 |
import org.txm.searchengine.cqp.corpus.StructuralUnit; |
47 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
47 | 48 |
import org.txm.searchengine.cqp.corpus.query.Query; |
48 | 49 |
import org.txm.utils.logger.Log; |
49 | 50 |
|
... | ... | |
85 | 86 |
|
86 | 87 |
StructuralUnit limit = null; |
87 | 88 |
Query query = null; |
88 |
List<Property> properties = null; |
|
89 |
List<WordProperty> properties = null;
|
|
89 | 90 |
|
90 | 91 |
Concordance conc = (Concordance) selection; |
91 | 92 |
Corpus corpus = conc.getCorpus(); |
92 | 93 |
maxleft = conc.getLeftContextSize(); |
93 | 94 |
maxright = conc.getRightContextSize(); |
94 |
properties = new ArrayList<Property>(); |
|
95 |
properties = new ArrayList<WordProperty>();
|
|
95 | 96 |
properties.addAll(conc.getAnalysisProperty()); |
96 | 97 |
query = conc.getQuery(); |
97 | 98 |
|
tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java (revision 758) | ||
---|---|---|
120 | 120 |
* The word properties shown. |
121 | 121 |
*/ |
122 | 122 |
@Parameter(key=IndexPreferences.PROPERTIES) |
123 |
protected List<Property> pProperties; |
|
123 |
protected List<WordProperty> pProperties;
|
|
124 | 124 |
|
125 | 125 |
/** |
126 | 126 |
* The string used to separated property values. |
... | ... | |
384 | 384 |
|
385 | 385 |
@Override |
386 | 386 |
public boolean loadParameters() { |
387 |
this.pProperties = (List<Property>) Property.stringToProperties(getCorpus(), this.getStringParameterValue(IndexPreferences.PROPERTIES)); |
|
387 |
this.pProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), this.getStringParameterValue(IndexPreferences.PROPERTIES));
|
|
388 | 388 |
this.pQuery = new Query(this.getStringParameterValue(IndexPreferences.QUERY)); |
389 | 389 |
return true; |
390 | 390 |
} |
... | ... | |
770 | 770 |
* |
771 | 771 |
* @return the properties |
772 | 772 |
*/ |
773 |
public List<Property> getProperties() { |
|
773 |
public List<WordProperty> getProperties() {
|
|
774 | 774 |
return this.pProperties; |
775 | 775 |
} |
776 | 776 |
|
... | ... | |
988 | 988 |
this.pNLinesPerPage = Math.max(nLinesPerPage, 1); |
989 | 989 |
} |
990 | 990 |
|
991 |
public void setParameters(List<Property> props) { |
|
991 |
public void setParameters(List<WordProperty> props) {
|
|
992 | 992 |
this.pQuery = new Query("[]"); //$NON-NLS-1$ |
993 | 993 |
this.pProperties = props; |
994 | 994 |
this.lexicon = null; |
... | ... | |
1006 | 1006 |
* Sets the properties. |
1007 | 1007 |
* @param properties |
1008 | 1008 |
*/ |
1009 |
public void setProperties(List<Property> properties) { |
|
1009 |
public void setProperties(List<WordProperty> properties) {
|
|
1010 | 1010 |
this.pProperties = properties; |
1011 | 1011 |
} |
1012 | 1012 |
|
... | ... | |
1015 | 1015 |
* Clears all existing properties. |
1016 | 1016 |
* @param property |
1017 | 1017 |
*/ |
1018 |
public void setProperty(Property property) { |
|
1019 |
List<Property> properties = new ArrayList<Property>();
|
|
1018 |
public void setProperty(WordProperty property) {
|
|
1019 |
List<WordProperty> properties = new ArrayList<WordProperty>();
|
|
1020 | 1020 |
properties.add(property); |
1021 | 1021 |
this.setProperties(properties); |
1022 | 1022 |
} |
1023 | 1023 |
|
1024 | 1024 |
|
1025 | 1025 |
|
1026 |
public void setParameters(Query query, List<Property> props, Integer filterFmin, Integer filterFmax, Integer filterVmax, Integer nLinesPerPage) { |
|
1026 |
public void setParameters(Query query, List<WordProperty> props, Integer filterFmin, Integer filterFmax, Integer filterVmax, Integer nLinesPerPage) {
|
|
1027 | 1027 |
this.pQuery = query; |
1028 | 1028 |
this.pProperties = props; |
1029 | 1029 |
if (filterFmax != null) this.pFmaxFilter = filterFmax; |
... | ... | |
1035 | 1035 |
@Override |
1036 | 1036 |
public boolean setParameters(TXMParameters parameters) { |
1037 | 1037 |
try { |
1038 |
List<Property> props = (List<Property>) parameters.get("props"); //$NON-NLS-1$
|
|
1038 |
List<WordProperty> props = (List<WordProperty>) parameters.get("props"); //$NON-NLS-1$
|
|
1039 | 1039 |
Query query = (Query) parameters.get("query"); //$NON-NLS-1$ |
1040 | 1040 |
Integer filterFmin = (Integer) parameters.get("filterFmin"); //$NON-NLS-1$ |
1041 | 1041 |
Integer filterFmax = (Integer) parameters.get("filterFmax"); //$NON-NLS-1$ |
tmp/org.txm.index.core/groovy/org/txm/test/TestIndex.java (revision 758) | ||
---|---|---|
11 | 11 |
import org.txm.searchengine.cqp.corpus.CorpusManager; |
12 | 12 |
import org.txm.searchengine.cqp.corpus.Partition; |
13 | 13 |
import org.txm.searchengine.cqp.corpus.Property; |
14 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
14 | 15 |
import org.txm.searchengine.cqp.corpus.query.Query; |
15 | 16 |
|
16 | 17 |
/** |
... | ... | |
57 | 58 |
} |
58 | 59 |
Query query = new Query(Query.fixQuery(queryString)); |
59 | 60 |
|
60 |
List<Property> properties = new ArrayList<Property>();
|
|
61 |
List<WordProperty> properties = new ArrayList<WordProperty>();
|
|
61 | 62 |
for (String p : propertiesString) properties.add(corpus.getProperty(p)); |
62 | 63 |
|
63 | 64 |
Index index = new Index(corpus); |
... | ... | |
85 | 86 |
|
86 | 87 |
Query query = new Query(Query.fixQuery(queryString)); |
87 | 88 |
|
88 |
List<Property> properties = new ArrayList<Property>();
|
|
89 |
List<WordProperty> properties = new ArrayList<WordProperty>();
|
|
89 | 90 |
for (String p : propertiesString) properties.add(corpus.getProperty(p)); |
90 | 91 |
|
91 | 92 |
Index index = new Index(partition); |
tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/actions/SortPropertySelection.java (revision 758) | ||
---|---|---|
37 | 37 |
import org.eclipse.ui.IWorkbenchWindow; |
38 | 38 |
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; |
39 | 39 |
import org.txm.searchengine.cqp.corpus.Property; |
40 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
40 | 41 |
import org.txm.concordance.rcp.editors.ConcordanceEditor; |
41 | 42 |
import org.txm.concordance.rcp.editors.SortPropertySelectionDialog; |
42 | 43 |
import org.txm.rcp.messages.TXMUIMessages; |
... | ... | |
53 | 54 |
private ConcordanceEditor concordanceEditor; |
54 | 55 |
|
55 | 56 |
/** The available view properties. */ |
56 |
List<Property> availableSortProperties; |
|
57 |
List<WordProperty> availableSortProperties;
|
|
57 | 58 |
|
58 | 59 |
/** The selected view properties. */ |
59 |
List<Property> selectedSortProperties; |
|
60 |
List<WordProperty> selectedSortProperties;
|
|
60 | 61 |
|
61 | 62 |
/** |
62 | 63 |
* Instantiates a new view property selection. |
... | ... | |
88 | 89 |
int columnid = concordanceEditor.getPointedColumn(); // get the column id |
89 | 90 |
IWorkbenchPartSite site = concordanceEditor.getSite(); |
90 | 91 |
|
91 |
List<Property> selectedSortProperties = new ArrayList<Property>();
|
|
92 |
List<WordProperty> selectedSortProperties = new ArrayList<WordProperty>();
|
|
92 | 93 |
switch (columnid) // the selected properties depends on the columns |
93 | 94 |
{ |
94 | 95 |
case 1: |
tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/actions/ViewPropertySelection.java (revision 758) | ||
---|---|---|
37 | 37 |
import org.eclipse.ui.IWorkbenchWindow; |
38 | 38 |
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; |
39 | 39 |
import org.txm.searchengine.cqp.corpus.Property; |
40 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
40 | 41 |
import org.txm.concordance.rcp.editors.ConcordanceEditor; |
41 | 42 |
import org.txm.rcp.messages.TXMUIMessages; |
42 | 43 |
import org.txm.rcp.swt.dialog.ViewPropertySelectionDialog; |
... | ... | |
53 | 54 |
private ConcordanceEditor concordanceEditor; |
54 | 55 |
|
55 | 56 |
/** The available view properties. */ |
56 |
List<Property> availableViewProperties; |
|
57 |
List<WordProperty> availableViewProperties;
|
|
57 | 58 |
|
58 | 59 |
/** The selected view properties. */ |
59 |
List<Property> selectedViewProperties; |
|
60 |
List<WordProperty> selectedViewProperties;
|
|
60 | 61 |
|
61 | 62 |
/** |
62 | 63 |
* Instantiates a new view property selection. |
... | ... | |
88 | 89 |
int columnid = concordanceEditor.getPointedColumn(); |
89 | 90 |
IWorkbenchPartSite site = concordanceEditor.getSite(); |
90 | 91 |
|
91 |
List<Property> selectedViewProperties = new ArrayList<Property>();
|
|
92 |
List<WordProperty> selectedViewProperties = new ArrayList<WordProperty>();
|
|
92 | 93 |
switch (columnid) // the selected properties depends on the columns |
93 | 94 |
{ |
94 | 95 |
case 1: |
tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/actions/SetSortProperty.java (revision 758) | ||
---|---|---|
46 | 46 |
import org.txm.concordance.rcp.editors.ConcordanceEditor; |
47 | 47 |
import org.txm.rcp.messages.TXMUIMessages; |
48 | 48 |
import org.txm.searchengine.cqp.corpus.Property; |
49 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
49 | 50 |
|
50 | 51 |
// TODO: Auto-generated Javadoc |
51 | 52 |
/** |
... | ... | |
96 | 97 |
*/ |
97 | 98 |
@Override |
98 | 99 |
public void run() { |
99 |
List<Property> selectedProperty; |
|
100 |
List<WordProperty> selectedProperty;
|
|
100 | 101 |
int columnid = concordanceEditor.getPointedColumn(); |
101 | 102 |
switch (columnid) // the selected properties depends on the columns |
102 | 103 |
{ |
... | ... | |
141 | 142 |
private class SetSortPropertyDialog extends Dialog { |
142 | 143 |
|
143 | 144 |
/** The properties. */ |
144 |
private final List<Property> properties; |
|
145 |
private final List<WordProperty> properties;
|
|
145 | 146 |
|
146 | 147 |
/** The buttons. */ |
147 | 148 |
private List<Button> buttons; |
148 | 149 |
|
149 | 150 |
/** The selected property. */ |
150 |
private List<Property> selectedProperty; |
|
151 |
private List<WordProperty> selectedProperty;
|
|
151 | 152 |
|
152 | 153 |
/** |
153 | 154 |
* Instantiates a new sets the sort property dialog. |
... | ... | |
156 | 157 |
* @param properties the properties |
157 | 158 |
* @param selectedProperty2 the selected property |
158 | 159 |
*/ |
159 |
public SetSortPropertyDialog(Shell shell, List<Property> properties, |
|
160 |
List<Property> selectedProperty2) { |
|
160 |
public SetSortPropertyDialog(Shell shell, List<WordProperty> properties,
|
|
161 |
List<WordProperty> selectedProperty2) {
|
|
161 | 162 |
super(shell); |
162 | 163 |
this.properties = properties; |
163 | 164 |
this.selectedProperty = selectedProperty2; |
... | ... | |
203 | 204 |
* |
204 | 205 |
* @return the selected property |
205 | 206 |
*/ |
206 |
public List<Property> getSelectedProperty() { |
|
207 |
public List<WordProperty> getSelectedProperty() {
|
|
207 | 208 |
return selectedProperty; |
208 | 209 |
} |
209 | 210 |
} |
tmp/org.txm.concordance.rcp/src/org/txm/concordance/rcp/editors/SortPropertySelectionDialog.java (revision 758) | ||
---|---|---|
45 | 45 |
import org.txm.rcp.messages.TXMUIMessages; |
46 | 46 |
import org.txm.searchengine.cqp.corpus.Property; |
47 | 47 |
import org.txm.searchengine.cqp.corpus.StructuralUnitProperty; |
48 |
import org.txm.searchengine.cqp.corpus.WordProperty; |
|
48 | 49 |
|
49 | 50 |
// TODO: Auto-generated Javadoc |
50 | 51 |
/** |
... | ... | |
53 | 54 |
public class SortPropertySelectionDialog extends Dialog { |
54 | 55 |
|
55 | 56 |
/** The available properties. */ |
56 |
final private List<Property> availableProperties; |
|
57 |
final private List<WordProperty> availableProperties;
|
|
57 | 58 |
|
58 | 59 |
/** The selected properties. */ |
59 |
final private List<Property> selectedProperties; |
|
60 |
final private List<WordProperty> selectedProperties;
|
|
60 | 61 |
|
61 | 62 |
/** The maxprops. */ |
62 | 63 |
int maxprops = -1; |
... | ... | |
75 | 76 |
* @param selectedProperties the selected properties |
76 | 77 |
*/ |
77 | 78 |
public SortPropertySelectionDialog(IShellProvider parentShell, |
78 |
List<Property> availableProperties, |
|
79 |
List<Property> selectedProperties) { |
Also available in: Unified diff