- Timestamp:
- 10/04/10 11:31:33 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/Cache.java
r713 r745 128 128 e.setAttribute("collection", ""); 129 129 } 130 131 130 if (key_array.length > 3){ 132 e.setAttribute("startRecord", key_array[3]); 131 e.setAttribute("squery", key_array[3]); 132 }else{ 133 e.setAttribute("squery", ""); 134 } 135 if (key_array.length > 4){ 136 e.setAttribute("startRecord", key_array[4]); 133 137 }else{ 134 138 e.setAttribute("startRecord", ""); 135 139 } 136 if (key_array.length > 4){137 e.setAttribute("maximumRecords", key_array[ 4]);140 if (key_array.length > 5){ 141 e.setAttribute("maximumRecords", key_array[5]); 138 142 }else{ 139 143 e.setAttribute("maximumRecords", ""); … … 186 190 Query query; 187 191 188 query = new Query(str,"recordset",""); 192 if (str == null) return ""; 193 if (str.trim().length() == 0) return ""; 194 195 query = new Query("", str,"recordset",""); 189 196 if (query.isStatus(Query.PARSEERROR)) { 190 197 Admin.notifyUser("Cache.transformQuery.PARSEERROR:" + query.getMsg()); … … 207 214 208 215 String[] key_array = key_info.split("//-"); 209 String query_str; 210 211 Admin.notifyUser("formPATH:" + key_info); 212 216 String query_str; 213 217 214 218 if(key_array.length > 1){ 215 219 //Admin.notifyUser("formPATH- querystring:" + key_array[1]); 216 220 if (key_array[0].equals("recordset")){ 217 query_str = t ransformQuery(key_array[1]);221 query_str = this.transformQuery(key_array[1]); 218 222 Admin.notifyUser("formPATH- querystring-transformed:" + query_str); 219 223 } … … 233 237 } 234 238 if (key_array.length > 3){ 235 xpath_expr = xpath_expr + "and @startRecord='"+key_array[3]+"'"; 239 xpath_expr = xpath_expr + "and @squery='"+key_array[3]+"'"; 240 }else{ 241 xpath_expr = xpath_expr + " and @squery=''"; 242 } 243 if (key_array.length > 4){ 244 xpath_expr = xpath_expr + "and @startRecord='"+key_array[4]+"'"; 236 245 }else{ 237 246 xpath_expr = xpath_expr + " and @startRecord=''"; 238 247 } 239 if (key_array.length > 4){240 xpath_expr = xpath_expr + "and @maximumRecords='"+key_array[ 4]+"']";248 if (key_array.length > 5){ 249 xpath_expr = xpath_expr + "and @maximumRecords='"+key_array[5]+"']"; 241 250 }else{ 242 251 xpath_expr = xpath_expr + " and @maximumRecords='']"; … … 259 268 path = cachepath + PREFIX + key_array[0] + "_"+id + ".xml"; 260 269 } else if (list.getLength() > 1){ 261 //Admin.notifyUser("formPath:!!!:multiple paths:"+key_info);270 Admin.notifyUser("formPath ERROR:!!!:multiple paths:"+key_info); 262 271 263 272 }
Note: See TracChangeset
for help on using the changeset viewer.