Changeset 56:eb62edd19945
- Timestamp:
- 01/22/08 13:53:47 (5 years ago)
- Author:
- dtea
- Branch:
- default
- convert_revision:
- svn:cdcfb263-7567-472c-a848-e2c2df3466e7/trunk@57
- Message:
-
Internationalization : Modification of UnicornCall? to add parameter lang and its value in th map of parameter.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r32
|
r56
|
|
| 1 | | // $Id: UnicornCall.java,v 1.6 2007-11-29 14:11:59 dtea Exp $ |
| | 1 | // $Id: UnicornCall.java,v 1.7 2008-01-22 13:53:47 dtea Exp $ |
| 2 | 2 | // Author: Jean-Guilhem Rouel |
| 3 | 3 | // (c) COPYRIGHT MIT, ERCIM and Keio, 2006. |
| … |
… |
|
| 265 | 265 | UnicornCall.logger.debug("Map of string parameter : " + mapOfArrayUseParameter + "."); |
| 266 | 266 | } |
| | 267 | |
| 267 | 268 | |
| 268 | 269 | final MimeType aMimeType = aInputFactory.getMimeType(); |
| … |
… |
|
| 277 | 278 | // add only observer who handle the current mimetype |
| 278 | 279 | if (!aObserver.canHandleMimeType(aMimeType, aEnumInputMethod)) { |
| 279 | | |
| 280 | 280 | if (UnicornCall.logger.isDebugEnabled()) { |
| 281 | 281 | UnicornCall.logger.debug( |
| … |
… |
|
| 325 | 325 | aInputMethod.getCallMethod().isPost()); |
| 326 | 326 | // add this request to request list |
| | 327 | |
| 327 | 328 | aRequestList.addRequest( |
| 328 | 329 | aRequest, |
| … |
… |
|
| 364 | 365 | aInputMethod.getCallParameter().getName(), |
| 365 | 366 | aInputMethod.getCallMethod().isPost()); |
| | 367 | |
| | 368 | // get value of ucn_lang parameter to associate it with parameter lang of the observer (if it has one). |
| | 369 | // ucn_lang is defined in forms of index templates (xx_index.html.vm) |
| | 370 | String[] valOfUcnLang = this.mapOfStringParameter.get("ucn_lang"); |
| | 371 | |
| | 372 | // get name of the lang parameter (defined in RDF file) |
| | 373 | String observerParamLangName = aObservation.getObserver().getParamLangName(); |
| | 374 | |
| | 375 | // if lang parameter exists, we add name and value in parameters of the request. |
| | 376 | if (observerParamLangName!=null && valOfUcnLang != null){ |
| | 377 | aRequest.addParameter(observerParamLangName, valOfUcnLang[0]); |
| | 378 | } |
| | 379 | |
| 366 | 380 | // add this request to request list |
| 367 | 381 | aRequestList.addRequest( |
| … |
… |
|
| 374 | 388 | } |
| 375 | 389 | // add required parameter |
| | 390 | |
| 376 | 391 | for (final CallParameter aCallParameter : aObserver.getCallMethod(aEnumInputMethod).getMapOfCallParameter().values()) { |
| 377 | 392 | if (aCallParameter.isRequired() && aCallParameter.isFixed()) { |
| … |
… |
|
| 583 | 598 | final String sName, |
| 584 | 599 | final String[] tStringValue) { |
| | 600 | |
| 585 | 601 | final String[] tStringValueLocal = mapOfStringParameter.get(sName); |
| 586 | 602 | if (tStringValueLocal != null) { |