Révision 3958

TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Subcorpus.java (revision 3958)
152 152
			}
153 153
			
154 154
			String q = this.pQuery.getQueryString();
155
			if (q.matches("undump \"[^ ]+\";")) { // undump query
155
			if (q.matches("undump \"[^\"]+\";")) { // undump query
156 156
				String path = q.substring(8, q.length() - 2);
157 157
				if (!new File(path).exists()) {
158 158
					Log.severe(NLS.bind("Error: could not compute subcorpus from the dump file: {0}.", path));
159 159
					return false;
160 160
				}
161
				CorpusManager.getCorpusManager().getCqiClient().query(";");
161
				CorpusManager.getCorpusManager().getCqiClient().query(this.getCorpusParent().getQualifiedCqpId()+";");
162 162
				CorpusManager.getCorpusManager().getCqiClient().query("undump "+this.pID+" < "+q.substring(7));
163 163
			} else if (q.matches("(union|join|intersect|inter|difference|diff) [^ ]+ [^ ]+;")) {
164
				CorpusManager.getCorpusManager().getCqiClient().query(";");
164
				CorpusManager.getCorpusManager().getCqiClient().query(this.getCorpusParent().getQualifiedCqpId()+";");
165 165
				CorpusManager.getCorpusManager().getCqiClient().query(this.pID+" = "+q);
166 166
			} else {
167 167
				CorpusManager.getCorpusManager().getCqiClient().cqpQuery(parent_id, this.pID, CQLQuery.fixQuery(q, this.getLang()));
......
171 171
//				}
172 172
			}
173 173
			
174
			this.qresult = this.pQuery.getSearchEngine().query(this.getCorpusParent(), this.pQuery, this.getUserName(), true);
174
			//this.qresult = this.pQuery.getSearchEngine().query(this.getCorpusParent(), this.pQuery, this.getUserName(), true);
175 175
			
176
			//this.qresult = new QueryResult(this.pID, this.getUserName(), this.getCorpusParent(), this.pQuery); // getCorpusParent().query(pQuery, this.pID, true);
176
			this.qresult = new QueryResult(this.pID, this.getUserName(), this.getCorpusParent(), (CQLQuery) this.pQuery); // getCorpusParent().query(pQuery, this.pID, true);
177
			//  queryResult = new QueryResult(queryResultId, queryResultName, this, query);
177 178
		}
178 179
		
179 180
		cqpTextIDS = null; // reset text ids cache
TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/QueryResult.java (revision 3958)
85 85
	 * 
86 86
	 * @throws InvalidCqpIdException the invalid cqp id exception
87 87
	 */
88
	public QueryResult(String cqpId, String name, CQPCorpus queriedCorpus,
89
			CQLQuery query) throws InvalidCqpIdException {
88
	public QueryResult(String cqpId, String name, CQPCorpus queriedCorpus, CQLQuery query) throws InvalidCqpIdException {
90 89
		
91 90
		// super(cqpId);
92 91
		checkCqpId(cqpId);
TXM/trunk/bundles/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/CQPCorpus.java (revision 3958)
1472 1472
			//CorpusManager.getCorpusManager().getCqiClient().cqpQuery(this.getQualifiedCqpId(), queryResultId, fixedQuery);
1473 1473
			
1474 1474
			String q = query.getQueryString();
1475
			if (q.matches("undump \"[^ ]+\";")) { // undump query
1475
			if (q.matches("undump \"[^\"]+\";")) { // undump query
1476 1476
				String path = q.substring(8, q.length() - 2);
1477 1477
				if (!new File(path).exists()) {
1478 1478
					Log.severe(NLS.bind("Error: could not compute subcorpus from the dump file: {0}.", path));
1479 1479
					return null;
1480 1480
				}
1481
				CorpusManager.getCorpusManager().getCqiClient().query(";");
1481
				CorpusManager.getCorpusManager().getCqiClient().query(this.getQualifiedCqpId()+";");
1482 1482
				CorpusManager.getCorpusManager().getCqiClient().query("undump "+queryResultId+" < "+q.substring(7));
1483 1483
			} else if (q.matches("(union|join|intersect|inter|difference|diff) [^ ]+ [^ ]+;")) {
1484
				CorpusManager.getCorpusManager().getCqiClient().query(";");
1484
				CorpusManager.getCorpusManager().getCqiClient().query(this.getQualifiedCqpId()+";");
1485 1485
				CorpusManager.getCorpusManager().getCqiClient().query(queryResultId+" = "+q);
1486 1486
			} else {
1487 1487
				//String fixedQuery = CQLQuery.fixQuery(query.getQueryString());

Formats disponibles : Unified diff