Changeset 1029 for MDService2/trunk/MDService2/src/eu/clarin/cmdi
- Timestamp:
- 01/02/11 19:30:58 (13 years ago)
- Location:
- MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/Cache.java
r980 r1029 172 172 } 173 173 174 DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd Thh:mm:ss");174 DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); 175 175 e.setAttribute("date", dateFormat.format(new Date()).toString()); 176 176 cacheindex_doc.getFirstChild().appendChild(e); -
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/CollectionProxyAction.java
r862 r1029 34 34 //targetURL =new URL( getBaseURL(), getActionkey()); 35 35 //FIXME: get maxdepth-constant out of here !! 36 targetURL = new URL(getBaseURL(), "?operation=getCollections&maxdepth= 3&collection=");36 targetURL = new URL(getBaseURL(), "?operation=getCollections&maxdepth=2&collection="); 37 37 //Admin.notifyUser("CollectionProxy.targetURL:" + targetURL); 38 38 -
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/GenericProxyAction.java
r980 r1029 56 56 private int maxdepth; 57 57 private String format; 58 private String options; 58 59 private String actionContentType; 59 60 private String userMsg; … … 142 143 } 143 144 145 public String getOptions() { 146 return options; 147 } 148 149 public void setOptions(String options) { 150 this.options = options; 151 } 152 144 153 public String getActionContentType() { 145 if (format.toLowerCase().equals("xml")) { 154 if (format.toLowerCase().startsWith("html")) { 155 this.actionContentType = "text/html"; 156 } else { 146 157 this.actionContentType = "text/xml"; 147 } else {148 this.actionContentType = "text/html";149 158 } 150 159 -
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/MDRepoProxyAction.java
r890 r1029 115 115 query.setMaximumRecords(getMaximumRecords()); 116 116 query.setStartRecord(getStartRecord()); 117 query.setOptions(getOptions()); 117 118 //Admin.notifyUser("MDRPA.records:" + query.getStartRecord()); 118 119 //Admin.notifyUser("MDRPA.records:" + query.getMaximumRecords()); … … 120 121 121 122 targetURL =new URL( getBaseURL(), urls.get(getActionkey()) + query.toURLParam() ); 123 Admin.notifyUser("MDRPA.targetURL.query.toURLParam:" + query.toURLParam()); 122 124 Admin.notifyUser("MDRPA.targetURL:" + targetURL); 123 125 return targetURL; -
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/model/Query.java
r911 r1029 58 58 private String maximumRecords = "50"; 59 59 private String squery = null; 60 private String options = null; 60 61 private int maxdepth=1; 61 62 … … 199 200 } 200 201 202 public String getOptions() { 203 return options; 204 } 205 206 public void setOptions(String options) { 207 this.options = options; 208 } 209 201 210 public String getStartRecord() { 202 211 return startRecord; … … 312 321 // 2010-07-11 this is just a hack, because url-encoding the handle acted strange 313 322 //String corrid = getQueryString().replace('_', '/'); 314 String corrid = getQueryString(); 315 targetRequest = "//MdSelfLink[.='" + corrid + "']"; 323 // 2010-12-28 needed for the lucene-index to recognize.. 324 // probably not the best place to handle -> move to repository: sanitize-query? 325 String corrid = getQueryString().replace(":","\\:").toLowerCase(); 326 Admin.notifyUser("Query.toURLParam.corrid=" + corrid); 327 targetRequest = "//MdSelfLink[ft:query(.,'" + corrid + "')]"; 316 328 } else { 317 329 if (query_cql == null){ … … 322 334 if ((startRecord != null) && (maximumRecords != null)) { 323 335 targetRequest = targetRequest + "&startRecord=" + getStartRecord() + "&iend=" + getMaximumRecords(); 336 } 337 if ((options != null)) { 338 targetRequest = targetRequest + "&format=xml-" + getOptions(); 324 339 } 325 340 }
Note: See TracChangeset
for help on using the changeset viewer.