Changeset 13705


Ignore:
Timestamp:
2007-01-19T16:03:51+13:00 (17 years ago)
Author:
mdewsnip
Message:

Changed the "uploadModifiedMetadataXMLFiles" function to "saveMetadataXMLFiles", as it is soon to do a little more than the remote greenstone stuff.

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

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/EnrichPane.java

    r12145 r13705  
    193193    metadata_value_table_pane.stopEditingAndRebuild(file_nodes);
    194194
    195     // Upload the modified metadata.xml files to the server now, if we're using one
    196     MetadataXMLFileManager.uploadModifiedMetadataXMLFiles();
     195    // Make sure all the metadata has been saved to file
     196    MetadataXMLFileManager.saveMetadataXMLFiles();
    197197
    198198    // Remove the collection tree and filter from this pane so it can be added to the Gather pane
  • trunk/gli/src/org/greenstone/gatherer/metadata/MetadataXMLFileManager.java

    r13586 r13705  
    353353
    354354
     355    /** Ensures that all the metadata is written to metadata.xml files. */
     356    static public void saveMetadataXMLFiles()
     357    {
     358    // If the collection is stored on a remote server, upload all the modified files now
     359    if (Gatherer.isGsdlRemote) {
     360        if (modified_metadata_xml_files.isEmpty()) {
     361        DebugStream.println("No modified metadata.xml files to upload.");
     362        return;
     363        }
     364
     365        // Upload the files modified since last time, then reset the list
     366        RemoteGreenstoneServer.uploadCollectionFiles(CollectionManager.getLoadedCollectionName(), (File[]) modified_metadata_xml_files.toArray(new File[0]));
     367        modified_metadata_xml_files.clear();
     368    }
     369    }
     370
     371
    355372    static public void unloadMetadataXMLFile(File metadata_xml_file_file)
    356373    {
     
    366383    }
    367384    }
    368 
    369 
    370     static public void uploadModifiedMetadataXMLFiles()
    371     {
    372     // This is only necessary when the collection is stored on a remote server
    373     if (Gatherer.isGsdlRemote) {
    374         if (modified_metadata_xml_files.isEmpty()) {
    375         DebugStream.println("No modified metadata.xml files to upload.");
    376         return;
    377         }
    378 
    379         // Upload the files modified since last time, then reset the list
    380         RemoteGreenstoneServer.uploadCollectionFiles(CollectionManager.getLoadedCollectionName(), (File[]) modified_metadata_xml_files.toArray(new File[0]));
    381         modified_metadata_xml_files.clear();
    382     }
    383     }
    384385}
Note: See TracChangeset for help on using the changeset viewer.