Changeset 26506 for main

Show
Ignore:
Timestamp:
23.11.2012 00:34:36 (7 years ago)
Author:
davidb
Message:

Support for o=json as output type in Greenstone 3

Files:
1 modified

Legend:

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

    r26499 r26506  
    593593        Document theXML = null; 
    594594 
    595         if (output.equals("xml") || output.equals("clientside")) 
     595        if (output.equals("xml") || (output.equals("json")) || output.equals("clientside")) 
    596596        { 
    597597            // Append some bits and pieces first... 
     
    628628            root.appendChild(filepath); 
    629629 
    630             if (output.equals("xml")) 
    631                 return theXML.getDocumentElement(); 
    632         } 
     630            if ((output.equals("xml")) || output.equals("json")) { 
     631                // in the case of "json", calling method responsible for converting to JSON-string 
     632                return theXML.getDocumentElement(); 
     633            } 
     634        } 
     635 
    633636 
    634637        Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);