Ignore:
Timestamp:
2003-11-10T14:04:13+13:00 (21 years ago)
Author:
kjdon
Message:

added support for build types and search types in the Collection and CollectionConfiguration classes so that the preview pane can set the right url based on the collection'sbuild type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/PreviewPane.java

    r5571 r5815  
    4343import javax.swing.*;
    4444import org.greenstone.gatherer.Dictionary;
     45import org.greenstone.gatherer.collection.Collection;
    4546import org.greenstone.gatherer.Gatherer;
    4647import org.greenstone.gatherer.util.GURL;
     
    107108        try {
    108109        // Now load the collection
    109         homepage = new URL(Gatherer.config.exec_address.toString() + "?a=p&p=about&c=" + Gatherer.c_man.getCollection().getName());
     110        Collection this_coll = Gatherer.c_man.getCollection();
     111        String extra_args = "";
     112        String build_type = this_coll.getCollectionType();
     113        if (build_type.equals("mgpp")) {
     114            // we need some more args on the url
     115            String search_types = this_coll.getSearchTypes();
     116            if (search_types.equals("")) {
     117            extra_args = "&ct=1&qt=0&qto=3";
     118            } else if (search_types.equals("plain")) {
     119            extra_args = "&ct=1&qt=0&qto=1";
     120            } else if (search_types.equals("form")) {
     121            extra_args = "&ct=1&qt=1&qto=2";
     122            } else if (search_types.equals("plain,form")) {
     123            extra_args = "&ct=1&qt=0&qto=3";
     124            } else if (search_types.equals("form,plain")) {
     125            extra_args = "&ct=1&qt=1&qto=3";
     126            }
     127        }
     128       
     129        homepage = new URL(Gatherer.config.exec_address.toString() + "?a=p&p=about&c=" + this_coll.getName()+extra_args);
    110130        String[] args = new String[1];
    111131        args[0] = homepage.toString();
Note: See TracChangeset for help on using the changeset viewer.