Changeset 33969


Ignore:
Timestamp:
2020-02-25T13:39:10+13:00 (4 years ago)
Author:
kjdon
Message:

we no longer use OAIConfig.xml as the filename, now we use eg oaiserver-OAIConfig.xml, so that we can have 2 OAI servers if necessary. eg serving different sites. so pass in the server name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/OAIXML.java

    r32941 r33969  
    217217   *  the oai_version and baseURL variables are also set in here.
    218218   *  The init() method is also called in here. */
    219   public static Element getOAIConfigXML() {
     219  public static Element getOAIConfigXML(String servlet_url_name) {
    220220     
    221221    File oai_config_file = null;
    222222
     223    String config_filename = servlet_url_name+"-OAIConfig.xml";
    223224    try {
    224       URL oai_config_url = Class.forName("org.greenstone.gsdl3.OAIServer").getClassLoader().getResource("OAIConfig.xml");
     225      URL oai_config_url = Class.forName("org.greenstone.gsdl3.OAIServer").getClassLoader().getResource(config_filename);
    225226      if (oai_config_url == null) {
    226     logger.error("couldn't find OAIConfig.xml via class loader");
     227    logger.error("couldn't find "+config_filename+" via class loader");
    227228    return null;
    228229      }
     
    233234      }
    234235    } catch(Exception e) {
    235       logger.error("couldn't find OAIConfig.xml "+e.getMessage());
     236      logger.error("couldn't find "+config_filename+" "+e.getMessage());
    236237      return null;
    237238    }
Note: See TracChangeset for help on using the changeset viewer.