Changeset 1629
- Timestamp:
- 11/25/11 21:09:47 (12 years ago)
- Location:
- MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/GenericAction.java
r1628 r1629 335 335 params = new HashMap(getServletRequest().getParameterMap()); 336 336 337 setDefaultParams(); 337 //setDefaultParams(); 338 339 // set defaults 340 if ( params.get("version") == null){ 341 addParam("version","1.2"); 342 } 343 if ( params.get("operation") == null){ 344 addParam("operation","searchRetrieve"); 345 } 346 //q=query 347 if (getQ() != null) { 348 addParam("q",getQ()); 349 addParam("query",getQ()); 350 } else { 351 addParam("q",this.getParam("query")); 352 } 353 354 if ( params.get("startRecord") == null){ 355 addParam("startRecord","1"); 356 } 357 if ( params.get("maximumRecords") == null){ 358 addParam("maximumRecords","50"); 359 } 360 361 if ( params.get("x-cmd-maxdepth") == null){ 362 if (params.get("maxdepth") == null){ 363 addParam("maxdepth","2"); 364 } 365 } else { 366 addParam("maxdepth",params.get("x-cmd-maxdepth")[0]); 367 } 368 369 if ( params.get("x-cmd-repository") == null){ 370 if (params.get("repository") == null){ 371 addParam("repository",WorkspaceProfile.getRepositoryByIndex(0)); 372 } 373 } else { 374 addParam("repository",params.get("x-cmd-repository")[0]); 375 } 376 377 if ( params.get("x-cmd-cache") == null){ 378 if (params.get("cache") == null){ 379 addParam("cache",Cache.SKIP); 380 } 381 } else { 382 addParam("cache",params.get("x-cmd-cache")[0]); 383 } 384 385 if ( params.get("x-cmd-lang") == null){ 386 if (params.get("lang") == null){ 387 addParam("lang","en"); 388 } 389 } else { 390 addParam("lang",params.get("x-cmd-lang")[0]); 391 } 392 393 if ( params.get("x-cmd-format") == null){ 394 if (params.get("format") == null){ 395 if (this.format == null) { 396 addParam("format","xml"); 397 } else if (this.format.equals("")){ 398 addParam("format","xml"); 399 } else { 400 addParam("format",this.format); 401 } 402 } 403 } else { 404 addParam("format",params.get("x-cmd-format")[0]); 405 } 406 407 addParam("fullformat",getFullFormat()); 338 408 } 339 409 -
MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/RepoAction.java
r1628 r1629 133 133 return; 134 134 } 135 135 136 //Query query = new Query(); 136 137 switch (WorkspaceProfile.RepositoryType.toRepositoryType(WorkspaceProfile.getRepositoryType(getRepository()))) -
MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/proxy/BasicProxy.java
r1628 r1629 67 67 public void checkParams() { 68 68 // required Params 69 70 if (getParam("q").equals("")) {71 getSourceAction().getDiagnostics().Add(Diagnostic.MANDATORY_NOTSUPPLIED, "q");72 }69 /* 70 //if (getParam("q").equals("")) { 71 // getSourceAction().getDiagnostics().Add(Diagnostic.MANDATORY_NOTSUPPLIED, "q"); 72 //} 73 73 if (getParams().get("format") == null){ 74 74 if (getSourceAction().getFormat() == null) { … … 80 80 } 81 81 } 82 // moved into action - needed for creation proxy 83 /*if (getParams().get("repository") == null){ 84 addParam("repository",WorkspaceProfile.getRepositoryByIndex(0)); 85 } 82 83 addParam("fullformat",getSourceAction().getFullFormat()); 86 84 */ 87 addParam("fullformat",getSourceAction().getFullFormat());88 85 } 89 86 -
MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/proxy/MDRepoProxy.java
r1628 r1629 79 79 public void checkParams() { 80 80 // set defaults 81 super.checkParams();82 81 // super.checkParams(); 82 /* 83 83 if ( getParams().get("startRecord") == null){ 84 84 addParam("startRecord","1"); … … 122 122 if ( getParams().get("x-cmd-format") == null){ 123 123 // TODO moved into BasicAction 124 /*124 125 125 if (getParams().get("format") == null){ 126 126 if (getSourceAction().getFormat() == null) { … … 132 132 } 133 133 } 134 */134 135 135 } else { 136 136 addParam("format",getParams().get("x-cmd-format")[0]); … … 140 140 addParam("fullformat",getSourceAction().getFullFormat()); 141 141 //super.checkParams(); 142 142 */ 143 143 // TODO ????? 144 144 if (getSourceAction().getActionkey().equals("sru")){ -
MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/proxy/RepoProxy.java
r1628 r1629 84 84 public void checkParams() { 85 85 // required Params 86 super.checkParams();86 //super.checkParams(); 87 87 // check and set defaults 88 88 if (WorkspaceProfile.getRepositoryPath(getParam("repository")) == null) {
Note: See TracChangeset
for help on using the changeset viewer.