Changeset 8831


Ignore:
Timestamp:
2004-12-16T15:35:21+13:00 (19 years ago)
Author:
kjdon
Message:

added a facility to have interface options - can control eg whether query term highlighting should be used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/core/Receptionist.java

    r8562 r8831  
    8484    String base_interface = config_doc.getAttribute("baseInterface");
    8585    setUpBaseInterface(base_interface);
     86
     87    // get any interface options
     88    Element option_list = (Element)GSXML.getChildByTagName(config_doc, "optionList");
     89    if (option_list != null) {
     90        // we set any options in the config params
     91        NodeList options = option_list.getElementsByTagName("option");
     92        for (int i=0; i<options.getLength(); i++) {
     93        Element option = (Element)options.item(i);
     94        String name = option.getAttribute(GSXML.NAME_ATT);
     95        String value = option.getAttribute(GSXML.VALUE_ATT);
     96        if (!name.equals("") && !value.equals("")) {
     97            this.config_params.put(name, value);
     98        }
     99        }
     100    }
     101
     102    // load up the actions
    86103    Element action_list = (Element)GSXML.getChildByTagName(config_doc, GSXML.ACTION_ELEM+GSXML.LIST_MODIFIER);
    87104    NodeList actions = action_list.getElementsByTagName(GSXML.ACTION_ELEM);
     
    110127        System.err.println("Receptionist: didn't find a language list in the config file!!");
    111128    }
     129
    112130    return true;
    113131    }
Note: See TracChangeset for help on using the changeset viewer.