changeset 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 81ad865402e7
children cac5b3465318
files audioDB.h audioDBws.h soap.cpp
diffstat 3 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/audioDB.h	Thu Aug 07 17:05:22 2008 +0000
+++ b/audioDB.h	Fri Aug 08 14:01:33 2008 +0000
@@ -59,6 +59,8 @@
 #define COM_QUERYPOWER "--power"
 #define COM_RELATIVE_THRESH "--relative-threshold"
 #define COM_ABSOLUTE_THRESH "--absolute-threshold"
+#define COM_EXHAUSTIVE "--exhaustive"
+#define COM_LSH_EXACT "--lsh_exact"
 
 #define O2_OLD_MAGIC ('O'|'2'<<8|'D'<<16|'B'<<24)
 #define O2_MAGIC ('o'|'2'<<8|'d'<<16|'b'<<24)
--- a/audioDBws.h	Thu Aug 07 17:05:22 2008 +0000
+++ b/audioDBws.h	Fri Aug 08 14:01:33 2008 +0000
@@ -56,6 +56,8 @@
   xsd__double radius;
   xsd__double relative_threshold;
   xsd__double absolute_threshold;
+  xsd__int usingQueryPoint;
+  xsd__int lsh_exact;
 };
 
 // Perform a sequence query
--- a/soap.cpp	Thu Aug 07 17:05:22 2008 +0000
+++ b/soap.cpp	Fri Aug 08 14:01:33 2008 +0000
@@ -65,6 +65,8 @@
   asqp.radius = radius;
   asqp.relative_threshold = relative_threshold;
   asqp.absolute_threshold = absolute_threshold;
+  asqp.usingQueryPoint = usingQueryPoint;
+  asqp.lsh_exact = lsh_exact;
 
   soap_init(&soap);  
   if(queryType==O2_SEQUENCE_QUERY || queryType==O2_N_SEQUENCE_QUERY){
@@ -194,7 +196,7 @@
   // at the moment, until we figure out how to better serve results
   snprintf(qtypeStr, 256, "nsequence");
 
-  const char *argv[] = {
+  const char *argv[]={
     "./audioDB",
     COM_QUERY,
     qtypeStr,
@@ -204,8 +206,8 @@
     ENSURE_STRING(qKey),
     COM_KEYLIST,
     ENSURE_STRING(parms->keyList),
-    COM_QPOINT, 
-    qPosStr,
+    parms->usingQueryPoint?COM_QPOINT:COM_EXHAUSTIVE, 
+    parms->usingQueryPoint?qPosStr:"",
     COM_POINTNN,
     pointNNStr,
     COM_TRACKNN,
@@ -215,11 +217,13 @@
     COM_SEQLEN,
     seqLenStr,
     COM_ABSOLUTE_THRESH,
-    absolute_thresholdStr
+    absolute_thresholdStr,
+    parms->lsh_exact?COM_LSH_EXACT:""
   };
 
-  const unsigned argc = 21;
-
+  const unsigned argc = 22;
+  
+ 
   try {
     audioDB(argc, (char* const*)argv, &adbQueryResponse);
     return SOAP_OK;