Changeset 802:789225066772

Show
Ignore:
Timestamp:
10/19/09 12:47:05 (4 years ago)
Author:
tgambet
Branch:
default
convert_revision:
svn:cdcfb263-7567-472c-a848-e2c2df3466e7/trunk@803
Message:

renamed responseParser.properties file to responseImpl.properties
+ renamed initResponseParsers() method to initResponseImplementations()
+ added reference to the old schema implementation class

Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • src/org/w3c/unicorn/Framework.java

    r794 r802  
    1 // $Id: Framework.java,v 1.23 2009-10-19 10:09:04 tgambet Exp $ 
     1// $Id: Framework.java,v 1.24 2009-10-19 12:47:05 tgambet Exp $ 
    22// Author: Damien LEROY & Thomas GAMBET. 
    33// (c) COPYRIGHT MIT, ERCIM ant Keio, 2006. 
     
    9696        private static String[] configFiles = { 
    9797                "extensions.properties", 
    98                 "responseParsers.properties", 
     98                "responseImpl.properties", 
    9999                "output.properties", 
    100100                "velocity.properties", 
     
    121121                        initConfig(); 
    122122                        initUnmarshallers(); 
    123                         initResponseParsers(); 
     123                        initResponseImplementations(); 
    124124                        initObservers(); 
    125125                        initTasklists(); 
     
    261261         
    262262        @SuppressWarnings("unchecked") 
    263         public static void initResponseParsers() throws InitializationFailedException { 
     263        public static void initResponseImplementations() throws InitializationFailedException { 
    264264            // Load the map of ResponseParser 
    265265                logger.debug("-------------------------------------------------------"); 
    266                 logger.debug("Loading available response implementations form responseParsers.properties"); 
    267                 Properties aProperties = Property.getProps("responseParsers.properties"); 
     266                logger.debug("Loading available response implementations form responseImpl.properties"); 
     267                Properties aProperties = Property.getProps("responseImpl.properties"); 
    268268                for (Object key : aProperties.keySet()) { 
    269269                        String className = aProperties.getProperty(key.toString()); 
     
    272272                                        Class.forName(className).getConstructor(InputStream.class, String.class); 
    273273                                        responseImpl.put(key.toString(), (Class<Response>) Class.forName(className)); 
    274                                         logger.debug("> Parser loaded: " + responseImpl.get(key).getClass().toString()); 
     274                                        logger.debug("> Implementation loaded: " + responseImpl.get(key).getClass().toString()); 
    275275                                } else { 
    276276                                        logger.error("> Class: " + className + " is not a Response implementation."); 
    277277                                } 
    278278                        } catch (ClassNotFoundException e) { 
    279                                 logger.error("Class not found: " + className + ". Check responseParsers.properties."); 
     279                                logger.error("Class not found: " + className + ". Check responseImpl.properties."); 
    280280                        } catch (NoSuchMethodException e) { 
    281281                                logger.error("Response implementation: " + className + " does not have a constructor with signature (InputStream is, String charset). Implementation skipped."); 
     
    285285                } 
    286286                if (responseImpl.size() == 0) { 
    287                         throw new InitializationFailedException("There is no parser loaded. Check responseParsers.properties."); 
     287                        throw new InitializationFailedException("There is no response implementation loaded. Check responseImpl.properties."); 
    288288                } else { 
    289289                        logger.info("OK - " + responseImpl.size() + " implementation(s) successfully loaded."); 
  • src/org/w3c/unicorn/action/InitAction.java

    r357 r802  
    7676                                response.flushBuffer(); 
    7777                                try { 
    78                                         Framework.initResponseParsers(); 
     78                                        Framework.initResponseImplementations(); 
    7979                                        out.write("OK\n"); 
    8080                                } catch (InitializationFailedException e) {