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/WorkspaceTreeNode.java

    r19235 r22410  
    168168             
    169169              // One last piece of magic so we can determine the current collection
    170               // I don't think this will work properly with groups,
    171               // as it may give a false positive??
    172               collection_root.is_in_loaded_collection = cols[i].getName().equals(CollectionManager.getLoadedCollectionName());
     170              // Now made to work with collection groups
     171              String groupQualifiedColName = cols[i].getName();
     172              if(is_group_node) { // then title would have stored the colgroup name
     173                  groupQualifiedColName = title + File.separator + cols[i].getName();
     174              }
     175              collection_root.is_in_loaded_collection = groupQualifiedColName.equals(CollectionManager.getLoadedCollectionName());
    173176              child_nodes.add(collection_root);
    174177            }
Note: See TracChangeset for help on using the changeset viewer.