Changeset 28884

Show
Ignore:
Timestamp:
10.03.2014 13:50:28 (6 years ago)
Author:
kjdon
Message:

implemented handling for oaiserver?reset request - reloads the collection info. Call this on activating a collection for oaiserver. Changes in collections will be registered without having to restart tomcat

Files:
1 modified

Legend:

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

    r28873 r28884  
    345345        //For example, puka.cs.waikato.ac.nz vs www.greenstone.org 
    346346        //String base_url = request.getRequestURL().toString(); 
     347         
    347348        // if called by doPost (if this was originally a POST request), var queryString would have been set 
    348349        String query = (queryString == null) ? request.getQueryString() : queryString; 
    349350        queryString = null; // reset member variable, else no doGet will work as long as the server remains running 
    350351 
     352        if (query!=null && query.equals("reset")) { 
     353          logger.error("reset was called*******************"); 
     354          out.println("<?xml version='1.0' encoding='UTF-8' ?>"); 
     355          out.println(this.recept.process("<message><request reset='true'/></message>")); 
     356          return; 
     357        } 
    351358        String[] pairs = (query == null) ? null : query.split("&");//split into key/value pairs 
     359         
    352360        String verb = getVerb(query); 
    353361        Document response_doc = this.converter.newDOM();