Changeset 704 for MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice
- Timestamp:
- 09/19/10 09:37:51 (14 years ago)
- Location:
- MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/Cache.java
r689 r704 29 29 import org.xml.sax.SAXException; 30 30 import org.xml.sax.InputSource; 31 import org.apache.commons.lang.StringEscapeUtils; 31 32 32 33 … … 108 109 //e.setNamedItem(attr); 109 110 e.setAttribute("id", c.toString()); 110 String[] key_array = key_info.split(" -");111 String[] key_array = key_info.split("//-"); 111 112 112 113 e.setAttribute("type", key_array[0]); … … 182 183 transformed = ""; 183 184 } else { 184 try { 185 transformed = query.toURLParam(); 186 transformed = transformed.replace("'", "__qqqqq__"); 187 //Admin.notifyUser("CACHE.transformQuery:"+transformed); 188 } catch (MalformedURLException e) { 189 // TODO Auto-generated catch block 190 e.printStackTrace(); 191 transformed = ""; 192 } 185 transformed = query.getSimpleQueryString(); 186 transformed = StringEscapeUtils.escapeXml(transformed); 187 //Admin.notifyUser("CACHE.transformQuery:"+transformed); 193 188 } 194 189 return transformed; … … 201 196 String xpath_expr=""; 202 197 203 String[] key_array = key_info.split(" -");198 String[] key_array = key_info.split("//-"); 204 199 String query_str; 205 200 201 Admin.notifyUser("formPATH:" + key_info); 202 203 206 204 if(key_array.length > 1){ 205 //Admin.notifyUser("formPATH- querystring:" + key_array[1]); 207 206 if (key_array[0].equals("recordset")){ 208 207 query_str = transformQuery(key_array[1]); 208 Admin.notifyUser("formPATH- querystring-transformed:" + query_str); 209 209 } 210 210 else { -
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/CompRegistryProxyAction.java
r690 r704 51 51 String key=""; 52 52 if (getActionkey()!=null) { 53 key += getActionkey() + " -" ;53 key += getActionkey() + "//-" ; 54 54 } 55 55 if (getCompid()!=null) { 56 key += getCompid() + " -" ;56 key += getCompid() + "//-" ; 57 57 } 58 58 -
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/GenericProxyAction.java
r690 r704 176 176 String key=""; 177 177 if (getActionkey()!=null) { 178 key += getActionkey() + " -" ;178 key += getActionkey() + "//-" ; 179 179 } 180 180 if (getQ()!=null) { 181 key += getQ() + " -" ;181 key += getQ() + "//-" ; 182 182 } 183 183 if (getCollection()!=null) { -
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/model/Query.java
r690 r704 188 188 } 189 189 190 public String getSimpleQueryString() { 191 String[] arr_and = query_string.split(" and "); 192 String simple_form = ""; 193 String simple_form_all = ""; 194 String rel = ""; 195 196 for( int i=0;i<arr_and.length;i++){ 197 arr_and[i] = arr_and[i].trim(); 198 String[] arr_or = arr_and[i].split(" or "); 199 simple_form = ""; 200 for( int j=0;j<arr_or.length;j++){ 201 arr_or[j] = arr_or[j].trim(); 202 while (arr_or[j].substring(0,1).equals("(") ) { 203 arr_or[j] = arr_or[j].substring(1,arr_or[j].length()); 204 arr_or[j] = arr_or[j].trim(); 205 } 206 while ( arr_or[j].substring(arr_or[j].length()-1,arr_or[j].length()).equals(")")){ 207 arr_or[j] = arr_or[j].substring(0,arr_or[j].length()-1); 208 arr_or[j] = arr_or[j].trim(); 209 } 210 if (j > 0) { 211 rel = " or "; 212 } else { 213 rel = ""; 214 } 215 simple_form = simple_form + rel + arr_or[j]; 216 } 217 Admin.notifyUser(simple_form); 218 if (arr_or.length > 1){ 219 simple_form = "(" + simple_form + ") "; 220 } 221 if (i > 0) { 222 rel = " and "; 223 } else { 224 rel = ""; 225 } 226 simple_form_all = simple_form_all + rel + simple_form; 227 228 } 229 230 return simple_form_all; 231 } 190 232 /** 191 233 * construct the URL-Param
Note: See TracChangeset
for help on using the changeset viewer.