Ignore:
Timestamp:
2005-05-16T11:02:50+12:00 (19 years ago)
Author:
kjdon
Message:

merged from branch ant-install-branch: merge 1

File:
1 edited

Legend:

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

    r8921 r9874  
    5050    }
    5151   
     52    public void cleanUp() {}
    5253    public void setParams(GSParams params) {
    5354    this.params = params;
     
    8182    }
    8283   
    83     Element config_doc = this.converter.getDOM(interface_config_file).getDocumentElement();
    84     String base_interface = config_doc.getAttribute("baseInterface");
     84    Document config_doc = this.converter.getDOM(interface_config_file);
     85    if (config_doc == null) {
     86        System.err.println("Receptionist: could not parse interface config file: "+interface_config_file.getPath());
     87        return false;
     88    }
     89    Element config_elem = config_doc.getDocumentElement();
     90    String base_interface = config_elem.getAttribute("baseInterface");
    8591    setUpBaseInterface(base_interface);
    86     setUpInterfaceOptions(config_doc);
     92    setUpInterfaceOptions(config_elem);
    8793
    8894    // load up the actions
    89     Element action_list = (Element)GSXML.getChildByTagName(config_doc, GSXML.ACTION_ELEM+GSXML.LIST_MODIFIER);
     95    Element action_list = (Element)GSXML.getChildByTagName(config_elem, GSXML.ACTION_ELEM+GSXML.LIST_MODIFIER);
    9096    NodeList actions = action_list.getElementsByTagName(GSXML.ACTION_ELEM);
    9197
     
    109115    }
    110116
    111     this.language_list = (Element)GSXML.getChildByTagName(config_doc, "languageList");
     117    this.language_list = (Element)GSXML.getChildByTagName(config_elem, "languageList");
    112118    if (language_list == null) {
    113119        System.err.println("Receptionist: didn't find a language list in the config file!!");
     
    229235        base_interfaces.add(base_interface);
    230236        // now see if this has a base interface
    231         Element config_doc = this.converter.getDOM(base_interface_config_file).getDocumentElement();
    232         base_interface = config_doc.getAttribute("baseInterface");
     237        Document config_doc = this.converter.getDOM(base_interface_config_file);
     238        if (config_doc == null) {
     239        System.err.println("Receptionist: could not parse base interface config file: "+base_interface_config_file.getPath());
     240        return false;
     241        }
     242        Element config_elem = config_doc.getDocumentElement();
     243        base_interface = config_elem.getAttribute("baseInterface");
    233244    }
    234245    return true;
    235246    }
    236247
    237     protected boolean setUpInterfaceOptions(Element config_doc) {
    238     Element option_list = (Element)GSXML.getChildByTagName(config_doc, "optionList");
     248    protected boolean setUpInterfaceOptions(Element config_elem) {
     249    Element option_list = (Element)GSXML.getChildByTagName(config_elem, "optionList");
    239250    if (option_list != null) {
    240251        System.err.println("found an option list");
Note: See TracChangeset for help on using the changeset viewer.