Changeset 1623 for MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/proxy/SRUProxy.java
- Timestamp:
- 11/22/11 10:57:22 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/proxy/SRUProxy.java
r1540 r1623 21 21 22 22 import eu.clarin.cmdi.mdservice.model.Diagnostics; 23 import eu.clarin.cmdi.mdservice.model.Query; 23 24 import eu.clarin.cmdi.mdservice.model.WorkspaceProfile; 24 25 … … 39 40 * Properties to be filled by Struts with according request-parameters 40 41 */ 42 /* 41 43 private String q; 42 44 private String version; … … 54 56 private String x_cmd_repository; 55 57 private String x_cmd_collections; 58 */ 56 59 private Set paramSet; 57 60 … … 59 62 private static int OP_EXPLAIN = 2; 60 63 private static int OP_SCAN = 3; 64 65 61 66 62 67 … … 82 87 } 83 88 89 public SRUProxy(Query q){ 90 setQuery(q); 91 } 92 84 93 protected void initialize(){ 85 94 /* 86 95 // TODO set SRU params 87 96 // missing collections, columns... … … 94 103 setX_cmd_repository(getSourceAction().getRepository()); 95 104 setQuery(this.fullQueryString()); 96 105 */ 97 106 /* 98 107 if (getServletRequest() != null){ … … 126 135 } 127 136 128 137 /* 129 138 public String getQ() { 130 139 return q; … … 134 143 this.q = q; 135 144 } 145 */ 136 146 /* 137 147 public InputStream getResultStream() { … … 142 152 } 143 153 */ 144 154 /* 145 155 public String getVersion() { 146 156 return version; … … 254 264 this.x_cmd_collections = x_cmd_collections; 255 265 } 256 266 */ 257 267 258 268 @Override … … 483 493 //TODO params 484 494 if (paramSet == null){ 485 if (!( operation== null)){486 params = params + "operation=" + operation;487 } 488 if (!( version== null)){489 params = params + "&version=" + version;490 } 491 if (!( query== null)){492 params = params + "&query=" + query;493 } 494 if ( getStartRecord() > 0){495 params = params + "&startRecord=" + String.valueOf(get StartRecord());496 } 497 if ( getMaximumRecords()> 0){498 params = params + "&numRecords=" + String.valueOf(get MaximumRecords());495 if (!(getParam("operation") == null)){ 496 params = params + "operation=" + getParam("operation"); 497 } 498 if (!(getParam("version") == null)){ 499 params = params + "&version=" + getParam("version"); 500 } 501 if (!(getParam("query") == null)){ 502 params = params + "&query=" + getParam("query"); 503 } 504 if (Integer.parseInt(getParam("startRecord")) > 0){ 505 params = params + "&startRecord=" + String.valueOf(getParam("startRecord")); 506 } 507 if (Integer.parseInt(getParam("maximumRecords"))> 0){ 508 params = params + "&numRecords=" + String.valueOf(getParam("maximumRecords")); 499 509 } 500 510 } else { … … 519 529 520 530 if (this.getBaseURI() == null){ 521 requestURI = this.getX_cmd_repository();531 requestURI = getParam("x_cmd_repository");//this.getX_cmd_repository(); 522 532 } else { 523 533 requestURI = this.getBaseURI();
Note: See TracChangeset
for help on using the changeset viewer.