Révision 1166
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1166) | ||
---|---|---|
1122 | 1122 |
|
1123 | 1123 |
// remove children and clean resources |
1124 | 1124 |
while (this.children.size() > 0) { |
1125 |
this.children.get(0).delete(); // should call parent.removeResult(child) |
|
1125 |
TXMResult c = this.children.get(0); |
|
1126 |
c.delete(); // should call parent.removeResult(child) |
|
1126 | 1127 |
// TXMPreferences.delete(this.children.get(i)); |
1127 | 1128 |
// this.removeChild(i); |
1129 |
this.children.remove(c); // but should be done already... |
|
1128 | 1130 |
} |
1129 | 1131 |
this.children.clear(); |
1130 | 1132 |
|
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java (revision 1166) | ||
---|---|---|
58 | 58 |
* @author jmague, mdecorde |
59 | 59 |
*/ |
60 | 60 |
public class MainCorpus extends CQPCorpus { |
61 |
|
|
61 |
|
|
62 |
private File dataDirectory; |
|
63 |
private File cqpFile; |
|
64 |
private File registryFile; |
|
65 |
|
|
62 | 66 |
/** |
63 | 67 |
* Instantiates a new corpus. This constructor is not intended to be used |
64 | 68 |
* directly. Use {@link CorpusManager#getCorpus(String)}. |
... | ... | |
74 | 78 |
public MainCorpus(Project project) throws InvalidCqpIdException, CqiClientException { |
75 | 79 |
super(project); |
76 | 80 |
this.internalPersistable = true; |
81 |
|
|
82 |
this.dataDirectory = new File(getProjectDirectory(), "data/"+getID()); |
|
83 |
this.registryFile = new File(getProjectDirectory(), "registry/"+getID().toLowerCase()); |
|
77 | 84 |
} |
78 |
|
|
85 |
|
|
79 | 86 |
/** |
80 | 87 |
* Instantiates a new sub corpus |
81 | 88 |
* |
... | ... | |
86 | 93 |
this.internalPersistable = true; |
87 | 94 |
throw new IllegalArgumentException("Maincorpus parent must not be a Partition"); |
88 | 95 |
} |
89 |
|
|
96 |
|
|
90 | 97 |
/** |
91 | 98 |
* Instantiates a new corpus. This constructor is not intended to be used |
92 | 99 |
* directly. Use {@link CorpusManager#getCorpus(String)}. |
... | ... | |
103 | 110 |
super(parametersNodePath); |
104 | 111 |
} |
105 | 112 |
|
106 |
|
|
113 |
|
|
107 | 114 |
/** |
108 | 115 |
* Check whether the ID is a valid CQP ID. |
109 | 116 |
* |
... | ... | |
121 | 128 |
throw new InvalidCqpIdException(pID + TXMCoreMessages.MainCorpus_0); |
122 | 129 |
return true; |
123 | 130 |
} |
124 |
|
|
131 |
|
|
125 | 132 |
public boolean equals(MainCorpus corpus) { |
126 | 133 |
if (corpus == null) return false; |
127 | 134 |
return this.getQualifiedCqpId().equals(corpus.getQualifiedCqpId()); |
... | ... | |
140 | 147 |
return this.getProject().export(exportzip, monitor); |
141 | 148 |
return false; |
142 | 149 |
} |
143 |
|
|
150 |
|
|
144 | 151 |
/** |
145 | 152 |
* Export. |
146 | 153 |
* |
... | ... | |
181 | 188 |
} |
182 | 189 |
return this.size; |
183 | 190 |
} |
184 |
|
|
185 | 191 |
|
192 |
|
|
186 | 193 |
/** |
187 | 194 |
* Gets the properties available in this corpus. |
188 | 195 |
* |
... | ... | |
195 | 202 |
public List<WordProperty> getProperties() throws CqiClientException { |
196 | 203 |
if (this.lexicalUnitsProperties != null) |
197 | 204 |
return this.lexicalUnitsProperties; |
198 |
|
|
205 |
|
|
199 | 206 |
String[] propertiesName; |
200 | 207 |
CorpusManager cm = null; |
201 | 208 |
AbstractCqiClient cc = null; |
... | ... | |
312 | 319 |
if (this.lexicalUnitsProperties == null) { |
313 | 320 |
getProperties(); |
314 | 321 |
} |
315 |
|
|
322 |
|
|
316 | 323 |
int idx = name.indexOf("."); |
317 | 324 |
if (idx > 0) { // the name if a qualified name |
318 | 325 |
name = name.substring(idx+1); |
319 | 326 |
} |
320 |
|
|
327 |
|
|
321 | 328 |
for (WordProperty property : this.lexicalUnitsProperties) { |
322 | 329 |
if (property.getName().equals(name)) { |
323 | 330 |
return property; |
... | ... | |
362 | 369 |
*/ |
363 | 370 |
public boolean _load(Element e) { |
364 | 371 |
boolean ret = super._load(e); |
365 |
|
|
372 |
|
|
366 | 373 |
// FIXME: test to create a project scope |
367 |
// CorpusScope scope = new CorpusScope(this.getName(), this.getProjectDirectory()); |
|
368 |
// CorpusScope.addScope(scope); |
|
369 |
|
|
374 |
// CorpusScope scope = new CorpusScope(this.getName(), this.getProjectDirectory());
|
|
375 |
// CorpusScope.addScope(scope);
|
|
376 |
|
|
370 | 377 |
return ret; |
371 | 378 |
} |
372 | 379 |
|
373 |
/** |
|
374 |
* Removes the from cwb. |
|
375 |
* |
|
376 |
* @return true, if successful |
|
377 |
*/ |
|
378 |
public boolean removeFromCWB() { |
|
379 |
// try { |
|
380 |
// if (CQPSearchEngine.isInitialized()) { |
|
381 |
// this.dropAllSubcorpora(); |
|
382 |
//// this.dropAllPartitions(); |
|
383 |
// } |
|
384 |
// } catch (CqiClientException e) { |
|
385 |
// org.txm.utils.logger.Log.printStackTrace(e); |
|
386 |
// } |
|
387 |
|
|
388 |
try { |
|
389 |
CQPSearchEngine.getCqiClient().dropCorpus(getID()); |
|
390 |
} catch (Exception e) { |
|
391 |
// TODO Auto-generated catch block |
|
392 |
e.printStackTrace(); |
|
393 |
} |
|
394 |
|
|
395 |
// delete binaries |
|
396 |
File binaries = this.getProjectDirectory(); |
|
397 |
System.out.println(TXMCoreMessages.MainCorpus_2); |
|
398 |
DeleteDir.deleteDirectory(new File(binaries, "data/"+getID())); |
|
399 |
DeleteDir.deleteDirectory(new File(binaries, "registry/"+getID().toLowerCase())); |
|
400 |
DeleteDir.deleteDirectory(new File(binaries, "cqp/"+getID()+".cqp")); |
|
401 |
return true; |
|
402 |
} |
|
403 |
|
|
404 | 380 |
/** The nbtext. */ |
405 | 381 |
int nbtext = -1; |
406 | 382 |
|
... | ... | |
498 | 474 |
} |
499 | 475 |
return textEndLimits; |
500 | 476 |
} |
501 |
|
|
477 |
|
|
502 | 478 |
/** |
503 | 479 |
* Return the CQP START positions of the main corpus texts |
504 | 480 |
*/ |
... | ... | |
509 | 485 |
} |
510 | 486 |
return textLimits; |
511 | 487 |
} |
512 |
|
|
488 |
|
|
513 | 489 |
/** |
514 | 490 |
* Return the CQP START positions of the result matches of the 'cql_limit' query |
515 | 491 |
*/ |
... | ... | |
519 | 495 |
CorpusManager.getCorpusManager().getCqiClient().cqpQuery( |
520 | 496 |
this.getQualifiedCqpId(), queryResultId, cql_limit); //$NON-NLS-1$ |
521 | 497 |
QueryResult queryResult = new QueryResult(queryResultId, queryResultId, this, new CQLQuery(cql_limit)); |
522 |
|
|
498 |
|
|
523 | 499 |
int[] rez = queryResult.getStarts(); |
524 | 500 |
queryResult.drop(); |
525 | 501 |
return rez; |
... | ... | |
541 | 517 |
return 1; |
542 | 518 |
} |
543 | 519 |
|
544 |
|
|
520 |
|
|
545 | 521 |
@Override |
546 | 522 |
public String getSimpleName() { |
547 | 523 |
if (modified) { |
... | ... | |
555 | 531 |
protected boolean modified = false; |
556 | 532 |
public boolean isModified() { return modified; } |
557 | 533 |
public void setIsModified(boolean b) { modified = b; } |
558 |
|
|
559 |
|
|
560 | 534 |
|
535 |
|
|
536 |
|
|
561 | 537 |
@Override |
562 | 538 |
public String getDetails() { |
563 | 539 |
try { |
... | ... | |
569 | 545 |
|
570 | 546 |
@Override |
571 | 547 |
public void clean() { |
572 |
|
|
573 |
removeFromCWB(); |
|
574 |
|
|
575 |
File data = new File(getProjectDirectory(), "data/"+this.pID); |
|
576 |
File registry = new File(getProjectDirectory(), "registry/"+this.pID.toLowerCase()); |
|
577 |
File cqp = new File(getProjectDirectory(), "cqp/"+this.pID+".cqp"); |
|
578 |
DeleteDir.deleteDirectory(data); |
|
579 |
registry.delete(); |
|
580 |
cqp.delete(); |
|
548 |
|
|
549 |
try { |
|
550 |
if (CQPSearchEngine.isInitialized()) { |
|
551 |
CQPSearchEngine.getCqiClient().dropCorpus(getID()); |
|
552 |
} |
|
553 |
} catch (Exception e) { |
|
554 |
// TODO Auto-generated catch block |
|
555 |
e.printStackTrace(); |
|
556 |
} |
|
557 |
|
|
558 |
DeleteDir.deleteDirectory(dataDirectory); |
|
559 |
registryFile.delete(); |
|
581 | 560 |
} |
582 | 561 |
|
583 | 562 |
@Override |
tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/KRAnnotation.java (revision 1166) | ||
---|---|---|
146 | 146 |
// RESULT |
147 | 147 |
|
148 | 148 |
if (position < 0) { |
149 |
position = 3+extension.getNumberOfAnnotationArea(); // after keyword column and previous annotation columns
|
|
149 |
position = 3 + extension.getNumberOfAnnotationArea(); // after keyword column and previous annotation columns
|
|
150 | 150 |
} |
151 |
|
|
151 | 152 |
TableViewerColumn annotationColumnViewer = new TableViewerColumn(viewer, SWT.CENTER, position); |
152 | 153 |
annotationColumn = annotationColumnViewer.getColumn(); |
153 | 154 |
annotationColumn.setText(ConcordanceUIMessages.ConcordancesEditor_15); |
... | ... | |
311 | 312 |
if (concordance != null) { |
312 | 313 |
annotations.setViewAnnotation(type); |
313 | 314 |
annotations.setAnnotationOverlap(true); |
314 |
editor.fillDisplayArea(); |
|
315 |
try { |
|
316 |
editor.refresh(false); |
|
317 |
} catch (Exception e) { |
|
318 |
// TODO Auto-generated catch block |
|
319 |
e.printStackTrace(); |
|
320 |
} |
|
315 | 321 |
} |
316 | 322 |
|
317 | 323 |
updateAnnotationWidgetStates(); |
tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/WordAnnotationToolbar.java (revision 1166) | ||
---|---|---|
332 | 332 |
TableViewer viewer = this.editor.getLineTableViewer(); |
333 | 333 |
|
334 | 334 |
// RESULT |
335 |
|
|
336 | 335 |
if (position < 0) { |
337 | 336 |
position = 3 + extension.getNumberOfAnnotationArea(); // after keyword column and previous annotation columns |
338 | 337 |
} |
338 |
|
|
339 | 339 |
annotationColumnViewer = new TableViewerColumn(viewer, SWT.CENTER, position); |
340 | 340 |
annotationColumn = annotationColumnViewer.getColumn(); |
341 | 341 |
annotationColumn.setText("Property"); |
... | ... | |
549 | 549 |
@Override |
550 | 550 |
public void widgetSelected(SelectionEvent e) { |
551 | 551 |
try { |
552 |
int position = -1; |
|
553 |
TableColumn[] columns = editor.getLineTableViewer().getTable().getColumns(); |
|
554 |
TableColumn column = annotationColumnViewer.getColumn(); |
|
555 |
for (int i = 0 ; i < columns.length ; i++) { |
|
556 |
if (columns[i] == column) { |
|
557 |
position = i +1; // after the current column |
|
558 |
} |
|
559 |
} |
|
560 |
extension.openAnnotationMode(new WordAnnotationToolbar(), position); |
|
552 |
// int position = -1; |
|
553 |
// TableColumn[] columns = editor.getLineTableViewer().getTable().getColumns(); |
|
554 |
// TableColumn column = annotationColumnViewer.getColumn(); |
|
555 |
// for (int i = 0 ; i < columns.length ; i++) { |
|
556 |
// if (columns[i] == column) { |
|
557 |
// position = i + 1; // after the current column |
|
558 |
// } |
|
559 |
// } |
|
560 |
// int position = 3 + extension.getNumberOfAnnotationArea(); |
|
561 |
extension.openAnnotationMode(new WordAnnotationToolbar(), -1); |
|
561 | 562 |
} catch (Exception e1) { |
562 | 563 |
// TODO Auto-generated catch block |
563 | 564 |
e1.printStackTrace(); |
... | ... | |
693 | 694 |
} else { |
694 | 695 |
annotationColumn.setWidth(0); |
695 | 696 |
} |
696 |
|
|
697 | 697 |
} |
698 | 698 |
|
699 | 699 |
@Override |
tmp/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/concordance/SimpleKRAnnotation.java (revision 1166) | ||
---|---|---|
129 | 129 |
// RESULT |
130 | 130 |
|
131 | 131 |
if (position < 0) { |
132 |
position = 3+extension.getNumberOfAnnotationArea(); // after keyword column and previous annotation columns
|
|
132 |
position = 3 + extension.getNumberOfAnnotationArea(); // after keyword column and previous annotation columns
|
|
133 | 133 |
} |
134 | 134 |
|
135 | 135 |
TableViewerColumn annotationColumnViewer = new TableViewerColumn(viewer, SWT.CENTER, position); |
tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationExtension.java (revision 1166) | ||
---|---|---|
123 | 123 |
|
124 | 124 |
@Override |
125 | 125 |
public void widgetSelected(SelectionEvent e) { |
126 |
boolean saveSuccessful = true; |
|
127 |
//System.out.println("Saving annotations..."); |
|
126 | 128 |
if (annotationAreas != null) { |
127 | 129 |
for (AnnotationArea aa : annotationAreas) { |
128 |
aa.save(); |
|
130 |
saveSuccessful = saveSuccessful && aa.save();
|
|
129 | 131 |
} |
130 | 132 |
} |
133 |
saveButton.setEnabled(!saveSuccessful); |
|
131 | 134 |
} |
132 | 135 |
|
133 | 136 |
@Override |
... | ... | |
144 | 147 |
} |
145 | 148 |
annotationAreas.clear(); |
146 | 149 |
} else { // close the other annotation modes |
150 |
ArrayList<AnnotationArea> removed = new ArrayList<AnnotationArea>(); |
|
147 | 151 |
for (AnnotationArea a : annotationAreas) { |
148 | 152 |
if (!a.getClass().equals(aa.getClass())) { |
149 |
a._close(); |
|
153 |
a.close(); |
|
154 |
removed.add(a); |
|
150 | 155 |
} |
151 | 156 |
} |
157 |
annotationAreas.removeAll(removed); |
|
152 | 158 |
} |
153 | 159 |
|
154 | 160 |
//System.out.println("Starting "+aa.getName()); |
tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/UnitToolbar.java (revision 1166) | ||
---|---|---|
71 | 71 |
private Button deleteButton; |
72 | 72 |
private Button editButton; |
73 | 73 |
|
74 |
|
|
75 | 74 |
private KeyListener editorKeyListener; |
76 | 75 |
private MouseListener editorMouseListener; |
77 | 76 |
private int fixingAnnotationLimits = 0; |
... | ... | |
98 | 97 |
@Override |
99 | 98 |
public boolean install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception { |
100 | 99 |
super.install(txmeditor, extension, parent, position); |
101 |
|
|
100 |
|
|
102 | 101 |
annotationArea.getLayout().numColumns = 10; |
103 | 102 |
annotationArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false)); |
104 | 103 |
|
... | ... | |
114 | 113 |
// String selected_unit_color_pref = TxmPreferences.get(AnalecPreferencePage.SELECTED_UNIT_COLOR, "255,255,96"); |
115 | 114 |
// this.highlighted_unit_color = new RGBA(highlighted_unit_color_pref, 0.7f); |
116 | 115 |
// this.selected_unit_color = new RGBA(selected_unit_color_pref, 1f); |
117 |
|
|
118 | 116 |
} |
119 | 117 |
|
120 | 118 |
this.button = extension.getSaveButton(); |
... | ... | |
768 | 766 |
//drop_b.setEnabled(true); |
769 | 767 |
//updatePropertiesView(unite, true); |
770 | 768 |
setFocusInPropertiesView(); |
769 |
this.extension.getSaveButton().setEnabled(true); |
|
771 | 770 |
editor.fireIsDirty(); |
772 | 771 |
} |
773 | 772 |
|
... | ... | |
793 | 792 |
if (i > 0) { |
794 | 793 |
highlightType(); |
795 | 794 |
} |
795 |
this.extension.getSaveButton().setEnabled(true); |
|
796 | 796 |
editor.fireIsDirty(); |
797 | 797 |
|
798 | 798 |
if (e != null) editor.updateWordStyles(); |
... | ... | |
832 | 832 |
fixingAnnotationLimits = mode; |
833 | 833 |
} |
834 | 834 |
} |
835 |
this.extension.getSaveButton().setEnabled(true); |
|
835 | 836 |
editor.fireIsDirty(); |
836 | 837 |
if (e != null) editor.updateWordStyles(); |
837 | 838 |
} |
... | ... | |
1118 | 1119 |
|
1119 | 1120 |
@Override |
1120 | 1121 |
public boolean save() { |
1121 |
return AnalecCorpora.saveCorpus(analecCorpus); |
|
1122 |
//System.out.println("Saving Analec annotation..."); |
|
1123 |
if (AnalecCorpora.saveCorpus(analecCorpus)) { |
|
1124 |
this.extension.getSaveButton().setEnabled(false); |
|
1125 |
return true; |
|
1126 |
} |
|
1127 |
return false; |
|
1122 | 1128 |
} |
1123 | 1129 |
|
1124 | 1130 |
@Override |
tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/SchemaToolbar.java (revision 1166) | ||
---|---|---|
107 | 107 |
// String selected_unit_color_pref = TxmPreferences.get(AnalecPreferencePage.SELECTED_UNIT_COLOR, "255,255,96"); |
108 | 108 |
// this.highlighted_unit_color = new RGBA(highlighted_unit_color_pref, 0.7f); |
109 | 109 |
// this.selected_unit_color = new RGBA(selected_unit_color_pref, 1f); |
110 |
|
|
111 | 110 |
} |
112 | 111 |
|
113 | 112 |
this.editor = (SynopticEditionEditor) txmeditor; |
... | ... | |
188 | 187 |
|
189 | 188 |
reloadTypeSchemas(); // reloads ids also |
190 | 189 |
reloadIdentifiants(); |
191 |
|
|
192 | 190 |
|
193 | 191 |
if (schemasAVoir.length > 0) { |
194 | 192 |
typeCombo.select(1); |
tmp/org.txm.analec.rcp/src/org/txm/analec/toolbar/URSAnnotationToolbar.java (revision 1166) | ||
---|---|---|
68 | 68 |
@Override |
69 | 69 |
public boolean install(TXMEditor<? extends TXMResult> txmeditor, AnnotationExtension extension, Composite parent, int position) throws Exception { |
70 | 70 |
|
71 |
this.extension = extension; |
|
71 | 72 |
this.editor = (SynopticEditionEditor) txmeditor; |
72 | 73 |
this.maincorpus = (MainCorpus) this.editor.getCorpus(); |
73 | 74 |
analecCorpus = AnalecCorpora.getCorpus(maincorpus); |
tmp/org.txm.analec.rcp/src/org/txm/analec/InstallAnalecFiles.java (revision 1166) | ||
---|---|---|
1 |
package org.txm.analec; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
import java.io.IOException; |
|
5 |
|
|
6 |
import org.txm.PostTXMHOMEInstallationStep; |
|
7 |
import org.txm.Toolbox; |
|
8 |
import org.txm.objects.Workspace; |
|
9 |
import org.txm.utils.BundleUtils; |
|
10 |
import org.txm.utils.io.FileCopy; |
|
11 |
|
|
12 |
/** |
|
13 |
* Copy all Groovy scripts in TXMHome directory |
|
14 |
* |
|
15 |
* @author mdecorde |
|
16 |
* |
|
17 |
*/ |
|
18 |
public class InstallAnalecFiles extends PostTXMHOMEInstallationStep { |
|
19 |
|
|
20 |
@Override |
|
21 |
public boolean install(Workspace workspace) { |
|
22 |
File txmhomedir = new File(Toolbox.getTxmHomePath()); |
|
23 |
|
|
24 |
String createfolders[] = { "scripts/groovy/user"}; //$NON-NLS-1$ |
|
25 |
|
|
26 |
for (String folder : createfolders) { |
|
27 |
new File(txmhomedir, folder).mkdirs(); |
|
28 |
} |
|
29 |
File scriptsDirectory = new File(txmhomedir, "scripts/groovy"); |
|
30 |
File userDirectory = new File(scriptsDirectory, "user"); |
|
31 |
File macroDirectory = new File(userDirectory, "org/txm/macro"); |
|
32 |
File analecMacroDirectory = new File(macroDirectory, "analec"); |
|
33 |
|
|
34 |
String bundle_id = "org.txm.analec.rcp"; |
|
35 |
BundleUtils.copyFiles(bundle_id, "src/", "org/txm/macro", "analec", macroDirectory); |
|
36 |
|
|
37 |
return analecMacroDirectory.exists(); |
|
38 |
} |
|
39 |
|
|
40 |
@Override |
|
41 |
public String getName() { |
|
42 |
return "Analec (org.txm.analec.rcp)"; |
|
43 |
} |
|
44 |
} |
|
0 | 45 |
tmp/org.txm.analec.rcp/src/org/txm/analec/AnalecCorpora.java (revision 1166) | ||
---|---|---|
11 | 11 |
import visuAnalec.vue.Vue; |
12 | 12 |
|
13 | 13 |
/** |
14 |
* Manages Analec corpus : the corpus are associated with TXM MainCorpus objects
|
|
14 |
* Manages Analec corpus: the corpus are associated with TXM MainCorpus objects |
|
15 | 15 |
* |
16 | 16 |
* @author mdecorde |
17 | 17 |
* |
18 | 18 |
*/ |
19 | 19 |
public class AnalecCorpora { |
20 |
|
|
20 | 21 |
private static final HashMap<MainCorpus, Corpus> corpora = new HashMap<MainCorpus, Corpus>(); |
21 | 22 |
private static final HashMap<MainCorpus, Vue> vues = new HashMap<MainCorpus, Vue>(); |
22 | 23 |
|
... | ... | |
91 | 92 |
} |
92 | 93 |
|
93 | 94 |
/** |
94 |
* need the corpus to be laoded |
|
95 |
* need the corpus to be loaded |
|
96 |
* |
|
95 | 97 |
* @param name |
96 | 98 |
* @return the corpus Vue |
97 | 99 |
*/ |
... | ... | |
112 | 114 |
Vue vue = getVue(mcorpus); |
113 | 115 |
File dir = new File(mcorpus.getProjectDirectory(), "analec/"); //$NON-NLS-1$ //$NON-NLS-2$ |
114 | 116 |
dir.mkdir(); |
115 |
File fichierCorpus = new File(dir,mcorpus+".ec"); //$NON-NLS-1$ |
|
116 |
File fichierVueCorpus = new File(dir,mcorpus+".ecv"); //$NON-NLS-1$ |
|
117 |
File fichierCorpus = new File(dir, mcorpus+".ec"); //$NON-NLS-1$
|
|
118 |
File fichierVueCorpus = new File(dir, mcorpus+".ecv"); //$NON-NLS-1$
|
|
117 | 119 |
return FichiersJava.enregistrerCorpus(corpus, fichierCorpus) |
118 | 120 |
&& FichiersJava.enregistrerVue(vue, fichierVueCorpus); |
119 | 121 |
} |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesNotInSchemaMacro.groovy (revision 1166) | ||
---|---|---|
22 | 22 |
if (!ParametersDialog.open(this)) return; |
23 | 23 |
|
24 | 24 |
MainCorpus corpus = corpusViewSelection |
25 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
25 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
26 | 26 |
|
27 | 27 |
def unitesInSchema = new HashSet() |
28 | 28 |
for (def schema : analecCorpus.getSchemas(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/Frpos2CategorieMacro.groovy (revision 1166) | ||
---|---|---|
179 | 179 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
180 | 180 |
return |
181 | 181 |
} |
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
183 | 183 |
vue = AnalecCorpora.getVue(corpus.getName()) |
184 | 184 |
structure = analecCorpus.getStructure() |
185 | 185 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CreationChainesMacro.groovy (revision 1166) | ||
---|---|---|
28 | 28 |
int nUpdated = 0 // count the number of updated CHAINE |
29 | 29 |
|
30 | 30 |
MainCorpus corpus = corpusViewSelection |
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
|
|
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); // analec corpus has the same name has the TXM corpus |
|
32 | 32 |
Structure structure = analecCorpus.getStructure() |
33 | 33 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
34 | 34 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ResetAnnotationsMacro.groovy (revision 1166) | ||
---|---|---|
20 | 20 |
if (!ParametersDialog.open(this)) return; |
21 | 21 |
|
22 | 22 |
MainCorpus corpus = corpusViewSelection |
23 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
23 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
24 | 24 |
def structure = analecCorpus.getStructure() |
25 | 25 |
|
26 | 26 |
Class[] classes = [Unite.class, Relation.class, Schema.class] |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/RelationsMacro.groovy (revision 1166) | ||
---|---|---|
35 | 35 |
MainCorpus corpus = corpusViewSelection |
36 | 36 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
37 | 37 |
def word = corpus.getWordProperty() |
38 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
38 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
39 | 39 |
|
40 | 40 |
int n = 1; |
41 | 41 |
def relations = analecCorpus.getRelations(relation_type) |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/DensiteReferentielleMacro.groovy (revision 1166) | ||
---|---|---|
29 | 29 |
// END OF PARAMETERS |
30 | 30 |
|
31 | 31 |
MainCorpus corpus = corpusViewSelection |
32 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
32 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
33 | 33 |
|
34 | 34 |
// check unit parameters |
35 | 35 |
if (!analecCorpus.getStructure().getUnites().contains(unit_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitsMacro.groovy (revision 1166) | ||
---|---|---|
12 | 12 |
import org.txm.rcp.swt.widget.parameters.* |
13 | 13 |
import org.txm.analec.* |
14 | 14 |
import org.txm.searchengine.cqp.AbstractCqiClient; |
15 |
import org.txm.searchengine.cqp.CQPSearchEngine |
|
15 | 16 |
import org.txm.searchengine.cqp.corpus.* |
16 | 17 |
import visuAnalec.donnees.Structure; |
17 | 18 |
import visuAnalec.elements.Unite; |
... | ... | |
30 | 31 |
MainCorpus corpus = corpusViewSelection |
31 | 32 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
32 | 33 |
def word = corpus.getWordProperty() |
33 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
34 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
34 | 35 |
|
35 | 36 |
int n = 1; |
36 | 37 |
def units = analecCorpus.getUnites(unit_type) |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesMacro.groovy (revision 1166) | ||
---|---|---|
23 | 23 |
if (!ParametersDialog.open(this)) return; |
24 | 24 |
|
25 | 25 |
MainCorpus corpus = corpusViewSelection |
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
27 | 27 |
def map = new HashMap() |
28 | 28 |
def unitesInSchema = [] |
29 | 29 |
def n = 0 |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CategorieGrammaticaleMacro.groovy (revision 1166) | ||
---|---|---|
52 | 52 |
// END OF PARAMETERS |
53 | 53 |
|
54 | 54 |
MainCorpus corpus = corpusViewSelection |
55 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
55 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
56 | 56 |
|
57 | 57 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
58 | 58 |
println "No schema with name=$schema_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CheckAnnotationStructureValuesMacro.groovy (revision 1166) | ||
---|---|---|
28 | 28 |
// END OF PARAMETERS |
29 | 29 |
|
30 | 30 |
MainCorpus corpus = corpusViewSelection |
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
32 | 32 |
def structure = analecCorpus.getStructure() |
33 | 33 |
|
34 | 34 |
def unit_types = structure.getTypes(Unite.class); |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/ChainesMacro.groovy (revision 1166) | ||
---|---|---|
56 | 56 |
// END OF PARAMETERS |
57 | 57 |
|
58 | 58 |
MainCorpus corpus = corpusViewSelection |
59 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
59 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
60 | 60 |
|
61 | 61 |
// check Schema parameters |
62 | 62 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CompUnitPropertiesMacro.groovy (revision 1166) | ||
---|---|---|
38 | 38 |
MainCorpus corpus = corpusViewSelection |
39 | 39 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
40 | 40 |
def word = corpus.getWordProperty() |
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
42 | 42 |
|
43 | 43 |
def units = analecCorpus.getUnites(unit_type) |
44 | 44 |
units.sort() { a, b -> a.getDeb() <=> b.getDeb() ?: a.getFin() <=> b.getFin() } |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozz1_0_0Macro.groovy (revision 1166) | ||
---|---|---|
97 | 97 |
// CORPUS ANALEC (GET THE ANNOTATIONS) |
98 | 98 |
|
99 | 99 |
// note that unit_type has been defined with an option of the dialog at the beginning |
100 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
100 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
101 | 101 |
|
102 | 102 |
// list of properties |
103 | 103 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozz1_1_0Macro.groovy (revision 1166) | ||
---|---|---|
136 | 136 |
// CORPUS ANALEC (GET THE ANNOTATIONS) |
137 | 137 |
|
138 | 138 |
// note that unit_type has been defined with an option of the dialog at the beginning |
139 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
139 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
140 | 140 |
|
141 | 141 |
// list of properties |
142 | 142 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/export/ExportToGlozzMacro.groovy (revision 1166) | ||
---|---|---|
97 | 97 |
// CORPUS ANALEC (GET THE ANNOTATIONS) |
98 | 98 |
|
99 | 99 |
// note that unit_type has been defined with an option of the dialog at the beginning |
100 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
100 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
101 | 101 |
|
102 | 102 |
// list of properties |
103 | 103 |
|
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/UnitTypesInSchemaMacro.groovy (revision 1166) | ||
---|---|---|
23 | 23 |
if (!ParametersDialog.open(this)) return; |
24 | 24 |
|
25 | 25 |
MainCorpus corpus = corpusViewSelection |
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
27 | 27 |
def map = new HashMap() |
28 | 28 |
def unitesInSchema = [] |
29 | 29 |
def n = 0 |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/Fropos2CategorieMacro.groovy (revision 1166) | ||
---|---|---|
84 | 84 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
85 | 85 |
return |
86 | 86 |
} |
87 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
87 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
88 | 88 |
vue = AnalecCorpora.getVue(corpus.getName()) |
89 | 89 |
structure = analecCorpus.getStructure() |
90 | 90 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CoefficientStabiliteMacro.groovy (revision 1166) | ||
---|---|---|
51 | 51 |
// END OF PARAMETERS |
52 | 52 |
|
53 | 53 |
MainCorpus corpus = corpusViewSelection |
54 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
54 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
55 | 55 |
|
56 | 56 |
// check Schema parameters |
57 | 57 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/DensiteReferentielleMacro.groovy (revision 1166) | ||
---|---|---|
29 | 29 |
// END OF PARAMETERS |
30 | 30 |
|
31 | 31 |
MainCorpus corpus = corpusViewSelection |
32 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
32 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
33 | 33 |
|
34 | 34 |
// check unit parameters |
35 | 35 |
if (!analecCorpus.getStructure().getUnites().contains(unit_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NombreDeChainesMacro.groovy (revision 1166) | ||
---|---|---|
44 | 44 |
// END OF PARAMETERS |
45 | 45 |
|
46 | 46 |
MainCorpus corpus = corpusViewSelection |
47 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
47 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
48 | 48 |
|
49 | 49 |
// check Schema parameters |
50 | 50 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/DistanceInterMaillonnaireMacro.groovy (revision 1166) | ||
---|---|---|
43 | 43 |
if (!ParametersDialog.open(this)) return; |
44 | 44 |
|
45 | 45 |
MainCorpus corpus = corpusViewSelection |
46 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
46 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
47 | 47 |
|
48 | 48 |
// check Schema parameters |
49 | 49 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/NatureDuPremierMaillonMacro.groovy (revision 1166) | ||
---|---|---|
48 | 48 |
// END OF PARAMETERS |
49 | 49 |
|
50 | 50 |
MainCorpus corpus = corpusViewSelection |
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
52 | 52 |
|
53 | 53 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
54 | 54 |
println "No schema with name=$schema_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/CategorieGrammaticaleMacro.groovy (revision 1166) | ||
---|---|---|
52 | 52 |
// END OF PARAMETERS |
53 | 53 |
|
54 | 54 |
MainCorpus corpus = corpusViewSelection |
55 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
55 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
56 | 56 |
|
57 | 57 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
58 | 58 |
println "No schema with name=$schema_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/exploit/mesures1/LongueurMoyenneMacro.groovy (revision 1166) | ||
---|---|---|
46 | 46 |
// END OF PARAMETERS |
47 | 47 |
|
48 | 48 |
MainCorpus corpus = corpusViewSelection |
49 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
49 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
50 | 50 |
|
51 | 51 |
// check Schema parameters |
52 | 52 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CoefficientStabiliteMacro.groovy (revision 1166) | ||
---|---|---|
51 | 51 |
// END OF PARAMETERS |
52 | 52 |
|
53 | 53 |
MainCorpus corpus = corpusViewSelection |
54 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
54 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
55 | 55 |
|
56 | 56 |
// check Schema parameters |
57 | 57 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/PremierMaillonMacro.groovy (revision 1166) | ||
---|---|---|
31 | 31 |
if (!ParametersDialog.open(this)) return; |
32 | 32 |
|
33 | 33 |
MainCorpus corpus = corpusViewSelection |
34 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
34 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
35 | 35 |
Structure structure = analecCorpus.getStructure() |
36 | 36 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
37 | 37 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CategorieMacro.groovy (revision 1166) | ||
---|---|---|
179 | 179 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
180 | 180 |
return |
181 | 181 |
} |
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
183 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
183 |
vue = AnalecCorpora.getVue(corpus) |
|
184 | 184 |
structure = analecCorpus.getStructure() |
185 | 185 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
186 | 186 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CreationChainesMacro.groovy (revision 1166) | ||
---|---|---|
30 | 30 |
int nUpdated = 0 // count the number of updated CHAINE |
31 | 31 |
|
32 | 32 |
MainCorpus corpus = corpusViewSelection |
33 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
|
|
33 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); // analec corpus has the same name has the TXM corpus |
|
34 | 34 |
Structure structure = analecCorpus.getStructure() |
35 | 35 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
36 | 36 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/ResetAnnotationsMacro.groovy (revision 1166) | ||
---|---|---|
20 | 20 |
if (!ParametersDialog.open(this)) return; |
21 | 21 |
|
22 | 22 |
MainCorpus corpus = corpusViewSelection |
23 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
23 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
24 | 24 |
def structure = analecCorpus.getStructure() |
25 | 25 |
|
26 | 26 |
Class[] classes = [Unite.class, Relation.class, Schema.class] |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AccessibiliteMacro.groovy (revision 1166) | ||
---|---|---|
45 | 45 |
corpus = corpusViewSelection |
46 | 46 |
CQI = CQPSearchEngine.getCqiClient() |
47 | 47 |
|
48 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
49 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
48 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
49 |
vue = AnalecCorpora.getVue(corpus) |
|
50 | 50 |
structure = analecCorpus.getStructure() |
51 | 51 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
52 | 52 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Fropos2CattexMacro.groovy (revision 1166) | ||
---|---|---|
172 | 172 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
173 | 173 |
return |
174 | 174 |
} |
175 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
176 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
175 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
176 |
vue = AnalecCorpora.getVue(corpus) |
|
177 | 177 |
structure = analecCorpus.getStructure() |
178 | 178 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
179 | 179 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/RetoucheComplementDuNomMacro.groovy (revision 1166) | ||
---|---|---|
41 | 41 |
CQI = CQPSearchEngine.getCqiClient() |
42 | 42 |
word = corpus.getWordProperty() |
43 | 43 |
|
44 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
45 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
44 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
45 |
vue = AnalecCorpora.getVue(corpus) |
|
46 | 46 |
structure = analecCorpus.getStructure() |
47 | 47 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
48 | 48 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CheckAnnotationStructureValuesMacro.groovy (revision 1166) | ||
---|---|---|
28 | 28 |
// END OF PARAMETERS |
29 | 29 |
|
30 | 30 |
MainCorpus corpus = corpusViewSelection |
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
31 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
32 | 32 |
def structure = analecCorpus.getStructure() |
33 | 33 |
|
34 | 34 |
def unit_types = structure.getTypes(Unite.class); |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/LongueurDesMentionsMacro.groovy (revision 1166) | ||
---|---|---|
67 | 67 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
68 | 68 |
return |
69 | 69 |
} |
70 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
71 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
70 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
71 |
vue = AnalecCorpora.getVue(corpus) |
|
72 | 72 |
structure = analecCorpus.getStructure() |
73 | 73 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
74 | 74 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Fropos2CategorieMacro.groovy (revision 1166) | ||
---|---|---|
84 | 84 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
85 | 85 |
return |
86 | 86 |
} |
87 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
88 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
87 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
88 |
vue = AnalecCorpora.getVue(corpus) |
|
89 | 89 |
structure = analecCorpus.getStructure() |
90 | 90 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
91 | 91 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CategorieDemocratMacro.groovy (revision 1166) | ||
---|---|---|
179 | 179 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
180 | 180 |
return |
181 | 181 |
} |
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
183 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
182 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
183 |
vue = AnalecCorpora.getVue(corpus) |
|
184 | 184 |
structure = analecCorpus.getStructure() |
185 | 185 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
186 | 186 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/PremierMaillonMacro.groovy (revision 1166) | ||
---|---|---|
31 | 31 |
if (!ParametersDialog.open(this)) return; |
32 | 32 |
|
33 | 33 |
MainCorpus corpus = corpusViewSelection |
34 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
34 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
35 | 35 |
Structure structure = analecCorpus.getStructure() |
36 | 36 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
37 | 37 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Si2SingletonMacro.groovy (revision 1166) | ||
---|---|---|
35 | 35 |
corpus = corpusViewSelection |
36 | 36 |
CQI = CQPSearchEngine.getCqiClient() |
37 | 37 |
word = corpus.getWordProperty() |
38 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
39 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
38 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
39 |
vue = AnalecCorpora.getVue(corpus) |
|
40 | 40 |
structure = analecCorpus.getStructure() |
41 | 41 |
if (!structure.getUnites().contains(unitType)) { // check if the structure contains the unitType units |
42 | 42 |
println "Error: corpus structure does not contains unit with name=$unitType" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/AjoutDefinitudeMacro.groovy (revision 1166) | ||
---|---|---|
38 | 38 |
MainCorpus corpus = corpusViewSelection |
39 | 39 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
40 | 40 |
def word = corpus.getWordProperty() |
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
42 | 42 |
Structure structure = analecCorpus.getStructure() |
43 | 43 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
44 | 44 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/Frpos2CattexMacro.groovy (revision 1166) | ||
---|---|---|
185 | 185 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
186 | 186 |
return |
187 | 187 |
} |
188 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
189 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
188 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
189 |
vue = AnalecCorpora.getVue(corpus) |
|
190 | 190 |
structure = analecCorpus.getStructure() |
191 | 191 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
192 | 192 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/CreationRelationsMacro.groovy (revision 1166) | ||
---|---|---|
33 | 33 |
int nCreated = 0 // count the number of created RELATION |
34 | 34 |
|
35 | 35 |
MainCorpus corpus = corpusViewSelection |
36 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
|
|
36 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); // analec corpus has the same name has the TXM corpus |
|
37 | 37 |
Structure structure = analecCorpus.getStructure() |
38 | 38 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
39 | 39 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/edit/PROPERanaphoriquesMacro.groovy (revision 1166) | ||
---|---|---|
48 | 48 |
println "Error: CQP corpus does not contains the word property with name=$pos_property_name" |
49 | 49 |
return |
50 | 50 |
} |
51 |
analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
52 |
vue = AnalecCorpora.getVue(corpus.getID())
|
|
51 |
analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
52 |
vue = AnalecCorpora.getVue(corpus) |
|
53 | 53 |
structure = analecCorpus.getStructure() |
54 | 54 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
55 | 55 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/AjoutDefinitudeMacro.groovy (revision 1166) | ||
---|---|---|
38 | 38 |
MainCorpus corpus = corpusViewSelection |
39 | 39 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
40 | 40 |
def word = corpus.getWordProperty() |
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
41 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
42 | 42 |
Structure structure = analecCorpus.getStructure() |
43 | 43 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
44 | 44 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/CreationRelationsMacro.groovy (revision 1166) | ||
---|---|---|
33 | 33 |
int nCreated = 0 // count the number of created RELATION |
34 | 34 |
|
35 | 35 |
MainCorpus corpus = corpusViewSelection |
36 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID()); // analec corpus has the same name has the TXM corpus
|
|
36 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); // analec corpus has the same name has the TXM corpus |
|
37 | 37 |
Structure structure = analecCorpus.getStructure() |
38 | 38 |
if (!structure.getUnites().contains(unit_type)) { // check if the structure contains the unit_type units |
39 | 39 |
println "Error: corpus structure does not contains unit with name=$unit_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/SchemaTypesMacro.groovy (revision 1166) | ||
---|---|---|
17 | 17 |
} |
18 | 18 |
|
19 | 19 |
MainCorpus corpus = corpusViewSelection |
20 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
20 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
21 | 21 |
|
22 | 22 |
def schemas = analecCorpus.getTousSchemas() |
23 | 23 |
def set = new HashMap() |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemasListMacro.groovy (revision 1166) | ||
---|---|---|
56 | 56 |
// END OF PARAMETERS |
57 | 57 |
|
58 | 58 |
MainCorpus corpus = corpusViewSelection |
59 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
59 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
60 | 60 |
|
61 | 61 |
// check Schema parameters |
62 | 62 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesMacro.groovy (revision 1166) | ||
---|---|---|
23 | 23 |
if (!ParametersDialog.open(this)) return; |
24 | 24 |
|
25 | 25 |
MainCorpus corpus = corpusViewSelection |
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
27 | 27 |
def map = new HashMap() |
28 | 28 |
def unitesInSchema = [] |
29 | 29 |
def n = 0 |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/SchemaTypesMacro.groovy (revision 1166) | ||
---|---|---|
17 | 17 |
} |
18 | 18 |
|
19 | 19 |
MainCorpus corpus = corpusViewSelection |
20 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
20 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
21 | 21 |
|
22 | 22 |
def schemas = analecCorpus.getTousSchemas() |
23 | 23 |
def set = new HashMap() |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/CompUnitPropertiesMacro.groovy (revision 1166) | ||
---|---|---|
41 | 41 |
MainCorpus corpus = corpusViewSelection |
42 | 42 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
43 | 43 |
def word = corpus.getWordProperty() |
44 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
44 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
45 | 45 |
|
46 | 46 |
def units = analecCorpus.getUnites(unit_type) |
47 | 47 |
units.sort() { a, b -> a.getDeb() <=> b.getDeb() ?: a.getFin() <=> b.getFin() } |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/RelationsListMacro.groovy (revision 1166) | ||
---|---|---|
35 | 35 |
MainCorpus corpus = corpusViewSelection |
36 | 36 |
AbstractCqiClient CQI = CQPSearchEngine.getCqiClient(); |
37 | 37 |
def word = corpus.getWordProperty() |
38 |
visuAnalec.donnees.Corpus analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
38 |
visuAnalec.donnees.Corpus analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
39 | 39 |
|
40 | 40 |
int n = 1; |
41 | 41 |
def relations = null |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesInSchemaMacro.groovy (revision 1166) | ||
---|---|---|
23 | 23 |
if (!ParametersDialog.open(this)) return; |
24 | 24 |
|
25 | 25 |
MainCorpus corpus = corpusViewSelection |
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
26 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
27 | 27 |
def map = new HashMap() |
28 | 28 |
def unitesInSchema = [] |
29 | 29 |
def n = 0 |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/misc/UnitTypesNotInSchemaMacro.groovy (revision 1166) | ||
---|---|---|
22 | 22 |
if (!ParametersDialog.open(this)) return; |
23 | 23 |
|
24 | 24 |
MainCorpus corpus = corpusViewSelection |
25 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID());
|
|
25 |
def analecCorpus = AnalecCorpora.getCorpus(corpus); |
|
26 | 26 |
|
27 | 27 |
def unitesInSchema = new HashSet() |
28 | 28 |
for (def schema : analecCorpus.getSchemas(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NombreDeChainesMacro.groovy (revision 1166) | ||
---|---|---|
44 | 44 |
// END OF PARAMETERS |
45 | 45 |
|
46 | 46 |
MainCorpus corpus = corpusViewSelection |
47 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
47 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
48 | 48 |
|
49 | 49 |
// check Schema parameters |
50 | 50 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/NatureDuPremierMaillonMacro.groovy (revision 1166) | ||
---|---|---|
48 | 48 |
// END OF PARAMETERS |
49 | 49 |
|
50 | 50 |
MainCorpus corpus = corpusViewSelection |
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
52 | 52 |
|
53 | 53 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
54 | 54 |
println "No schema with name=$schema_type" |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/DistanceInterMaillonnaireMacro.groovy (revision 1166) | ||
---|---|---|
43 | 43 |
if (!ParametersDialog.open(this)) return; |
44 | 44 |
|
45 | 45 |
MainCorpus corpus = corpusViewSelection |
46 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
46 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
47 | 47 |
|
48 | 48 |
// check Schema parameters |
49 | 49 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/src/org/txm/macro/analec/LongueurMoyenneMacro.groovy (revision 1166) | ||
---|---|---|
48 | 48 |
// END OF PARAMETERS |
49 | 49 |
|
50 | 50 |
MainCorpus corpus = corpusViewSelection |
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus.getID())
|
|
51 |
def analecCorpus = AnalecCorpora.getCorpus(corpus) |
|
52 | 52 |
|
53 | 53 |
// check Schema parameters |
54 | 54 |
if (!analecCorpus.getStructure().getSchemas().contains(schema_type)) { |
tmp/org.txm.analec.rcp/plugin.xml (revision 1166) | ||
---|---|---|
329 | 329 |
position="2"> |
330 | 330 |
</annotationtoolbar> |
331 | 331 |
</extension> |
332 |
<extension |
|
333 |
point="org.txm.PostTXMHOMEInstallationStep"> |
|
334 |
<PostTXMHOMEInstallationStep |
|
335 |
class="org.txm.analec.InstallAnalecFiles" |
|
336 |
description="Install analec Files" |
|
337 |
name="Analec macro"> |
|
338 |
</PostTXMHOMEInstallationStep> |
|
339 |
</extension> |
|
332 | 340 |
|
333 | 341 |
</plugin> |
tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java (revision 1166) | ||
---|---|---|
59 | 59 |
if (project.getDoUpdate()) { |
60 | 60 |
// drop CorpusBuild and Editions |
61 | 61 |
List<? extends CorpusBuild> corpora = project.getCorpora(); |
62 |
while (corpora.size() > 0) {
|
|
63 |
CorpusBuild c = corpora.get(0);
|
|
62 |
while (project.getCorpora().size() > 0) {
|
|
63 |
CorpusBuild c = project.getCorpora().get(0);
|
|
64 | 64 |
c.delete(); |
65 | 65 |
} |
66 | 66 |
|
67 | 67 |
List<Text> texts = project.getTexts(); |
68 | 68 |
for (Text t : texts) { |
69 |
List<Edition> editions = t.getEditions(); |
|
70 |
while (editions.size() > 0) { |
|
71 |
Edition ed = editions.get(0); |
|
69 |
while (t.getEditions().size() > 0) { |
|
70 |
Edition ed = t.getEditions().get(0); |
|
72 | 71 |
ed.delete(); |
73 | 72 |
} |
74 | 73 |
} |
tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompiler.groovy (revision 1166) | ||
---|---|---|
245 | 245 |
println "Error: The registry file was not created: $regPath. See https://groupes.renater.fr/wiki/txm-users/public/faq" |
246 | 246 |
return false; |
247 | 247 |
} |
248 |
cwbMa.run(corpusname, regPath);
|
|
248 |
cwbMa.run(corpusname, new File(regPath).getParent());
|
|
249 | 249 |
|
250 | 250 |
// remove milestones from CWB registry and data files |
251 | 251 |
FixMilestoneDeclarations fm = new FixMilestoneDeclarations( |
tmp/org.txm.groovy.core/plugin.xml (revision 1166) | ||
---|---|---|
6 | 6 |
<PostTXMHOMEInstallationStep |
7 | 7 |
class="org.txm.groovy.core.InstallGroovyFiles" |
8 | 8 |
description="Install Groovy Files" |
9 |
name="org.txm.groovy.core.PostTXMHOMEInstallationStep2">
|
|
9 |
name="Groovy scripts and macro">
|
|
10 | 10 |
</PostTXMHOMEInstallationStep> |
11 | 11 |
</extension> |
12 | 12 |
<extension |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/UpdateCorpus.java (revision 1166) | ||
---|---|---|
40 | 40 |
System.out.println("Can't update a corpus not imprted with XTZ import module."); |
41 | 41 |
return null; |
42 | 42 |
} |
43 |
project.setDirty(); |
|
43 | 44 |
project.setDoMultiThread(false); //too soon |
44 | 45 |
project.setDoUpdate(true); |
45 | 46 |
|
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1166) | ||
---|---|---|
410 | 410 |
ext.notify(step); |
411 | 411 |
} |
412 | 412 |
} catch(Throwable e) { |
413 |
errors.add(ext); |
|
413 |
//errors.add(ext); |
|
414 |
System.out.println("Error during editor extension notify: "+e); |
|
414 | 415 |
e.printStackTrace(); |
415 | 416 |
} |
416 | 417 |
// } |
Formats disponibles : Unified diff