Ignore:
Timestamp:
2005-08-28T16:58:35+12:00 (19 years ago)
Author:
mdewsnip
Message:

Rearranged a few things when using classinfo.pl and pluginfo.pl, to make this easier when using a remote Greenstone server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java

    r10556 r10576  
    309309    // Run classinfo on this classifier, and then send the results for parsing.
    310310    try {
     311        StringBuffer xml = null;
    311312        if (Gatherer.isGsdlRemote) {
    312313        String launch  = Gatherer.cgiBase + "launch";
     
    320321        URLConnection launch_connection = launch_url.openConnection();
    321322        input_stream = launch_connection.getInputStream();
     323        xml = Utility.readXMLStream(input_stream);
    322324        }
    323325        else {
     
    351353
    352354        input_stream = process.getErrorStream();
    353         }
    354 
    355         StringBuffer xml = Utility.readXMLStream(input_stream);
     355        xml = Utility.readXMLStream(input_stream);
     356        }
     357
    356358        document = CollectionDesignManager.XMLStringToDOM(xml,classifier);
    357359    }
     
    398400            URLConnection launch_connection = launch_url.openConnection();
    399401            InputStream input_stream = launch_connection.getInputStream();
    400             loadClassifiers(input_stream);
     402            StringBuffer xml = Utility.readXMLStream(input_stream);
     403            loadClassifiers(xml);
    401404        }
    402405        catch (Exception error) {
     
    437440     * @param input_stream An <strong>InputStream</strong> indicating the where list of classifiers -- encoded in XML -- can be read from
    438441     */
    439     private void loadClassifiers(InputStream input_stream)
     442    private void loadClassifiers(StringBuffer xml)
    440443    {
    441     StringBuffer xml  = Utility.readXMLStream(input_stream);
    442444    Document document = CollectionDesignManager.XMLStringToDOM(xml, "-listall");
    443445
Note: See TracChangeset for help on using the changeset viewer.