Ignore:
Timestamp:
2010-07-15T22:10:59+12:00 (14 years ago)
Author:
ak19
Message:

Getting collectgroup to work for a remote Greenstone server. Need to update gliserver.pl still to work with the collectgroup changes. 1. GLI side changes: no longer does the collectdir parameter to import and build include the colgroup at the end, it is now back to being everything upto the GS collect dir. Instead, the loaded collection is colgroup/subcolname. 2. Changed CollectionManager.getLoadedCollectionName() to return (colgroup/)subcolname instead of the subcolname excluding groupname. 3. This required changes in other classes, including replacing unnecessary explicit calls to getLoadedGroupQualifiedCollectionName(). 4. Added another variant: getLoadedCollectionName(boolean). If the parameter is true, it will put a url style slash between colgroup and subcolname, otherwise use the OS dependent FileSeparator. 5. Changes to RemoteGreenstoneServer to pass the group/subcol as the collectionname to gliserver.pl, with a vertical bar separator. 6. Minor changes like: WorkspaceTreeNode now knows not to load a collection group if it's already in the loaded collection (previously handed only sub collection name), removed old debugging statements and unused import statements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/file/FileManager.java

    r19239 r22410  
    171171        file_queue.addJob(id, source, source_nodes, target, target_node, type);
    172172        if (Gatherer.isGsdlRemote) {
    173             String collection_name = CollectionManager.getLoadedGroupQualifiedCollectionName(true);
     173            String collection_name = CollectionManager.getLoadedCollectionName();
    174174
    175175            // Perform the appropriate action based on the job type (RemoteGreenstoneServer will queue)
     
    274274        if (file.getAbsolutePath().startsWith(Gatherer.getCollectDirectoryPath()) && file.length() == 0) {
    275275            if (Gatherer.remoteGreenstoneServer.downloadCollectionFile(
    276                                  CollectionManager.getLoadedGroupQualifiedCollectionName(true), file).equals("")) {
     276                                 CollectionManager.getLoadedCollectionName(), file).equals("")) {
    277277            // Something has gone wrong downloading the file
    278278            return;
     
    350350                if (Gatherer.isGsdlRemote) {
    351351                Gatherer.remoteGreenstoneServer.uploadCollectionFile(
    352                                          CollectionManager.getLoadedGroupQualifiedCollectionName(true), folder_file);
     352                                         CollectionManager.getLoadedCollectionName(), folder_file);
    353353                }
    354354            }
     
    357357                if (Gatherer.isGsdlRemote) {
    358358                Gatherer.remoteGreenstoneServer.newCollectionDirectory(
    359                                          CollectionManager.getLoadedGroupQualifiedCollectionName(true), folder_file);
     359                                         CollectionManager.getLoadedCollectionName(), folder_file);
    360360                }
    361361            }
     
    418418        if (Gatherer.isGsdlRemote) {
    419419            Gatherer.remoteGreenstoneServer.moveCollectionFile(
    420                              CollectionManager.getLoadedGroupQualifiedCollectionName(true), collection_file, new_collection_file);
     420                             CollectionManager.getLoadedCollectionName(), collection_file, new_collection_file);
    421421        }
    422422        }
     
    467467        file_queue.addJob(System.currentTimeMillis(), Gatherer.g_man.gather_pane.workspace_tree, new FileNode[] { source_node }, collection_tree, (FileNode)collection_tree_node.getParent(),  FileJob.COPY_FILE_ONLY);
    468468        if (Gatherer.isGsdlRemote) {
    469         String collection_name = CollectionManager.getLoadedGroupQualifiedCollectionName(true);
     469        String collection_name = CollectionManager.getLoadedCollectionName();
    470470        Gatherer.remoteGreenstoneServer.deleteCollectionFile(collection_name, collection_tree_node.getFile());
    471471        Gatherer.remoteGreenstoneServer.uploadFilesIntoCollection(collection_name, new File[] { new_file }, target_directory);
Note: See TracChangeset for help on using the changeset viewer.