Changeset 28883

Show
Ignore:
Timestamp:
10.03.2014 13:48:57 (6 years ago)
Author:
kjdon
Message:

added a method to create response for reset request for oaiserver

Files:
1 modified

Legend:

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

    r28877 r28883  
    348348  } 
    349349 
     350  public static Element createResetResponse(boolean success) { 
     351    Document doc = converter.newDOM(); 
     352    Element response = doc.createElement(GSXML.RESPONSE_ELEM); 
     353    if (success) { 
     354      response.setAttribute("status", "OK"); 
     355      GSXML.setNodeText(response, "Reset OAIServer successfully"); 
     356    } else { 
     357      response.setAttribute("status", "FAIL"); 
     358      GSXML.setNodeText(response, "Failed to reset oaiserver"); 
     359    } 
     360    return response; 
     361  } 
    350362  /** convert the escaped sequences (eg, '%3A') of those special characters back to their 
    351363   *  original form (eg, ':').