- Timestamp:
- 2005-05-16T11:02:50+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/Receptionist.java
r8921 r9874 50 50 } 51 51 52 public void cleanUp() {} 52 53 public void setParams(GSParams params) { 53 54 this.params = params; … … 81 82 } 82 83 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"); 85 91 setUpBaseInterface(base_interface); 86 setUpInterfaceOptions(config_ doc);92 setUpInterfaceOptions(config_elem); 87 93 88 94 // 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); 90 96 NodeList actions = action_list.getElementsByTagName(GSXML.ACTION_ELEM); 91 97 … … 109 115 } 110 116 111 this.language_list = (Element)GSXML.getChildByTagName(config_ doc, "languageList");117 this.language_list = (Element)GSXML.getChildByTagName(config_elem, "languageList"); 112 118 if (language_list == null) { 113 119 System.err.println("Receptionist: didn't find a language list in the config file!!"); … … 229 235 base_interfaces.add(base_interface); 230 236 // 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"); 233 244 } 234 245 return true; 235 246 } 236 247 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"); 239 250 if (option_list != null) { 240 251 System.err.println("found an option list");
Note:
See TracChangeset
for help on using the changeset viewer.