Changeset 18356
- Timestamp:
- 2009-01-12T11:18:06+13:00 (15 years ago)
- Location:
- gli/branches/rtl-gli/src/org/greenstone/gatherer/greenstone
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/branches/rtl-gli/src/org/greenstone/gatherer/greenstone/Classifiers.java
r13594 r18356 134 134 classinfo_options += "&collection=" + collection_name; 135 135 } 136 classinfo_xml = RemoteGreenstoneServer.getScriptOptions("classinfo.pl", classinfo_options);136 classinfo_xml = Gatherer.remoteGreenstoneServer.getScriptOptions("classinfo.pl", classinfo_options); 137 137 } 138 138 else { … … 195 195 classinfo_options += "&collection=" + collection_name; 196 196 } 197 String classinfo_output = RemoteGreenstoneServer.getScriptOptions("classinfo.pl", classinfo_options);197 String classinfo_output = Gatherer.remoteGreenstoneServer.getScriptOptions("classinfo.pl", classinfo_options); 198 198 xml = new StringBuffer(classinfo_output); 199 199 } -
gli/branches/rtl-gli/src/org/greenstone/gatherer/greenstone/LocalLibraryServer.java
r13792 r18356 139 139 140 140 // Configure the server for immediate entry 141 gsdlsite_cfg_file.set();141 //gsdlsite_cfg_file.set(); 142 142 143 143 // Spawn local library server process … … 286 286 public GSDLSiteConfig(File server_exe) { 287 287 debug("New GSDLSiteConfig for: " + server_exe.getAbsolutePath()); 288 288 289 gsdlsite_cfg = new File(server_exe.getParentFile(), GSDLSITE_CFG); 289 290 glisite_cfg = new File(server_exe.getParentFile(), GLISITE_CFG); 291 292 File configFile = null; 293 if(glisite_cfg.exists()) { 294 configFile = glisite_cfg; 295 } else if(gsdlsite_cfg.exists()) { 296 configFile = gsdlsite_cfg; 297 } else { 298 debug("Neither the file glisite.cfg nor GSDLsite.cfg can be found!"); 299 } 300 290 301 autoenter_initial = null; 291 302 start_browser_initial = null; 292 if( gsdlsite_cfg.exists()) {293 debug("Load: " + gsdlsite_cfg.getAbsolutePath());303 if(configFile != null) { 304 debug("Load: " + configFile.getAbsolutePath()); 294 305 clear(); 295 306 try { 296 BufferedReader in = new BufferedReader(new FileReader( gsdlsite_cfg));307 BufferedReader in = new BufferedReader(new FileReader(configFile)); 297 308 String line = null; 298 309 while((line = in.readLine()) != null) { … … 315 326 } 316 327 } 317 else { 318 debug("No GSDLsite.cfg file can be found!"); 319 } 320 } 321 328 } 329 322 330 public boolean exists() { 323 331 return gsdlsite_cfg.exists(); … … 402 410 } 403 411 else { 404 debug("No GSDLsite.cfg file can be found!");412 debug("No glisite.cfg file can be found!"); 405 413 } 406 414 } -
gli/branches/rtl-gli/src/org/greenstone/gatherer/greenstone/Plugins.java
r13594 r18356 83 83 // If we've found the plugin, load its arguments now, if required 84 84 if (plugin != null && arguments_required) { 85 if ( plugin.getArguments().size() == 0 && plugin.didLoadingOptionsFail() == false) {85 if (!plugin.hasLoadedOptions()) { 86 86 loadPluginInfo(plugin, collection_specific); 87 87 } … … 135 135 pluginfo_options += "&collection=" + collection_name; 136 136 } 137 pluginfo_xml = RemoteGreenstoneServer.getScriptOptions("pluginfo.pl", pluginfo_options);137 pluginfo_xml = Gatherer.remoteGreenstoneServer.getScriptOptions("pluginfo.pl", pluginfo_options); 138 138 } 139 139 else { … … 165 165 // Check the XML output was obtained successfully 166 166 if (pluginfo_xml == null || pluginfo_xml.length() == 0) { 167 plugin.set LoadingOptionsFailed();167 plugin.setHasLoadedOptions(false); // failure to load options 168 168 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.PlugInManager.PlugIn_XML_Parse_Failed", plugin.getName()), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 169 169 return; 170 } else { 171 plugin.setHasLoadedOptions(true); 170 172 } 171 173 … … 196 198 pluginfo_options += "&collection=" + collection_name; 197 199 } 198 String pluginfo_output = RemoteGreenstoneServer.getScriptOptions("pluginfo.pl", pluginfo_options);200 String pluginfo_output = Gatherer.remoteGreenstoneServer.getScriptOptions("pluginfo.pl", pluginfo_options); 199 201 xml = new StringBuffer(pluginfo_output); 200 202 } … … 243 245 Document document = XMLTools.parseXML(new StringReader(xml)); 244 246 if (document == null) { 245 plugin.set LoadingOptionsFailed();247 plugin.setHasLoadedOptions(false); // failure to load the options/failed plugin 246 248 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.PlugInManager.PlugIn_XML_Parse_Failed", plugin.getName()), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 247 249 return; 250 } else { 251 plugin.setHasLoadedOptions(true); 248 252 } 249 253 … … 268 272 else if (node_name.equalsIgnoreCase("Explodes")) { 269 273 plugin.setDoesExplodeMetadataDatabases(XMLTools.getValue(node).equalsIgnoreCase(StaticStrings.YES_STR)); 274 } 275 else if (node_name.equalsIgnoreCase("SourceReplaceable")) { // looking for <SourceReplaceable> tag 276 plugin.setDoesReplaceSrcDocsWithHtml(XMLTools.getValue(node).equalsIgnoreCase(StaticStrings.YES_STR)); 270 277 } 271 278 else if (node_name.equalsIgnoreCase("Processes")) {
Note:
See TracChangeset
for help on using the changeset viewer.