Révision 3378

TXM/trunk/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/MemCqiClient.java (revision 3378)
250 250
		return rez;
251 251
	}
252 252
	
253
	//public native String getOption(String name) throws UnexpectedAnswerException, IOException, CqiServerError;
253 254
	@Override
255
	public synchronized String getOption(String name) throws UnexpectedAnswerException, IOException, CqiServerError {
256
		if (name == null) {
257
			throw new CqiServerError("getOption called with NULL parameter.");
258
		}
259
		String rez = server.getOption(name);
260
		if (rez == null) {
261
			throwExceptionFromCqi(server.getErrorCode());
262
		}
263
		return rez;
264
	}
265
	
266
	//public native String setOption(String name, String value) throws UnexpectedAnswerException, IOException, CqiServerError;
267
	@Override
268
	public synchronized String setOption(String name, String value) throws UnexpectedAnswerException, IOException, CqiServerError {
269
		if (name == null) {
270
			throw new CqiServerError("setOption called with NULL name parameter.");
271
		}
272
		if (value == null) {
273
			throw new CqiServerError("setOption called with NULL value parameter.");
274
		}
275
		String rez = server.setOption(name, value);
276
		if (rez == null) {
277
			throwExceptionFromCqi(server.getErrorCode());
278
		}
279
		return rez;
280
	}
281
	
282
	@Override
254 283
	public synchronized String corpusFullName(String arg0) throws UnexpectedAnswerException, IOException, CqiServerError {
255 284
		if (arg0 == null) {
256 285
			throw new CqiServerError("corpusFullName called with NULL parameter.");
......
721 750
		return server.load_a_system_corpus(regfilepath, entry);
722 751
	}
723 752

  
724
	@Override
725
	public String getOption(String name) throws UnexpectedAnswerException, IOException, CqiServerError {
726
		if (name == null) {
727
			throw new CqiServerError("getOption called with NULL name parameter.");
728
		}
729
		String rez = server.getOption(name);
730
		if (rez == null) {
731
			throwExceptionFromCqi(server.getErrorCode());
732
		}
733
		return rez;
734
	}
735

  
736
	@Override
737
	public String setOption(String name, String value) throws UnexpectedAnswerException, IOException, CqiServerError {
738
		if (name == null) {
739
			throw new CqiServerError("setOption called with NULL name parameter.");
740
		}
741
		if (value == null) {
742
			throw new CqiServerError("setOption called with NULL value parameter.");
743
		}
744
		String rez = server.setOption(name, value);
745
		if (rez == null) {
746
			throwExceptionFromCqi(server.getErrorCode());
747
		}
748
		return rez;
749
	}
750 753
}
TXM/trunk/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/NetCqiClient.java (revision 3378)
1940 1940
	}
1941 1941

  
1942 1942
	@Override
1943
	public String getOption(String name) throws UnexpectedAnswerException, IOException, CqiServerError {
1943
	public String setOption(String name, String value) throws UnexpectedAnswerException, IOException, CqiServerError {
1944 1944
		
1945
		Log.warning("NOT IMPLEMENTED: NetCqiClient.getOption");
1945
		// TODO Auto-generated method stub
1946 1946
		return null;
1947 1947
	}
1948 1948

  
1949 1949
	@Override
1950
	public String setOption(String name, String value) throws UnexpectedAnswerException, IOException, CqiServerError {
1950
	public String getOption(String name) throws UnexpectedAnswerException, IOException, CqiServerError {
1951 1951
		
1952
		Log.warning("NOT IMPLEMENTED: NetCqiClient.setOption");
1952
		// TODO Auto-generated method stub
1953 1953
		return null;
1954 1954
	}
1955

  
1955 1956
}

Formats disponibles : Unified diff