Changeset 15484 for other-projects


Ignore:
Timestamp:
2008-05-15T13:30:24+12:00 (16 years ago)
Author:
ak19
Message:

Added in basicQuery

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/trunk/gs3-webservices-democlient/src/GS3DemoClient/org/greenstone/gs3client/dlservices/GS3WebServicesQBRAPI.java

    r15222 r15484  
    521521        return invokeWith(new Object[]{collection, service, lang, nameToValsMap});
    522522    }   
    523        
     523   
     524        /**
     525     * This method is used to perform the most basic query:
     526     * it assumes defaults for all other parameters and provides only
     527     * the query string. It is built on top of a TextQuery.
     528     * @param collection is the Greenstone collection to be searched
     529     * @param lang is the preferred language of the display content in
     530     * the response to be returned.
     531     * @param query is the string to be sought in the Greenstone collection
     532     * @return a Greenstone 3 XML response message for the query specifying
     533     * the search results.
     534     */
     535    public String basicQuery(String collection, String lang, String query) {
     536        call.setOperationName( "basicQuery" );
     537        addStringParam("collection");
     538        addStringParam("lang");
     539        addStringParam("query");
     540        return invokeWith(new Object[]{collection, lang, query});
     541    }
     542
    524543    /* (3) RETRIEVE PROCESS METHODS - pp.47-49 */
    525544    /** (a) DocumentContentRetrieve request sent to a collection's
     
    777796            System.out.println(ws.describeService("AddItem", "", ""));
    778797           
    779             // (2) try 3 query methods (simplerFieldQuery twice) + getFieldNameMappings()
     798            // (2) try 2 query methods: query and basicQuery
    780799            HashMap map = new HashMap();
    781800            map.put("maxDocs", "100");
     
    791810            System.out.println("Regular query: " + response);
    792811           
     812            // basicQuery
     813            response = ws.basicQuery("gs2mgppdemo", "", "cat");
     814            System.out.println("Basic query on 'cat' over collection gs2mgppdemo:"
     815                    + response);
    793816           
    794817            // (3) try 2 browse
Note: See TracChangeset for help on using the changeset viewer.