Ignore:
Timestamp:
2010-03-11T16:45:58+13:00 (14 years ago)
Author:
ak19
Message:

FedoraConnection.java changed to work with files that have no TOC (Table of Contents) because they have only 1 section. Other source files only have cosmetic changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Connection.java

    r21573 r21775  
    10351035                // set the text content to what was retrieved
    10361036                Element nodeContent = doc.createElement(GSXML.NODE_CONTENT_ELEM);
    1037                 Text textNode = doc.createTextNode(sectionContent);
     1037                Text textNode = doc.createTextNode(sectionContent.trim());
    10381038               
    10391039                nodeContent.appendChild(textNode);
     
    13011301     * serviceNames: DocumentContent/Metadata/StructureRetrieve, ClassifierBrowse,
    13021302     * ClassifierBrowseMetadataRetrieve.   
     1303     * All collections in this Digital Library (Fedora Repository) share
     1304     * the same services, so this method returns the same as
     1305     * describeService(serviceName).
    13031306     * @param collectionName - the name of the collection whose services are to
    13041307     * be described. It will be converted to a fedora collection pid, which is of
     
    13331336     * return nothing special except their names; browse (and any query)
    13341337     * return more complex XML responses.
    1335      * All collections in this Digital Library (Fedora Repository) share
    1336      * the same services, so this method returns the same as
    1337      * describeService(serviceName).
    13381338     * @param serviceName - the name of the service in the collection which is to
    13391339     * be described.*/
     
    13551355        attribute = doc.createAttribute(GSXML.TYPE_ATT);
    13561356       
    1357         if(serviceName.toLowerCase().endsWith("retrieve"))
     1357        if(serviceName.toLowerCase().endsWith("retrieve")) {
    13581358            attribute.setValue(GSXML.SERVICE_TYPE_RETRIEVE);
    1359        
     1359        }
    13601360        else if(serviceName.toLowerCase().contains("browse")) {
    13611361            attribute.setValue(GSXML.SERVICE_TYPE_BROWSE);
     
    13901390        else if(serviceName.toLowerCase().contains("query")) {
    13911391            attribute.setValue(GSXML.SERVICE_TYPE_QUERY);
    1392             if(serviceName.equals("TextQuery"))
     1392            if(serviceName.equals("TextQuery")) {
    13931393                describeTextQueryService(service);
    1394             else if(serviceName.equals("FieldQuery"))
     1394            } else if(serviceName.equals("FieldQuery")) {
    13951395                describeFieldQueryService(service);
     1396            }
    13961397        }
    13971398       
     
    20452046                // there may be fewer searchTerms than fieldNames (since some
    20462047                // fieldNames may have been left empty), so loop on searchTerms
    2047                 if(map.containsKey(fieldNames[i])) { //fieldName is already
     2048                if(map.containsKey(fieldNames[i])) { // fieldName is already
    20482049                    // in the list, so append comma with new value
    20492050                    String termsList = (String)map.get(fieldNames[i]);
Note: See TracChangeset for help on using the changeset viewer.