comparison soap.cpp @ 310:435ffdaecae9

Added Web Services support for --exhaustive and --lsh_exact flags in Radius sequence searches.
author mas01mc
date Fri, 08 Aug 2008 14:01:33 +0000
parents 896679d8cc39
children f9dde18f556a
comparison
equal deleted inserted replaced
309:81ad865402e7 310:435ffdaecae9
63 asqp.trackNN = trackNN; 63 asqp.trackNN = trackNN;
64 asqp.sequenceLength = sequenceLength; 64 asqp.sequenceLength = sequenceLength;
65 asqp.radius = radius; 65 asqp.radius = radius;
66 asqp.relative_threshold = relative_threshold; 66 asqp.relative_threshold = relative_threshold;
67 asqp.absolute_threshold = absolute_threshold; 67 asqp.absolute_threshold = absolute_threshold;
68 asqp.usingQueryPoint = usingQueryPoint;
69 asqp.lsh_exact = lsh_exact;
68 70
69 soap_init(&soap); 71 soap_init(&soap);
70 if(queryType==O2_SEQUENCE_QUERY || queryType==O2_N_SEQUENCE_QUERY){ 72 if(queryType==O2_SEQUENCE_QUERY || queryType==O2_N_SEQUENCE_QUERY){
71 if(soap_call_adb__sequenceQuery_by_key(&soap,hostport,NULL,(char*)dbName,(char*)trackKey,queryType,&asqp,adbQueryResponse)==SOAP_OK){ 73 if(soap_call_adb__sequenceQuery_by_key(&soap,hostport,NULL,(char*)dbName,(char*)trackKey,queryType,&asqp,adbQueryResponse)==SOAP_OK){
72 //std::std::cerr << "result list length:" << adbQueryResponse.result.__sizeRlist << std::std::endl; 74 //std::std::cerr << "result list length:" << adbQueryResponse.result.__sizeRlist << std::std::endl;
192 194
193 // WS queries only support 1-nearest neighbour point reporting 195 // WS queries only support 1-nearest neighbour point reporting
194 // at the moment, until we figure out how to better serve results 196 // at the moment, until we figure out how to better serve results
195 snprintf(qtypeStr, 256, "nsequence"); 197 snprintf(qtypeStr, 256, "nsequence");
196 198
197 const char *argv[] = { 199 const char *argv[]={
198 "./audioDB", 200 "./audioDB",
199 COM_QUERY, 201 COM_QUERY,
200 qtypeStr, 202 qtypeStr,
201 COM_DATABASE, 203 COM_DATABASE,
202 dbName, 204 dbName,
203 COM_QUERYKEY, 205 COM_QUERYKEY,
204 ENSURE_STRING(qKey), 206 ENSURE_STRING(qKey),
205 COM_KEYLIST, 207 COM_KEYLIST,
206 ENSURE_STRING(parms->keyList), 208 ENSURE_STRING(parms->keyList),
207 COM_QPOINT, 209 parms->usingQueryPoint?COM_QPOINT:COM_EXHAUSTIVE,
208 qPosStr, 210 parms->usingQueryPoint?qPosStr:"",
209 COM_POINTNN, 211 COM_POINTNN,
210 pointNNStr, 212 pointNNStr,
211 COM_TRACKNN, 213 COM_TRACKNN,
212 trackNNStr, 214 trackNNStr,
213 COM_RADIUS, 215 COM_RADIUS,
214 radiusStr, 216 radiusStr,
215 COM_SEQLEN, 217 COM_SEQLEN,
216 seqLenStr, 218 seqLenStr,
217 COM_ABSOLUTE_THRESH, 219 COM_ABSOLUTE_THRESH,
218 absolute_thresholdStr 220 absolute_thresholdStr,
221 parms->lsh_exact?COM_LSH_EXACT:""
219 }; 222 };
220 223
221 const unsigned argc = 21; 224 const unsigned argc = 22;
222 225
226
223 try { 227 try {
224 audioDB(argc, (char* const*)argv, &adbQueryResponse); 228 audioDB(argc, (char* const*)argv, &adbQueryResponse);
225 return SOAP_OK; 229 return SOAP_OK;
226 } catch (char *err) { 230 } catch (char *err) {
227 soap_receiver_fault(soap, err, ""); 231 soap_receiver_fault(soap, err, "");