Changeset 12620


Ignore:
Timestamp:
2006-08-30T16:59:00+12:00 (18 years ago)
Author:
mdewsnip
Message:

Removed the unnecessary CollectionDesignManager.XMLStringToDOM() function.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
4 edited

Legend:

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

    r12249 r12620  
    335335
    336336        if (xml.length() > 0) {
    337         document = CollectionDesignManager.XMLStringToDOM(xml, classifier);
     337        document = XMLTools.parseXML(new StringReader(xml.toString()));
    338338        }
    339339        else {
     
    426426    private void loadClassifiers(StringBuffer xml)
    427427    {
    428     Document document = CollectionDesignManager.XMLStringToDOM(xml, "-listall");
     428    Document document = XMLTools.parseXML(new StringReader(xml.toString()));
    429429
    430430    // Parse XML to build up list of classifier names
  • trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java

    r12140 r12620  
    229229
    230230
    231     static public Document XMLStringToDOM(StringBuffer xml, String form)
    232     {
    233     Document document = null;
    234 
    235     try {
    236         // Read the xml from the piped input stream.
    237         StringReader xml_sr = new StringReader(xml.toString());
    238         InputSource source = new InputSource(xml_sr);
    239         DOMParser parser = new DOMParser();
    240         parser.parse(source);
    241         document = parser.getDocument();
    242     }
    243     catch (Exception error) {
    244         System.err.println("Failed when trying to parse XML stream ");
    245         error.printStackTrace();
    246     }
    247 
    248     return document;
    249     }
    250 
    251231    public static int getRebuildTypeRequired() {
    252232    return rebuildTypeRequired;
  • trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java

    r12303 r12620  
    475475
    476476        if (xml.length() > 0) {
    477         document = CollectionDesignManager.XMLStringToDOM(xml, plugin);
     477        document = XMLTools.parseXML(new StringReader(xml.toString()));
    478478        }
    479479        else {
     
    572572    private void loadPlugins(StringBuffer xml)
    573573    {
    574     Document document = CollectionDesignManager.XMLStringToDOM(xml, "-listall");
     574    Document document = XMLTools.parseXML(new StringReader(xml.toString()));
    575575
    576576    // Parse XML to build up list of plugin names
  • trunk/gli/src/org/greenstone/gatherer/gui/DownloadPane.java

    r12529 r12620  
    270270        }
    271271
    272         StringBuffer xml = Utility.readXMLStream(input_stream);
    273             document = CollectionDesignManager.XMLStringToDOM(xml,download_name);
     272            document = XMLTools.parseXML(input_stream);
    274273    }
    275274    catch (Exception error) {
Note: See TracChangeset for help on using the changeset viewer.