Révision 3228

tmp/org.txm.referencer.core/META-INF/MANIFEST.MF (revision 3228)
5 5
Bundle-SymbolicName: org.txm.referencer.core;singleton:=true
6 6
Bundle-Version: 1.0.0.qualifier
7 7
Bundle-Name: Referencer
8
Require-Bundle: org.txm.statsengine.r.core;bundle-version="1.0.0";visi
9
 bility:=reexport,org.txm.searchengine.cqp.core;bundle-version="1.1.0"
10
 ;visibility:=reexport
8
Require-Bundle: org.txm.statsengine.r.core;bundle-version="1.0.0";visibility:=reexport,
9
 org.txm.searchengine.cqp.core;bundle-version="1.1.0";visibility:=reexport,
10
 org.eclipse.jface
11 11
Bundle-ManifestVersion: 2
12 12
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
13 13
Bundle-Vendor: Textometrie.org
tmp/org.txm.referencer.core/src/org/txm/referencer/core/preferences/ReferencerPreferences.java (revision 3228)
15 15
	public static final String SORT_BY_FREQUENCIES = "sort_by_frequencies"; //$NON-NLS-1$
16 16
	public static final String PATTERN = "pattern"; //$NON-NLS-1$
17 17
	public static final String SHOW_COUNTS = "show_counts";
18

  
18
	public static final String HIERARCHIC_MODE = "hierarchic_mode";
19 19
	
20 20
	/**
21 21
	 * Gets the instance.
tmp/org.txm.referencer.core/src/org/txm/referencer/core/functions/Referencer.java (revision 3228)
70 70
import org.txm.searchengine.cqp.AbstractCqiClient;
71 71
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
72 72
import org.txm.searchengine.cqp.corpus.CQPCorpus;
73
import org.txm.searchengine.cqp.corpus.CorpusManager;
74 73
import org.txm.searchengine.cqp.corpus.Property;
75
import org.txm.searchengine.cqp.corpus.QueryResult;
74
import org.txm.searchengine.cqp.corpus.CorpusManager;
76 75
import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
77 76
import org.txm.searchengine.cqp.corpus.WordProperty;
78
import org.txm.searchengine.cqp.corpus.query.CQLQuery;
79 77
//import org.txm.searchengine.cqp.corpus.query.Match;
80 78
//import org.txm.searchengine.cqp.corpus.query.CQLQuery;
81 79
import org.txm.searchengine.cqp.serverException.CqiServerError;
......
102 100
	int[] indexes;
103 101

  
104 102
	/** The lines. */
105
	List<Line> lines;
103
	List<Line> lines = new ArrayList<Line>();
106 104

  
107 105
	/** The matches. */
108 106
	List<? extends Match> matches;
......
125 123
	/** The writer. */
126 124
	private BufferedWriter writer;
127 125

  
128

  
129

  
130

  
131

  
132 126
	/** The hierarchic sort. */
133 127
	@Parameter(key = ReferencerPreferences.SORT_BY_FREQUENCIES)
134 128
	protected boolean pHierarchicSort;
......
138 132

  
139 133
	/** The prop. */
140 134
	@Parameter(key = ReferencerPreferences.UNIT_PROPERTY)
141
	protected WordProperty pProperty;
135
	protected Property pProperty;
142 136

  
143 137
	/** The query. */
144 138
	@Parameter(key = ReferencerPreferences.QUERY)
......
148 142
	@Parameter(key = ReferencerPreferences.SHOW_COUNTS)
149 143
	protected Boolean pShowCounts;
150 144

  
145
	/** The show counts boolean. */
146
	@Parameter(key = ReferencerPreferences.HIERARCHIC_MODE)
147
	private boolean pHierarchicMode;
148

  
151 149
	/**
152 150
	 * Creates a not computed referencer.
153 151
	 *
......
273 271
	 * Gets the lines.
274 272
	 *
275 273
	 * @return the lines
276
	 * @throws CqiClientException the cqi client exception
277
	 * @throws IOException Signals that an I/O exception has occurred.
278
	 * @throws CqiServerError the cqi server error
274
	 * @throws Exception 
279 275
	 */
280
	public List<Line> getLines() throws CqiClientException, IOException, CqiServerError {
276
	public List<Line> getLines() throws Exception {
281 277
		return getLines(0, lines.size());
282 278
	}
283 279

  
......
287 283
	 * @param from the from
288 284
	 * @param to the to
289 285
	 * @return the lines
290
	 * @throws CqiClientException the cqi client exception
291
	 * @throws IOException Signals that an I/O exception has occurred.
292
	 * @throws CqiServerError the cqi server error
286
	 * @throws Exception 
293 287
	 */
294
	public List<Line> getLines(int from, int to) throws CqiClientException, IOException, CqiServerError {
288
	public List<Line> getLines(int from, int to) throws Exception {
295 289
		if (from < 0) {
296 290
			from = 0;
297 291
		}
......
549 543

  
550 544
	@Deprecated
551 545
	public void toTxt(Writer writer, int from, int to, String colseparator, String txtseparator)
552
			throws CqiClientException, IOException {
546
			throws Exception {
553 547
		try {
554 548
			getLines(0, Integer.MAX_VALUE);
555 549
			writer.write(pProperty.getName() + colseparator + this.pPattern + "\n"); //$NON-NLS-1$
......
612 606
		return true;
613 607
	}
614 608

  
615

  
616

  
617

  
618 609
	/**
619 610
	 * The Class Line.
620 611
	 */
......
802 793
		
803 794
		return pShowCounts;
804 795
	}
796

  
797

  
798
	public boolean getHierarchicMode() {
799
		
800
		return pHierarchicMode;
801
	}
805 802
}
tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/ReferencerTreeNode.java (revision 3228)
1
package org.txm.referencer.rcp.editors;
2

  
3
import java.util.ArrayList;
4

  
5
import org.eclipse.jface.viewers.TreeNode;
6
import org.txm.referencer.core.functions.Referencer;
7

  
8

  
9
public class ReferencerTreeNode extends TreeNode {
10

  
11
	public ReferencerTreeNode(Referencer.Line line) {
12
		
13
		super(line);
14
	}
15
	
16
	public static ArrayList<ReferencerTreeNode> buildTree(ArrayList<ReferencerTreeNode> nodes) {
17
		return nodes;
18
	}
19
	
20
}
0 21

  

Formats disponibles : Unified diff