Changeset 2010


Ignore:
Timestamp:
2001-02-19T14:44:57+13:00 (23 years ago)
Author:
paynter
Message:

Added a "classifier number" parameter for collections with more than one
phind classifier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/phind/client/Phind.java

    r1841 r2010  
    3434
    3535  <PARAM NAME=collection  VALUE="fao.org">
     36  <PARAM NAME=classifier  VALUE="1">
    3637  <PARAM NAME=phindcgi    VALUE="http://kowhai/cgi-bin/phindcgi">
    3738  <PARAM NAME=library     VALUE="http://kowhai/cgi-bin/library">
     
    99100    // What is the collection called?
    100101    public String collection;
     102
     103    // Which phind classifier are we using? (There may be more than one.)
     104    public String classifier;
    101105
    102106    // Internet address of phind resources
     
    271275    // Search for a word
    272276    //
    273     // Clled on two occasions:
     277    // Called on two occasions:
    274278    //   when the "Search" Button is pressed, or
    275279    //   to perform an "initial search"
     
    278282    if (mode == idleMode) {
    279283       
    280         // transform the word to an appropriate search key
    281         searchWord = searchWord.trim().toLowerCase();
    282         for (int i = 0; i < searchWord.length(); i++) {
    283         if ((searchWord.charAt(i) < 'a') || (searchWord.charAt(i) > 'z')) {
    284             searchWord = searchWord.substring(0, i);
    285         }
    286         }
    287284        setSearchTerm(searchWord);
     285
     286        // Convert the String from UTF8 charaters into
     287        // an encoding that is okay for a URL.
     288
     289        //searchWord = searchWord.trim().toLowerCase();
     290        //for (int i = 0; i < searchWord.length(); i++) {
     291        //      if ((searchWord.charAt(i) < 'a') || (searchWord.charAt(i) > 'z')) {
     292        //      searchWord = searchWord.substring(0, i);
     293        //  }
     294        //}
    288295
    289296        // look up the word
     
    402409
    403410    // Build the query
    404     String query = phindcgi_address + "x=1&c=" + collection;
     411    String query = phindcgi_address + "x=1&c=" + collection + "&d=" + classifier;
    405412
    406413    if (keyKnown) {
     
    543550    collection = parameterValue("collection");
    544551    System.out.println("Phind collection: " + collection);
     552
     553    // Which of the collection's classifiers are we using?
     554    classifier = parameterValue("classifier", "1");
     555    System.out.println("Phind classifier: " + classifier);
    545556
    546557    // Where is the phind CGI script
Note: See TracChangeset for help on using the changeset viewer.