Changeset 27054 for main


Ignore:
Timestamp:
2013-03-12T13:18:01+13:00 (11 years ago)
Author:
sjm84
Message:

Removing some debug statements and reformatting

File:
1 edited

Legend:

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

    r27023 r27054  
    3030    protected static final String RETRIEVE_TEMPLATE_FROM_XML_FILE = "RetrieveXMLTemplateFromFile";
    3131    protected static final String SAVE_TEMPLATE_TO_XML_FILE = "SaveXMLTemplateToFile";
    32     protected static final String GET_GSLIB_ELEMENTS_FROM_FILE = "GetGSLIBElementsFromFile";   
     32    protected static final String GET_GSLIB_ELEMENTS_FROM_FILE = "GetGSLIBElementsFromFile";
    3333    /*********************************************************/
    3434
     
    300300    {
    301301        Element result = GSXML.createBasicResponse(this.doc, GET_GSLIB_ELEMENTS_FROM_FILE);
    302        
     302
    303303        if (request == null)
    304304        {
     
    309309        String lang = request.getAttribute(GSXML.LANG_ATT);
    310310        String uid = request.getAttribute(GSXML.USER_ID_ATT);
    311        
     311
    312312        // Get the parameters of the request
    313313        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
     
    325325        String filePath = GlobalProperties.getGSDL3Home() + File.separator + "interfaces" + File.separator + interfaceName + File.separator + "transform" + File.separator + "gslib.xsl";
    326326        File xslFile = new File(filePath);
    327        
    328         System.err.println("1 -> " + filePath);
    329         if(xslFile.exists())
    330         {
    331             System.err.println("2");
     327
     328        if (xslFile.exists())
     329        {
    332330            XMLConverter converter = new XMLConverter();
    333331            Document xslDoc = converter.getDOM(xslFile, "UTF-8");
     
    335333            Element templateList = this.doc.createElement("templateList");
    336334            String templateListString = "[";
    337            
     335
    338336            NodeList templateElems = xslDoc.getElementsByTagNameNS(GSXML.XSL_NAMESPACE, "template");
    339             for(int i = 0; i < templateElems.getLength(); i++)
    340             {
    341                 Element currentElem = (Element)templateElems.item(i);
    342                 if(currentElem.hasAttribute(GSXML.NAME_ATT))
     337            for (int i = 0; i < templateElems.getLength(); i++)
     338            {
     339                Element currentElem = (Element) templateElems.item(i);
     340                if (currentElem.hasAttribute(GSXML.NAME_ATT))
    343341                {
    344342                    templateListString += "\"" + currentElem.getAttribute(GSXML.NAME_ATT) + "\"";
    345                     if(i < templateElems.getLength() - 1)
     343                    if (i < templateElems.getLength() - 1)
    346344                    {
    347345                        templateListString += ",";
     
    349347                }
    350348            }
    351            
     349
    352350            templateListString += "]";
    353             System.err.println("3 -> " + templateListString);
     351
    354352            templateList.setTextContent(templateListString);
    355353            result.appendChild(templateList);
    356354        }
    357         System.err.println("4");
    358        
     355
    359356        return result;
    360357    }
Note: See TracChangeset for help on using the changeset viewer.