Changeset 26056

Show
Ignore:
Timestamp:
01.08.2012 15:37:53 (7 years ago)
Author:
ak19
Message:

Need to trim the search types that get written out to the collectionConfig.xml file, else there can be extraneous whitespace in the form of a newline before the terminating quote, which causes the FieldQuery? to not turn up in the ServiceList? XML being read in by the Greenstone server code when the TextQuery? is not also present.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfigXMLReadWrite.java

    r26016 r26056  
    944944            } 
    945945        } 
     946        searchtype_str = searchtype_str.trim(); 
    946947 
    947948        // pretend its a format statement 
     
    15131514            return; 
    15141515        } 
    1515         String searchtype_str = XMLTools.getNodeText(e); 
     1516        String searchtype_str = XMLTools.getNodeText(e).trim(); 
    15161517        //Get the 'search' element from 'to' 
    15171518        Element search = (Element) XMLTools.getChildByTagName(to.getDocumentElement(), StaticStrings.SEARCH_STR);