Révision 289
tmp/org.txm.core/src/java/org/txm/Toolbox.java (revision 289) | ||
---|---|---|
62 | 62 |
import org.txm.statsengine.r.core.RStatsEngine; |
63 | 63 |
import org.txm.statsengine.r.core.exceptions.RWorkspaceException; |
64 | 64 |
import org.txm.utils.OSDetector; |
65 |
//import org.txm.tbx.chartsengine.jfreechart.JFCChartsEngine; |
|
66 |
//import org.txm.tbx.chartsengine.r.RChartsEngine; |
|
67 |
//import org.txm.tbx.chartsengine.r.RDevice; |
|
68 | 65 |
import org.txm.utils.Sh; |
69 | 66 |
import org.txm.utils.logger.Log; |
70 | 67 |
|
... | ... | |
493 | 490 |
// props.setProperty(R_SVG_DEVICE, "svg"); //$NON-NLS-1$ |
494 | 491 |
// } |
495 | 492 |
|
496 |
// if (props.getProperty(ChartsEngine.PROP_CHARTS_ENGINE_NAME) == null) { |
|
497 |
// props.setProperty(ChartsEngine.PROP_CHARTS_ENGINE_NAME, "jfreechart_charts_engine"); //$NON-NLS-1$ |
|
498 |
// } |
|
499 |
// if (props.getProperty(ChartsEngine.PROP_CHARTS_ENGINE_OUTPUT_FORMAT) == null) { |
|
500 |
// props.setProperty(ChartsEngine.PROP_CHARTS_ENGINE_OUTPUT_FORMAT, "JFreeChart/Java2D"); //$NON-NLS-1$ |
|
501 |
// } |
|
502 |
|
|
503 |
|
|
504 | 493 |
if (props.getProperty(TREETAGGER_INSTALL_PATH) == null |
505 | 494 |
|| props.getProperty(TREETAGGER_INSTALL_PATH).equals("")) //$NON-NLS-1$ |
506 | 495 |
props.setProperty(TREETAGGER_INSTALL_PATH, System |
tmp/org.txm.core/src/java/org/txm/functions/Function.java (revision 289) | ||
---|---|---|
141 | 141 |
} |
142 | 142 |
|
143 | 143 |
//public abstract boolean toTxt(File file, String encoding) throws Exception; |
144 |
@Deprecated |
|
145 |
//FIXME: should be moved in an exporter extension |
|
144 | 146 |
public abstract boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception; |
145 | 147 |
|
146 | 148 |
|
... | ... | |
151 | 153 |
* |
152 | 154 |
* @return the array of extensions to show in the FileDialog SWT widget |
153 | 155 |
*/ |
156 |
@Deprecated |
|
157 |
//FIXME: should be moved in an exporter extension |
|
154 | 158 |
public String[] getExportTXTExtensions() { |
155 | 159 |
return new String[]{"*.csv"}; |
156 | 160 |
} |
tmp/org.txm.core/src/java/org/txm/core/messages/messages.properties (revision 289) | ||
---|---|---|
36 | 36 |
Concordance_15 = Keyword |
37 | 37 |
Concordance_16 = RightContext |
38 | 38 |
Concordance_17 = Reference |
39 |
Concordance_18 = |
|
39 | 40 |
Concordance_19 = Context |
40 | 41 |
Concordance_2 = undefined |
41 | 42 |
Concordance_3 = \ results retrieved in |
42 | 43 |
Concordance_4 = Failed to remove QueryResult from CQP: |
44 |
Concordance_5 = |
|
43 | 45 |
Concordance_6 = Retrieving |
44 | 46 |
Concordance_7 = \ results |
45 | 47 |
Concordance_8 = Failed to get texts limits: |
... | ... | |
162 | 164 |
|
163 | 165 |
INT_VECTOR_ADDED_TO_WORKSPACE = Vector "{1}" ({0,number,integer} "int") transmitted to Statistics Engine. |
164 | 166 |
|
165 |
Index_0 = ** Error while computing lexicon:\n |
|
166 |
Index_1 = Console : |
|
167 |
Index_7 = ** Failed to export Lexicon : |
|
168 |
|
|
169 | 167 |
InternalView_3 = \ Structure informations: |
170 | 168 |
InternalView_6 = InternalView: failed to retrieve struct properties values: |
171 | 169 |
InternalView_7 = \ No structure informations |
... | ... | |
180 | 178 |
|
181 | 179 |
LexicographicRightContextComparator_0 = Right context |
182 | 180 |
|
183 |
Lexicon_0 = Forms and frequencies tables must be of the same length. |
|
184 |
Lexicon_3 = Lexicon : |
|
185 |
|
|
186 | 181 |
MATRIX_ADDED_TO_WORKSPACE = Matrix "{2}" ({0,number,integer} rows and {1,number,integer} columns) transmitted to Statistics Engine. |
187 | 182 |
|
188 | 183 |
MainCorpus_0 = \ is not a valid CQP ID for a corpus. It must be in uppercase characters. |
tmp/org.txm.core/src/java/org/txm/core/messages/TXMCoreMessages.java (revision 289) | ||
---|---|---|
1 | 1 |
package org.txm.core.messages; |
2 | 2 |
|
3 | 3 |
import org.eclipse.osgi.util.NLS; |
4 |
import org.txm.utils.messages.Utf8NLS; |
|
4 | 5 |
|
5 | 6 |
/** |
6 | 7 |
* Toolbox core messages. |
... | ... | |
160 | 161 |
public static String LexicographicKeywordComparator_0; |
161 | 162 |
public static String LexicographicLeftContextComparator_0; |
162 | 163 |
public static String LexicographicRightContextComparator_0; |
163 |
public static String Lexicon_0; |
|
164 |
public static String Lexicon_3; |
|
165 | 164 |
public static String MATRIX_ADDED_TO_WORKSPACE; |
166 | 165 |
public static String MainCorpus_0; |
167 | 166 |
public static String MainCorpus_1; |
... | ... | |
357 | 356 |
public static String ValidateXml_1; |
358 | 357 |
public static String ValidateXml_2; |
359 | 358 |
public static String ValidateXml_3; |
360 |
public static String Index_0; |
|
361 |
public static String Index_1; |
|
362 |
public static String Index_7; |
|
363 | 359 |
public static String WORKSPACE_PURGED; |
364 | 360 |
public static String Workspace_0; |
365 | 361 |
public static String Workspace_1; |
tmp/org.txm.core/src/java/org/txm/core/messages/messages_fr.properties (revision 289) | ||
---|---|---|
160 | 160 |
|
161 | 161 |
INT_VECTOR_ADDED_TO_WORKSPACE = Le vecteur "{1}" ({0,number,integer} valeurs numériques "entières") a été transmis au Moteur Statistique. |
162 | 162 |
|
163 |
Index_0 = ** Erreur lors du calcul du lexique : \n |
|
164 |
Index_1 = console : |
|
165 |
Index_7 = ** Echec de l'exportation du Lexique : |
|
166 |
|
|
167 | 163 |
InternalView_3 = \ Information des structures : |
168 | 164 |
InternalView_6 = InternalView: erreur lors de la récupération des valeurs des propriétés de structure |
169 | 165 |
InternalView_7 = \ No d'informations sur les structures |
... | ... | |
178 | 174 |
|
179 | 175 |
LexicographicRightContextComparator_0 = Contexte droit |
180 | 176 |
|
181 |
Lexicon_0 = Le tableau des formes et des fréquences doivent avoir la même longueur. |
|
182 |
Lexicon_3 = Lexique : |
|
183 |
|
|
184 | 177 |
MATRIX_ADDED_TO_WORKSPACE = La matrice "{2}" ({0,number,integer} lignes et {1,number,integer} colonnes) a été transmise au Moteur Statistique. |
185 | 178 |
|
186 | 179 |
MainCorpus_0 = \ n'est pas un identifiant de corpus CQP valide. Il doit être en majuscule. |
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 289) | ||
---|---|---|
35 | 35 |
*/ |
36 | 36 |
protected ArrayList<ITXMResult> children; |
37 | 37 |
|
38 |
/** |
|
39 |
* The visibility state. |
|
40 |
*/ |
|
41 |
protected boolean visible; |
|
38 | 42 |
|
39 | 43 |
|
40 | 44 |
/** |
... | ... | |
51 | 55 |
*/ |
52 | 56 |
public TXMResult(ITXMResult parent) { |
53 | 57 |
this.weight = 0; |
58 |
this.visible = true; |
|
54 | 59 |
if(parent != null) { |
55 | 60 |
parent.addResult(this); |
56 | 61 |
} |
... | ... | |
59 | 64 |
|
60 | 65 |
|
61 | 66 |
|
62 |
/** |
|
63 |
* Deletes the object from its parent, also deletes the children. |
|
64 |
* The <code>TXMResult.clean()</code> methods of this result and children results are applied before the deletion. |
|
65 |
* @return |
|
66 |
*/ |
|
67 |
@Override |
|
67 | 68 |
synchronized public boolean delete() { |
68 | 69 |
|
69 | 70 |
try { |
70 | 71 |
//FIXME: debug |
71 |
System.err.println("TXMResult.delete()"); |
|
72 |
//System.err.println("TXMResult.delete()");
|
|
72 | 73 |
|
73 | 74 |
|
74 | 75 |
// remove children and clean resources |
... | ... | |
85 | 86 |
return true; |
86 | 87 |
} |
87 | 88 |
catch(Exception e) { |
88 |
e.printStackTrace(); |
|
89 | 89 |
} |
90 | 90 |
return false; |
91 | 91 |
} |
92 | 92 |
|
93 |
/** |
|
94 |
* Adds a child result to this result. |
|
95 |
* If the child already exists it will not be added. |
|
96 |
* @param child |
|
97 |
* @return |
|
98 |
*/ |
|
93 |
|
|
94 |
@Override |
|
99 | 95 |
synchronized public boolean addResult(ITXMResult child) { |
100 |
child.setParent(this); |
|
101 |
if(!this.children.contains(child)) { |
|
102 |
//FIXME: Debug |
|
103 |
//System.err.println("TXMResult.addResult(); adding child " + child + " to parent " + this); |
|
104 |
return this.children.add(child); |
|
96 |
try { |
|
97 |
//remove from current parent if exists |
|
98 |
child.removeFromParent(); |
|
99 |
|
|
100 |
child.setParent(this); |
|
101 |
if(!this.children.contains(child)) { |
|
102 |
//FIXME: Debug |
|
103 |
//System.err.println("TXMResult.addResult(); adding child " + child + " to parent " + this); |
|
104 |
return this.children.add(child); |
|
105 |
} |
|
105 | 106 |
} |
107 |
catch(Exception e) { |
|
108 |
} |
|
106 | 109 |
return false; |
107 | 110 |
} |
108 | 111 |
|
109 | 112 |
|
110 |
/** |
|
111 |
* Adds a child result to this result. |
|
112 |
* @param index |
|
113 |
* @param child |
|
114 |
* @return |
|
115 |
*/ |
|
113 |
@Override |
|
116 | 114 |
synchronized public boolean addResult(int index, ITXMResult child) { |
117 | 115 |
try { |
118 |
child.setParent(this); |
|
119 |
this.children.add(index, child); |
|
120 |
return true; |
|
116 |
if(!this.children.contains(child)) { |
|
117 |
child.setParent(this); |
|
118 |
//FIXME: Debug |
|
119 |
//System.err.println("TXMResult.addResult(); adding child " + child + " to parent " + this); |
|
120 |
this.children.add(index, child); |
|
121 |
return true; |
|
122 |
} |
|
121 | 123 |
} |
122 | 124 |
catch(Exception e) { |
123 | 125 |
} |
124 | 126 |
return false; |
125 | 127 |
} |
126 | 128 |
|
127 |
/** |
|
128 |
* Removes the specified child result. |
|
129 |
* @param child |
|
130 |
* @return <code>true if the child has been removed, otherwise <code>false</code> |
|
131 |
*/ |
|
129 |
@Override |
|
132 | 130 |
synchronized public boolean removeResult(ITXMResult child) { |
133 | 131 |
try { |
134 |
child.removeParent();
|
|
132 |
child.setParent(null);
|
|
135 | 133 |
return this.children.remove(child); |
136 | 134 |
} |
137 | 135 |
catch(Exception e) { |
... | ... | |
139 | 137 |
return false; |
140 | 138 |
} |
141 | 139 |
|
142 |
/** |
|
143 |
* Removes the child result specified by its index. |
|
144 |
* @param index |
|
145 |
* @return <code>true if the child has been removed, otherwise <code>false</code> |
|
146 |
*/ |
|
147 |
public boolean removeResult(int index) { |
|
140 |
@Override |
|
141 |
synchronized public boolean removeResult(int index) { |
|
148 | 142 |
try { |
149 | 143 |
return this.removeResult(this.children.get(index)); |
150 | 144 |
} |
... | ... | |
152 | 146 |
} |
153 | 147 |
return false; |
154 | 148 |
} |
149 |
|
|
150 |
@Override |
|
151 |
synchronized public boolean removeFromParent() { |
|
152 |
try { |
|
153 |
return this.parent.removeResult(this); |
|
154 |
} |
|
155 |
catch(Exception e) { |
|
156 |
} |
|
157 |
return false; |
|
158 |
} |
|
155 | 159 |
|
156 |
|
|
157 |
/** |
|
158 |
* Gets the children results. |
|
159 |
* @return |
|
160 |
*/ |
|
161 |
public ArrayList<ITXMResult> getResults() { |
|
160 |
@Override |
|
161 |
synchronized public ArrayList<ITXMResult> getResults() { |
|
162 | 162 |
return this.children; |
163 | 163 |
} |
164 | 164 |
|
165 |
|
|
166 |
@Override |
|
167 |
synchronized public ArrayList<ITXMResult> getResults(boolean onlyVisible) { |
|
168 |
return this.getResults(null, onlyVisible); |
|
169 |
} |
|
170 |
|
|
165 | 171 |
|
166 |
/** |
|
167 |
* Gets the children results specified by their class. |
|
168 |
* @param type |
|
169 |
* @return |
|
170 |
*/ |
|
171 |
public ArrayList<ITXMResult> getResults(Class type) { |
|
172 |
return TXMResult.getNodes(this.children, type); |
|
172 |
|
|
173 |
@Override |
|
174 |
synchronized public ArrayList<ITXMResult> getResults(Class type, boolean onlyVisible) { |
|
175 |
return TXMResult.getNodes(this.children, type, onlyVisible); |
|
173 | 176 |
} |
174 | 177 |
|
175 |
|
|
178 |
|
|
176 | 179 |
/** |
177 | 180 |
* Gets the children of all the branch in a flat list. |
178 | 181 |
* @return |
179 | 182 |
*/ |
180 |
protected ArrayList<ITXMResult> getDeepResults(ITXMResult parent, ArrayList<ITXMResult> results) { |
|
183 |
synchronized protected ArrayList<ITXMResult> getDeepResults(ITXMResult parent, ArrayList<ITXMResult> results) {
|
|
181 | 184 |
//FIXME: need to prove this method |
182 | 185 |
System.err.println("TXMResult2.getDeepResults(ITXMResult parent, ArrayList<ITXMResult> results): NEED TO VALIDATE THIS METHOD"); |
183 | 186 |
for(int i = 0; i < parent.getResults().size(); i++) { |
... | ... | |
186 | 189 |
return results; |
187 | 190 |
} |
188 | 191 |
|
189 |
/** |
|
190 |
* Gets the children of all the branch in a flat list. |
|
191 |
* @return |
|
192 |
*/ |
|
193 |
public ArrayList<ITXMResult> getDeepResults() { |
|
192 |
@Override |
|
193 |
synchronized public ArrayList<ITXMResult> getDeepResults() { |
|
194 | 194 |
//FIXME: need to prove this method |
195 | 195 |
System.err.println("TXMResult2.getDeepResults(): NEED TO VALIDATE THIS METHOD"); |
196 | 196 |
return this.getDeepResults(this, new ArrayList<ITXMResult>()); |
... | ... | |
199 | 199 |
|
200 | 200 |
|
201 | 201 |
/** |
202 |
* Filters the nodes specified by their class. |
|
202 |
* Filters the nodes specified by their class and their visibility state.
|
|
203 | 203 |
* @param type |
204 | 204 |
* @return |
205 | 205 |
*/ |
206 |
public static ArrayList<ITXMResult> getNodes(ArrayList<ITXMResult> srcNodes, Class type) { |
|
206 |
public static ArrayList<ITXMResult> getNodes(ArrayList<ITXMResult> srcNodes, Class type, boolean onlyVisible) {
|
|
207 | 207 |
ArrayList<ITXMResult> nodes = new ArrayList<ITXMResult>(); |
208 | 208 |
for(int i = 0; i < srcNodes.size(); i++) { |
209 |
if(srcNodes.get(i).getClass().equals(type)) {
|
|
209 |
if((type == null || srcNodes.get(i).getClass().equals(type)) && (onlyVisible == false || srcNodes.get(i).isVisible())) {
|
|
210 | 210 |
nodes.add(srcNodes.get(i)); |
211 | 211 |
} |
212 | 212 |
} |
... | ... | |
215 | 215 |
|
216 | 216 |
|
217 | 217 |
|
218 |
/** |
|
219 |
* Gets the sibling nodes of this node result. |
|
220 |
*/ |
|
221 |
public ArrayList<ITXMResult> getSiblings() { |
|
218 |
@Override |
|
219 |
synchronized public ArrayList<ITXMResult> getSiblings() { |
|
222 | 220 |
ArrayList<ITXMResult> sibling = new ArrayList<ITXMResult>(); |
223 | 221 |
if(this.parent != null) { |
224 | 222 |
sibling.addAll(this.parent.getResults()); |
... | ... | |
231 | 229 |
/** |
232 | 230 |
* Gets the sibling nodes of this node result, specified by their class. |
233 | 231 |
*/ |
234 |
public ArrayList<ITXMResult> getSiblings(Class type) { |
|
232 |
synchronized public ArrayList<ITXMResult> getSiblings(Class type) {
|
|
235 | 233 |
ArrayList<ITXMResult> sibling = new ArrayList<ITXMResult>(); |
236 | 234 |
if(this.parent != null) { |
237 |
sibling.addAll(TXMResult.getNodes(this.parent.getResults(), type)); |
|
235 |
sibling.addAll(TXMResult.getNodes(this.parent.getResults(), type, true));
|
|
238 | 236 |
sibling.remove(this); |
239 | 237 |
} |
240 | 238 |
return sibling; |
241 | 239 |
} |
242 | 240 |
|
243 | 241 |
|
242 |
@Override |
|
243 |
public boolean isVisible() { |
|
244 |
return this.visible; |
|
245 |
} |
|
244 | 246 |
|
245 |
/** |
|
246 |
* Removes the parent. |
|
247 |
*/ |
|
248 |
public void removeParent() { |
|
249 |
this.parent = null; |
|
247 |
@Override |
|
248 |
public void setVisible(boolean visible) { |
|
249 |
this.visible = visible; |
|
250 | 250 |
} |
251 |
|
|
252 |
|
|
251 | 253 |
|
252 |
/** |
|
253 |
* Sets the parent. |
|
254 |
* @param parent |
|
255 |
*/ |
|
254 |
@Override |
|
256 | 255 |
public void setParent(ITXMResult parent) { |
257 | 256 |
this.parent = parent; |
258 | 257 |
} |
259 | 258 |
|
260 | 259 |
|
261 |
/** |
|
262 |
* Gets the parent. |
|
263 |
* @return the parent |
|
264 |
*/ |
|
260 |
@Override |
|
265 | 261 |
public ITXMResult getParent() { |
266 | 262 |
return parent; |
267 | 263 |
} |
268 | 264 |
|
269 | 265 |
|
270 |
/** |
|
271 |
* Gets the name of the result. |
|
272 |
* @return |
|
273 |
*/ |
|
266 |
@Override |
|
274 | 267 |
public abstract String getName(); |
275 | 268 |
|
276 |
/** |
|
277 |
* Gets the simple name of the result. |
|
278 |
* @return |
|
279 |
*/ |
|
269 |
@Override |
|
280 | 270 |
public abstract String getSimpleName(); |
281 | 271 |
|
282 |
/** |
|
283 |
* Gets some details about how the result has been computed (eg. additional parameters, etc.). |
|
284 |
* @return |
|
285 |
*/ |
|
272 |
@Override |
|
286 | 273 |
public abstract String getDetails(); |
287 | 274 |
|
288 |
/** |
|
289 |
* Gets a string representing the result and that can be used as a file name. |
|
290 |
* @return |
|
291 |
*/ |
|
292 | 275 |
//FIXME: to discuss and/or to move in export layer |
276 |
@Override |
|
293 | 277 |
public String getValidFileName() { |
294 | 278 |
try { |
295 | 279 |
return this.getName().replaceAll("[^a-zA-Z0-9\\._-]+", "_"); |
... | ... | |
299 | 283 |
return ""; |
300 | 284 |
} |
301 | 285 |
|
302 |
/** |
|
303 |
* Gets a string representing the concatenation of the simple names of the branch of this result. |
|
304 |
* @return |
|
305 |
*/ |
|
286 |
@Override |
|
306 | 287 |
synchronized public String getFullPathSimpleName() { |
307 | 288 |
|
308 | 289 |
// fill the branch |
... | ... | |
328 | 309 |
|
329 | 310 |
|
330 | 311 |
|
331 |
@Override |
|
332 |
public String toString() { |
|
333 |
StringBuilder b = new StringBuilder(super.toString()); |
|
334 |
b.append(": " + this.getName()); //$NON-NLS-1$ |
|
335 |
return b.toString(); |
|
336 |
} |
|
312 |
// @Override
|
|
313 |
// public String toString() {
|
|
314 |
// StringBuilder b = new StringBuilder(super.toString());
|
|
315 |
// b.append(": " + this.getName()); //$NON-NLS-1$
|
|
316 |
// return b.toString();
|
|
317 |
// }
|
|
337 | 318 |
|
338 | 319 |
|
339 |
/** |
|
340 |
* Gets the weight of the node. Essentially used for sorting purpose. |
|
341 |
* @return the weight |
|
342 |
*/ |
|
320 |
@Override |
|
343 | 321 |
public int getWeight() { |
344 | 322 |
return weight; |
345 | 323 |
} |
346 | 324 |
|
347 |
/** |
|
348 |
* Cleans and free some resources if needed. |
|
349 |
* This methods is applied when calling <code>TXMResult.delete()</code>. |
|
350 |
*/ |
|
325 |
@Override |
|
351 | 326 |
public abstract void clean(); |
352 | 327 |
|
353 | 328 |
|
tmp/org.txm.core/src/java/org/txm/core/results/ITXMResult.java (revision 289) | ||
---|---|---|
50 | 50 |
*/ |
51 | 51 |
public boolean removeResult(int index); |
52 | 52 |
|
53 |
/** |
|
54 |
* Removes the result from its parent. |
|
55 |
* @return |
|
56 |
*/ |
|
57 |
public boolean removeFromParent(); |
|
53 | 58 |
|
54 | 59 |
/** |
55 |
* Gets the children results. |
|
60 |
* Gets all the children results.
|
|
56 | 61 |
* @return |
57 | 62 |
*/ |
58 | 63 |
public ArrayList<ITXMResult> getResults(); |
59 | 64 |
|
65 |
/** |
|
66 |
* Gets the children results. |
|
67 |
* @return |
|
68 |
*/ |
|
69 |
public ArrayList<ITXMResult> getResults(boolean onlyVisible); |
|
60 | 70 |
|
61 | 71 |
/** |
72 |
* Checks if the result must be displayed. |
|
73 |
* @return |
|
74 |
*/ |
|
75 |
public boolean isVisible(); |
|
76 |
|
|
77 |
/** |
|
78 |
* Sets the result visibility state. |
|
79 |
* @param visible |
|
80 |
* @return |
|
81 |
*/ |
|
82 |
public void setVisible(boolean visible); |
|
83 |
|
|
84 |
|
|
85 |
/** |
|
62 | 86 |
* Gets the children results specified by their class. |
63 | 87 |
* @param type |
64 | 88 |
* @return |
65 | 89 |
*/ |
66 |
public ArrayList<ITXMResult> getResults(Class type); |
|
90 |
public ArrayList<ITXMResult> getResults(Class type, boolean onlyVisible);
|
|
67 | 91 |
|
68 | 92 |
/** |
69 | 93 |
* Gets the children of all the branch in a flat list. |
... | ... | |
81 | 105 |
*/ |
82 | 106 |
public ArrayList<ITXMResult> getSiblings(Class type); |
83 | 107 |
|
84 |
/** |
|
85 |
* Removes the parent. |
|
86 |
*/ |
|
87 |
public void removeParent(); |
|
88 | 108 |
|
89 | 109 |
/** |
90 | 110 |
* Sets the parent. |
tmp/org.txm.core/src/java/org/txm/searchengine/cqp/corpus/Corpus.java (revision 289) | ||
---|---|---|
898 | 898 |
*/ |
899 | 899 |
public abstract Property getProperty(String name) throws CqiClientException; |
900 | 900 |
|
901 |
/** |
|
902 |
* Gets the results of textometric computation stored in the corpus. |
|
903 |
* |
|
904 |
* @return the results |
|
905 |
*/ |
|
906 |
@Override |
|
907 |
public ArrayList<ITXMResult> getResults() { |
|
908 |
ArrayList<ITXMResult> allResults = new ArrayList<ITXMResult>(); |
|
909 |
allResults.addAll(this.children); |
|
910 |
allResults.addAll(this.lexicons.values()); |
|
911 |
return allResults; |
|
912 |
} |
|
901 |
|
|
902 |
//FIXME: to remove when proved, should not be useful anymore in new TXMResult hierarchy |
|
903 |
// /** |
|
904 |
// * Gets the results of textometric computation stored in the corpus. |
|
905 |
// * |
|
906 |
// * @return the results |
|
907 |
// */ |
|
908 |
// @Override |
|
909 |
// public ArrayList<ITXMResult> getResults() { |
|
910 |
// ArrayList<ITXMResult> allResults = new ArrayList<ITXMResult>(); |
|
911 |
// allResults.addAll(this.children); |
|
912 |
// allResults.addAll(this.lexicons.values()); |
|
913 |
// return allResults; |
|
914 |
// } |
|
913 | 915 |
|
914 | 916 |
/** |
915 | 917 |
* Gets the CQP size of the corpus. |
tmp/org.txm.core/src/groovy/org/txm/importer/xtz/XTZPager.groovy (revision 289) | ||
---|---|---|
118 | 118 |
// copy default TXM css file in the "facs" edition directory |
119 | 119 |
File csshtmlDirectory = new File(outputDirectory, "css") |
120 | 120 |
csshtmlDirectory.mkdirs() |
121 |
BundleUtils.copyFiles("org.txm.toolbox", "res", "org/txm/css", "txm.css", csshtmlDirectory);
|
|
121 |
BundleUtils.copyFiles("org.txm.core", "res", "org/txm/css", "txm.css", csshtmlDirectory);
|
|
122 | 122 |
|
123 | 123 |
// copy CSS files in the "default" edition directory |
124 | 124 |
if (cssDirectory.exists()) { |
tmp/org.txm.core/src/groovy/org/txm/importer/ApplyXsl2.java (revision 289) | ||
---|---|---|
277 | 277 |
StringWriter strWriter = new StringWriter(); |
278 | 278 |
StreamResult out = new StreamResult(strWriter); |
279 | 279 |
|
280 |
File tmp_dir = null; |
|
281 |
File inputfile_copy = null; |
|
282 |
|
|
280 | 283 |
if (debug) { |
281 |
File inputfile_copy = new File("/tmp", xmlinfile.getName()); |
|
282 |
System.out.println("copying inputfile in: "+inputfile_copy.getAbsolutePath()); |
|
283 |
inputfile_copy.delete(); |
|
284 |
//FIXME: old version |
|
285 |
//File inputfile_copy = new File("/tmp", xmlinfile.getName()); |
|
286 |
//FIXME: new version |
|
287 |
tmp_dir = new File(xmlinfile.getParentFile().getAbsolutePath() + "/tmp"); |
|
288 |
tmp_dir.mkdirs(); |
|
289 |
tmp_dir.deleteOnExit(); |
|
290 |
|
|
291 |
inputfile_copy = new File(tmp_dir, xmlinfile.getName()); |
|
292 |
|
|
293 |
System.out.println("copying inputfile to: "+inputfile_copy.getAbsolutePath()); |
|
294 |
//FIXME: old version |
|
295 |
//inputfile_copy.delete(); |
|
296 |
//FIXME: new version |
|
297 |
inputfile_copy.deleteOnExit(); |
|
284 | 298 |
FileCopy.copy(xmlinfile, inputfile_copy); |
299 |
|
|
285 | 300 |
} |
286 | 301 |
|
287 | 302 |
transformer.transform(new StreamSource(xmlinfile), out); |
... | ... | |
292 | 307 |
w.write(strWriter.toString()); |
293 | 308 |
w.close(); |
294 | 309 |
|
295 |
if (debug) { |
|
296 |
File inputfile_copy = new File("/tmp", xmlinfile.getName()); |
|
310 |
if (debug && inputfile_copy != null) { |
|
311 |
//FIXME: old version |
|
312 |
//File inputfile_copy = new File("/tmp", xmlinfile.getName()); |
|
313 |
|
|
297 | 314 |
String s = Diff.diffFile(inputfile_copy, xmloutfile); |
298 |
if (s.length() > 0) { // for ultra debug ?
|
|
315 |
if (s.length() > 0) { // for ultra debug? |
|
299 | 316 |
System.out.println("Result "+xmlinfile.getName()+" VS "+ xmloutfile.getName()+" diff="+s); |
300 | 317 |
} else { |
301 | 318 |
System.out.println("Warning: no diff between "+inputfile_copy+" and "+ xmloutfile); |
tmp/org.txm.core/.classpath (revision 289) | ||
---|---|---|
6 | 6 |
<classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/> |
7 | 7 |
<classpathentry exported="true" kind="lib" path="lib/asm-analysis-2.2.3.jar"/> |
8 | 8 |
<classpathentry exported="true" kind="lib" path="lib/asm-tree-2.2.3.jar"/> |
9 |
<classpathentry exported="true" kind="lib" path="lib/colt-1.2.0.jar"/> |
|
10 | 9 |
<classpathentry exported="true" kind="lib" path="lib/concurrent-1.3.4.jar"/> |
11 | 10 |
<classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/> |
12 | 11 |
<classpathentry exported="true" kind="lib" path="lib/forms-1.0.7.jar"/> |
... | ... | |
18 | 17 |
<classpathentry exported="true" kind="lib" path="lib/looks-2.0.1.jar"/> |
19 | 18 |
<classpathentry exported="true" kind="lib" path="lib/macSpecific.jar"/> |
20 | 19 |
<classpathentry exported="true" kind="lib" path="lib/quaqua.jar"/> |
21 |
<classpathentry exported="true" kind="lib" path="lib/REngine.jar"/> |
|
22 |
<classpathentry exported="true" kind="lib" path="lib/RserveEngine.jar"/> |
|
23 | 20 |
<classpathentry exported="true" kind="lib" path="lib/rtfCleaner.jar"/> |
24 | 21 |
<classpathentry exported="true" kind="lib" path="lib/swing-layout-1.0.3.jar"/> |
25 | 22 |
<classpathentry exported="true" kind="lib" path="lib/juniversalchardet-1.0.3.jar"/> |
tmp/org.txm.core/META-INF/MANIFEST.MF (revision 289) | ||
---|---|---|
1 | 1 |
Manifest-Version: 1.0 |
2 | 2 |
Bundle-ManifestVersion: 2 |
3 |
Bundle-Name: Toolbox |
|
3 |
Bundle-Name: TXM Core Toolbox
|
|
4 | 4 |
Bundle-SymbolicName: org.txm.core;singleton:=true |
5 | 5 |
Bundle-Version: 0.7.0.qualifier |
6 | 6 |
Bundle-Activator: org.txm.toolbox.Activator |
... | ... | |
10 | 10 |
org.txm.lexicon.core;bundle-version="1.0.0", |
11 | 11 |
org.eclipse.core.net, |
12 | 12 |
org.eclipse.osgi, |
13 |
groovy-all;bundle-version="1.0.0", |
|
13 |
org.txm.libs.groovy-all;bundle-version="1.0.0",
|
|
14 | 14 |
org.eclipse.persistence.jpa;bundle-version="2.6.0", |
15 | 15 |
javax.persistence;bundle-version="2.1.0", |
16 | 16 |
org.eclipse.persistence.jpa.jpql;bundle-version="2.6.0", |
... | ... | |
30 | 30 |
antlr.debug, |
31 | 31 |
antlr.debug.misc, |
32 | 32 |
antlr.preprocessor, |
33 |
cern.clhep, |
|
34 |
cern.colt, |
|
35 |
cern.colt.bitvector, |
|
36 |
cern.colt.buffer, |
|
37 |
cern.colt.function, |
|
38 |
cern.colt.list, |
|
39 |
cern.colt.list.adapter, |
|
40 |
cern.colt.map, |
|
41 |
cern.colt.matrix, |
|
42 |
cern.colt.matrix.bench, |
|
43 |
cern.colt.matrix.doublealgo, |
|
44 |
cern.colt.matrix.impl, |
|
45 |
cern.colt.matrix.linalg, |
|
46 |
cern.colt.matrix.objectalgo, |
|
47 |
cern.jet.math, |
|
48 |
cern.jet.random, |
|
49 |
cern.jet.random.engine, |
|
50 |
cern.jet.random.sampling, |
|
51 |
cern.jet.stat, |
|
52 |
cern.jet.stat.quantile, |
|
53 | 33 |
ch.randelshofer.quaqua, |
54 | 34 |
ch.randelshofer.quaqua.border, |
55 | 35 |
ch.randelshofer.quaqua.color, |
... | ... | |
91 | 71 |
com.jgoodies.looks.plastic, |
92 | 72 |
com.jgoodies.looks.plastic.theme, |
93 | 73 |
com.jgoodies.looks.windows, |
94 |
corejava, |
|
95 | 74 |
filters.BuildXmlLiturgie, |
96 | 75 |
filters.Concatenator, |
97 | 76 |
filters.CutHeader, |
... | ... | |
110 | 89 |
filters.Tokeniser, |
111 | 90 |
filters.WordInternalElement, |
112 | 91 |
filters.eliminateNAttributes, |
113 |
hep.aida, |
|
114 |
hep.aida.bin, |
|
115 |
hep.aida.ref, |
|
116 | 92 |
jline, |
117 | 93 |
junit.extensions, |
118 | 94 |
junit.framework, |
... | ... | |
264 | 240 |
org.postgresql.translation, |
265 | 241 |
org.postgresql.util, |
266 | 242 |
org.postgresql.xa, |
267 |
org.rosuda.REngine, |
|
268 |
org.rosuda.REngine.Rserve, |
|
269 |
org.rosuda.REngine.Rserve.protocol, |
|
270 | 243 |
org.sqlite, |
271 | 244 |
org.sqlite.core, |
272 | 245 |
org.sqlite.date, |
Formats disponibles : Unified diff