Revision 1980

tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryWidget.java (revision 1980)
86 86
		else {
87 87
			rawQuery = this.getItem(this.getSelectionIndex());
88 88
		}
89
		return se.newQuery().setQuery(rawQuery).fixQuery().getQueryString();
89
		return se.newQuery().setQuery(rawQuery).getQueryString();
90 90
	}
91 91

  
92 92
	/**
tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java (revision 1980)
1314 1314
	 */
1315 1315
	public boolean stepQueryLimits() {
1316 1316
		// structural context
1317
		
1318
		String fixedQuery = CQLQuery.fixQuery(pQuery.getQueryString());
1319
		
1317 1320
		if (pStructuralUnitLimit != null) {
1318 1321
			String tempquery = ""; //$NON-NLS-1$
1319 1322
			String lname = pStructuralUnitLimit.getName();
......
1323 1326
				tempquery += "(<"	+ lname + ">[]* </" + lname + ">){" + (pMaxLeftContextSize) + "," + (pMaxLeftContextSize) + "}"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
1324 1327
			}
1325 1328
			// (<p>[]*</p>){0, 50} "je" (<p>[]*</p>){0, 50}
1326
			tempquery +=" <" + lname + ">[]* " + pQuery.getQueryString() + " []* </" + lname + "> "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
1329
			tempquery +=" <" + lname + ">[]* " + fixedQuery + " []* </" + lname + "> "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
1327 1330

  
1328 1331
			// test if there is a right context
1329 1332
			if (pMinRightContextSize > 0) {
......
1337 1340
				if (pMinLeftContextSize > 1) {
1338 1341
					anticontextquerystring += "(<" + lname + ">[]* </" + lname + ">){" + (pMinLeftContextSize - 1) + "," + (pMinLeftContextSize - 1) + "} <" + lname + ">[]* "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
1339 1342
				}
1340
				anticontextquerystring += pQuery.getQueryString();
1343
				anticontextquerystring += fixedQuery;
1341 1344
				 // minright = 2..N
1342 1345
				if (pMinRightContextSize > 1) {
1343 1346
					anticontextquerystring += " []* </" + lname + "> (<" + lname + ">[]* </" + lname + ">){" + (pMinRightContextSize - 1) + "," + (pMinRightContextSize - 1) + "}"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
......
1350 1353
				if (pMinLeftContextSize > 0) {
1351 1354
					anticontextquerystring += "(<" + lname + ">[]* </" + lname + ">){" + (pMinLeftContextSize - 1) + "," + (pMinLeftContextSize - 1) + "} <" + lname + ">[]* "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
1352 1355
				}
1353
				anticontextquerystring += pQuery.getQueryString();
1356
				anticontextquerystring += fixedQuery;
1354 1357
				 // minright = 2..N
1355 1358
				if (pMinRightContextSize > 0) {
1356 1359
					anticontextquerystring += " []* </" + lname + "> (<" + lname + ">[]* </" + lname + ">){" + (pMinRightContextSize - 1) + "," + (pMinRightContextSize - 1) + "}"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
......
1363 1366
			if (pMinLeftContextSize > 0 ) { // test if there is a left context
1364 1367
				tempquery += "[]{"	+ pMaxLeftContextSize + "," + pMaxLeftContextSize + "} "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
1365 1368
			}
1366
			tempquery+= pQuery.getQueryString();
1369
			tempquery+= fixedQuery;
1367 1370

  
1368 1371
			if (pMinRightContextSize > 0) { // test if there is a right context
1369 1372
				tempquery+=" []{" + pMaxRightContextSize + "," + pMaxRightContextSize + "} "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
......
1373 1376
			if (pMinLeftContextSize > 1) {
1374 1377
				anticontextquerystring += "[]{" + (pMinLeftContextSize - 1) + ", " + (pMinLeftContextSize - 1) + "}"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
1375 1378
			}
1376
			anticontextquerystring += pQuery.getQueryString();
1379
			anticontextquerystring += fixedQuery;
1377 1380
			if (pMinRightContextSize > 1) {
1378 1381
				anticontextquerystring += "[]{" + (pMinRightContextSize -1) + "," + (pMinRightContextSize -1)+ "} "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
1379 1382
			}
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CQPLexicon.java (revision 1980)
164 164
		try {
165 165
//			System.out.println("subcorpus: "+corpus.getQualifiedCqpId());
166 166
//			System.out.println("query subcorpus: "+qtmp);
167
			cqi.cqpQuery(corpus.getQualifiedCqpId(), tmp, "[]");
167
			cqi.cqpQuery(corpus.getQualifiedCqpId(), tmp, "[]"); //$NON-NLS-1$
168 168
			fdist = CorpusManager.getCorpusManager().getCqiClient().fdist1(qtmp, 0, ICqiClient.CQI_CONST_FIELD_MATCH, property.getName());
169 169
			//System.out.println("nb lines: "+fdist.length);
170 170
		} catch (Exception e) {
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CQPCorpus.java (revision 1980)
535 535

  
536 536
		long start = System.currentTimeMillis();
537 537
		try {
538
			CorpusManager.getCorpusManager().getCqiClient().cqpQuery(this.getQualifiedCqpId(), subcorpusCqpId, query.getQueryString());
538
			CorpusManager.getCorpusManager().getCqiClient().cqpQuery(this.getQualifiedCqpId(), subcorpusCqpId, CQLQuery.fixQuery(query.getQueryString()));
539 539
			// System.out.println("SUBCORPUS: "+subcorpusCqpId+"
540 540
			// q="+query.getQueryString());
541 541
			subcorpus = new Subcorpus(this);
......
570 570

  
571 571
		// long start = System.currentTimeMillis();
572 572
		try {
573
			CorpusManager.getCorpusManager().getCqiClient().cqpQuery(this.getQualifiedCqpId(), subcorpusCqpId, query.getQueryString());
573
			CorpusManager.getCorpusManager().getCqiClient().cqpQuery(this.getQualifiedCqpId(), subcorpusCqpId, CQLQuery.fixQuery(query.getQueryString()));
574 574
			subcorpus = new Subcorpus(this);
575 575
			subcorpus.setParameters(subcorpusCqpId, subcorpusName, query);
576 576
			subcorpus.compute();
......
1293 1293
		QueryResult queryResult = null;
1294 1294
		// String queryResultId = queryResultNamePrefix + UUID.randomUUID().toString();
1295 1295
		String queryResultId = queryResultNamePrefix + getNextQueryCounter();
1296
		Log.finest(NLS.bind(TXMCoreMessages.queryOnP0ColonP1InfP2, new String[] { this.getQualifiedCqpId(), queryResultId, query.getQueryString() })); // $NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
1296
		String fixedQuery = CQLQuery.fixQuery(query.getQueryString());
1297
		
1298
		Log.finest(NLS.bind(TXMCoreMessages.queryOnP0ColonP1InfP2, new String[] { this.getQualifiedCqpId(), queryResultId, fixedQuery })); // $NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
1297 1299
		// long start = System.currentTimeMillis();
1298 1300
		try {
1299
			CorpusManager.getCorpusManager().getCqiClient().cqpQuery(this.getQualifiedCqpId(), queryResultId, query.getQueryString());
1301
			CorpusManager.getCorpusManager().getCqiClient().cqpQuery(this.getQualifiedCqpId(), queryResultId, fixedQuery);
1300 1302
			queryResult = new QueryResult(queryResultId, queryResultName, this, query);
1301 1303

  
1302 1304
			// if (save) {
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java (revision 1980)
521 521
	public int[] getStartLimits(String cql_limit) throws IOException, CqiServerError, InvalidCqpIdException, CqiClientException {
522 522
		String queryResultId = queryResultNamePrefix + UUID.randomUUID().toString();
523 523
		CorpusManager.getCorpusManager().getCqiClient().cqpQuery(
524
				this.getQualifiedCqpId(), queryResultId, cql_limit); //$NON-NLS-1$
524
				this.getQualifiedCqpId(), queryResultId, CQLQuery.fixQuery(cql_limit)); //$NON-NLS-1$
525 525
		QueryResult queryResult = new QueryResult(queryResultId, queryResultId, this,	new CQLQuery(cql_limit));
526 526

  
527 527
		int[] rez =  queryResult.getStarts();
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Subcorpus.java (revision 1980)
112 112
		if (this.pQuery != null) {
113 113
			this.qresult = null; // reset
114 114
			
115
			CorpusManager.getCorpusManager().getCqiClient().cqpQuery(this.getCorpusParent().getQualifiedCqpId(), this.pID, this.pQuery.getQueryString());
115
			CorpusManager.getCorpusManager().getCqiClient().cqpQuery(this.getCorpusParent().getQualifiedCqpId(), this.pID, CQLQuery.fixQuery(this.pQuery.getQueryString()));
116 116
			
117 117
			this.qresult = new QueryResult(this.pID, this.userName, this.getCorpusParent(), this.pQuery); // getCorpusParent().query(pQuery, this.pID, true);
118 118
		}

Also available in: Unified diff