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 |
}
|