Ignore:
Timestamp:
2009-05-29T12:37:08+12:00 (15 years ago)
Author:
ak19
Message:

Not working. Changes made for collectiongroup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/branches/glicolgroup/src/org/greenstone/gatherer/collection/CollectionManager.java

    r19430 r19668  
    398398    // Remove the lock file on the server
    399399    if (Gatherer.isGsdlRemote) {
    400         Gatherer.remoteGreenstoneServer.deleteCollectionFile(collection.getName(), lock_file);
     400        Gatherer.remoteGreenstoneServer.deleteCollectionFile(collection.getGroupQualifiedName(true), lock_file);
    401401    }
    402402
     
    572572
    573573        // for remote case, scheduling causes an Exception on creating a new collection that
    574         // can't be recovered from. For GS3, it doesn't work since it it trying to access etc/main.cfg
     574        // can't be recovered from. For GS3, it doesn't work since it is trying to access etc/main.cfg
    575575        if (canDoScheduling()) {
    576576        scheduling();
     
    583583        // Import default metadata sets, if any
    584584        // for (int i = 0; metadata_sets != null && i < metadata_sets.size(); i++) {
    585         // importMetadataSet((MetadataSet) metadata_sets.get(i));
     585        // importMetadataSet((MetadataSecollection_namet) metadata_sets.get(i));
    586586        // }
    587587
     
    11061106        // If we're using a remote Greenstone server, upload the metadata file
    11071107        if (Gatherer.isGsdlRemote) {
    1108             Gatherer.remoteGreenstoneServer.uploadCollectionFile(collection.getName(), metadata_set_file);
     1108            Gatherer.remoteGreenstoneServer.uploadCollectionFile(collection.getGroupQualifiedName(true), metadata_set_file);
    11091109        }
    11101110        }
     
    11691169    {
    11701170    DebugStream.println("Loading collection " + location + "...");
     1171    System.err.println("*** Loading collection " + location + "...");
    11711172
    11721173    if (Gatherer.isGsdlRemote) {
    1173         String collection_name = location.substring(location.lastIndexOf(File.separator) + 1, location.length() - ".col".length());
     1174        //String collection_name = location.substring(location.lastIndexOf(File.separator) + 1, location.length() - ".col".length());
     1175        String collection_name = location.substring(0, location.lastIndexOf(File.separator));
     1176        collection_name = Gatherer.remoteGreenstoneServer.getPathRelativeToDirectory(new File(collection_name), getDefaultCollectDirectory());
    11741177        if (Gatherer.remoteGreenstoneServer.downloadCollection(collection_name).equals("")) {
    11751178        return;
     
    16701673        // If we're using a remote Greenstone server, delete the metadata file on the server
    16711674        if (Gatherer.isGsdlRemote) {
    1672         Gatherer.remoteGreenstoneServer.deleteCollectionFile(collection.getName(), metadata_set_file);
     1675        Gatherer.remoteGreenstoneServer.deleteCollectionFile(collection.getGroupQualifiedName(true), metadata_set_file);
    16731676        }
    16741677    }
     
    18061809        if (Gatherer.isGsdlRemote) {
    18071810            Gatherer.remoteGreenstoneServer.deleteCollectionFile(
    1808                              collection.getName(), new File(getLoadedCollectionIndexDirectoryPath()));
    1809             Gatherer.remoteGreenstoneServer.moveCollectionFile(collection.getName(),
     1811                             collection.getGroupQualifiedName(true), new File(getLoadedCollectionIndexDirectoryPath()));
     1812            Gatherer.remoteGreenstoneServer.moveCollectionFile(collection.getGroupQualifiedName(true),
    18101813                    new File(getLoadedCollectionBuildingDirectoryPath()), new File(getLoadedCollectionIndexDirectoryPath()));
    18111814        }
Note: See TracChangeset for help on using the changeset viewer.