Changeset 1528 for MDService2
- Timestamp:
- 09/08/11 20:37:47 (13 years ago)
- Location:
- MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/GenericAction.java
r1527 r1528 51 51 private String actionkey = "generic"; 52 52 private String q; 53 private String format ;53 private String format = "xml"; 54 54 55 55 private String actionContentType; … … 92 92 93 93 public String getQ() { 94 /*95 if (q == null) {96 return "";97 } else {98 return q;99 }100 */101 94 return q; 102 95 } 103 96 104 97 public void setQ(String q) { 105 //if (q == null) q="";106 98 this.q = q; 107 99 } 108 100 109 101 public void setFormat(String format) { 110 //if (q == null) q="";111 102 this.format = format; 112 103 } … … 133 124 } 134 125 public String getFormat() { 135 return getParam(" x-cmd-format");126 return getParam("format"); 136 127 } 137 128 public String getCache() { 138 return getParam(" x-cmd-cache");129 return getParam("cache"); 139 130 } 140 131 public String getRepository() { 141 return getParam(" x-cmd-repository");132 return getParam("repository"); 142 133 } 143 134 public String getLang() { 144 return getParam(" x-cmd-lang");135 return getParam("lang"); 145 136 } 146 137 public String getCollections() { 147 return getParam(" x-cmd-collections");138 return getParam("collections"); 148 139 } 149 140 public String getColumns() { 150 return getParam(" x-cmd-columns");141 return getParam("columns"); 151 142 } 152 143 public String getMaxdepth() { 153 return getParam(" x-cmd-maxdepth");144 return getParam("maxdepth"); 154 145 } 155 146 … … 292 283 addParam("maximumRecords","50"); 293 284 } 285 294 286 if ( params.get("x-cmd-maxdepth") == null){ 295 addParam("x-cmd-maxdepth","2"); 296 } 287 if (params.get("maxdepth") == null){ 288 addParam("maxdepth","2"); 289 } 290 } else { 291 addParam("maxdepth",params.get("x-cmd-maxdepth")[0]); 292 } 293 297 294 if ( params.get("x-cmd-repository") == null){ 298 addParam("x-cmd-repository", WorkspaceProfile.getRepositoryByIndex(0)); 299 } 295 if (params.get("repository") == null){ 296 addParam("repository",WorkspaceProfile.getRepositoryByIndex(0)); 297 } 298 } else { 299 addParam("repository",params.get("x-cmd-repository")[0]); 300 } 301 300 302 if ( params.get("x-cmd-cache") == null){ 301 addParam("x-cmd-cache",Cache.SKIP); 302 } 303 if (params.get("cache") == null){ 304 addParam("cache",Cache.SKIP); 305 } 306 } else { 307 addParam("cache",params.get("x-cmd-cache")[0]); 308 } 309 303 310 if ( params.get("x-cmd-lang") == null){ 304 addParam("x-cmd-lang","en"); 305 } 311 if (params.get("lang") == null){ 312 addParam("lang","en"); 313 } 314 } else { 315 addParam("lang",params.get("x-cmd-lang")[0]); 316 } 317 306 318 if ( params.get("x-cmd-format") == null){ 307 addParam("x-cmd-format","xml"); 319 if (params.get("format") == null){ 320 if (this.format == null) { 321 addParam("format","xml"); 322 } else if (this.format.equals("")){ 323 addParam("format","xml"); 324 } else { 325 addParam("format",this.format); 326 } 327 } 328 } else { 329 addParam("format",params.get("x-cmd-format")[0]); 308 330 } 309 331 310 332 addParam("fullformat",getFullFormat()); 311 addParam("format",getFormat());312 333 313 334 } -
MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/RepoAction.java
r1525 r1528 83 83 @Override 84 84 public String getFullFormat() { 85 return actionkey+ "2" + getFormat();85 return getActionkey() + "2" + getFormat(); 86 86 } 87 87 /**
Note: See TracChangeset
for help on using the changeset viewer.