Changeset 13464


Ignore:
Timestamp:
2006-12-08T12:10:46+13:00 (17 years ago)
Author:
mdewsnip
Message:

More progress on getting the exploding working with remote building.

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

Legend:

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

    r13460 r13464  
    4545import org.greenstone.gatherer.cdm.CollectionDesignManager;
    4646import org.greenstone.gatherer.cdm.Plugin;
     47import org.greenstone.gatherer.collection.CollectionManager;
    4748import org.greenstone.gatherer.collection.ScriptOptions;
    4849import org.greenstone.gatherer.gui.tree.DragTree;
     
    5253import org.greenstone.gatherer.metadata.MetadataSetManager;
    5354import org.greenstone.gatherer.metadata.MetadataTools;
     55import org.greenstone.gatherer.remote.RemoteGreenstoneServer;
    5456import org.greenstone.gatherer.shell.GShell;
    5557import org.greenstone.gatherer.shell.GShellEvent;
     
    261263    }
    262264
    263     // Add in the filename
    264     command_parts_list.add(metadata_file.getPath());
     265    // Local case
     266    if (!Gatherer.isGsdlRemote) {
     267        // Add in the filename
     268        command_parts_list.add(metadata_file.getPath());
     269    }
     270    // Remote case
     271    else {
     272        // Add in the filename, relative to the collection directory
     273        String collection_name = Gatherer.c_man.getCollection().getName();
     274        String collection_directory_path = CollectionManager.getCollectionDirectoryPath(collection_name);
     275        String metadata_file_relative_path = RemoteGreenstoneServer.getPathRelativeToDirectory(metadata_file, collection_directory_path);
     276        command_parts_list.add("-file");
     277        command_parts_list.add(metadata_file_relative_path);
     278
     279        // When running remotely we also need the collection name as the last argument
     280        command_parts_list.add(collection_name);
     281    }
    265282
    266283    // Run the explode_metadata_database.pl command
  • trunk/gli/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java

    r13328 r13464  
    11351135
    11361136
    1137     static private String getPathRelativeToDirectory(File file, String directory_path)
     1137    static public String getPathRelativeToDirectory(File file, String directory_path)
    11381138    {
    11391139    String file_path = file.getAbsolutePath();
Note: See TracChangeset for help on using the changeset viewer.