Changeset 56:eb62edd19945

Show
Ignore:
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:
1 modified

Legend:

Unmodified
Added
Removed
  • org/w3c/unicorn/UnicornCall.java

    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 $ 
    22// Author: Jean-Guilhem Rouel 
    33// (c) COPYRIGHT MIT, ERCIM and Keio, 2006. 
     
    265265                        UnicornCall.logger.debug("Map of string parameter : " + mapOfArrayUseParameter + "."); 
    266266                } 
     267                 
    267268 
    268269                final MimeType aMimeType = aInputFactory.getMimeType(); 
     
    277278                        // add only observer who handle the current mimetype 
    278279                        if (!aObserver.canHandleMimeType(aMimeType, aEnumInputMethod)) { 
    279                                  
    280280                                if (UnicornCall.logger.isDebugEnabled()) { 
    281281                                        UnicornCall.logger.debug( 
     
    325325                                                        aInputMethod.getCallMethod().isPost()); 
    326326                                        // add this request to request list 
     327                                         
    327328                                        aRequestList.addRequest( 
    328329                                                        aRequest, 
     
    364365                                        aInputMethod.getCallParameter().getName(), 
    365366                                        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                         
    366380                        // add this request to request list 
    367381                        aRequestList.addRequest( 
     
    374388                        } 
    375389                        // add required parameter 
     390                         
    376391                        for (final CallParameter aCallParameter : aObserver.getCallMethod(aEnumInputMethod).getMapOfCallParameter().values()) { 
    377392                                if (aCallParameter.isRequired() && aCallParameter.isFixed()) { 
     
    583598                        final String sName, 
    584599                        final String[] tStringValue) { 
     600                 
    585601                final String[] tStringValueLocal = mapOfStringParameter.get(sName); 
    586602                if (tStringValueLocal != null) {