- Timestamp:
- 2006-10-27T15:07:14+13:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/greenstone
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/greenstone/Classifiers.java
r13175 r13176 129 129 // Run classifierfo.pl to get the list of classifiers 130 130 try { 131 String Bufferxml = null;131 String classinfo_xml = null; 132 132 if (Gatherer.isGsdlRemote) { 133 133 String classinfo_options = "&classifier=" + classifier; … … 135 135 classinfo_options += "&collection=" + collection_name; 136 136 } 137 String classinfo_output = RemoteGreenstoneServer.getScriptOptions("classinfo.pl", classinfo_options); 138 xml = new StringBuffer(classinfo_output); 137 classinfo_xml = RemoteGreenstoneServer.getScriptOptions("classinfo.pl", classinfo_options); 139 138 } 140 139 else { … … 158 157 Process process = runtime.exec((String[]) args.toArray(new String[] { })); 159 158 InputStream input_stream = process.getErrorStream(); 160 xml = XMLTools.readXMLStream(input_stream); 159 StringBuffer classinfo_xml_buffer = XMLTools.readXMLStream(input_stream); 160 if (classinfo_xml_buffer != null) { 161 classinfo_xml = classinfo_xml_buffer.toString(); 162 } 161 163 } 162 164 163 165 // Check the XML output was obtained successfully 164 if ( xml == null ||xml.length() == 0) {166 if (classinfo_xml == null || classinfo_xml.length() == 0) { 165 167 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.ClassifierManager.Classifier_XML_Parse_Failed", classifier.getName()), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 166 168 return; 167 169 } 168 170 169 parseClassifierInfoXML(classifier, xml.toString());171 parseClassifierInfoXML(classifier, classinfo_xml); 170 172 } 171 173 catch (Exception exception) { -
trunk/gli/src/org/greenstone/gatherer/greenstone/Plugins.java
r13175 r13176 130 130 // Run pluginfo.pl to get the list of plugins 131 131 try { 132 String Bufferxml = null;132 String pluginfo_xml = null; 133 133 if (Gatherer.isGsdlRemote) { 134 134 String pluginfo_options = "&plugin=" + plugin; … … 136 136 pluginfo_options += "&collection=" + collection_name; 137 137 } 138 String pluginfo_output = RemoteGreenstoneServer.getScriptOptions("pluginfo.pl", pluginfo_options); 139 xml = new StringBuffer(pluginfo_output); 138 pluginfo_xml = RemoteGreenstoneServer.getScriptOptions("pluginfo.pl", pluginfo_options); 140 139 } 141 140 else { … … 159 158 Process process = runtime.exec((String[]) args.toArray(new String[] { })); 160 159 InputStream input_stream = process.getErrorStream(); 161 xml = XMLTools.readXMLStream(input_stream); 160 StringBuffer pluginfo_xml_buffer = XMLTools.readXMLStream(input_stream); 161 if (pluginfo_xml_buffer != null) { 162 pluginfo_xml = pluginfo_xml_buffer.toString(); 163 } 162 164 } 163 165 164 166 // Check the XML output was obtained successfully 165 if ( xml == null ||xml.length() == 0) {167 if (pluginfo_xml == null || pluginfo_xml.length() == 0) { 166 168 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.PlugInManager.PlugIn_XML_Parse_Failed", plugin.getName()), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 167 169 return; 168 170 } 169 171 170 parsePluginInfoXML(plugin, xml.toString());172 parsePluginInfoXML(plugin, pluginfo_xml); 171 173 } 172 174 catch (Exception exception) {
Note:
See TracChangeset
for help on using the changeset viewer.