Changeset 19668
- Timestamp:
- 2009-05-29T12:37:08+12:00 (14 years ago)
- Location:
- gli/branches/glicolgroup/src/org/greenstone/gatherer
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/branches/glicolgroup/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
r18686 r19668 3697 3697 3698 3698 // If we're using the Local Library we must release the collection before writing to the collect.cfg file 3699 String collection_name = Gatherer.c_man.getCollection ().getName ();3699 String collection_name = Gatherer.c_man.getCollection().getGroupQualifiedName(true); 3700 3700 boolean collection_released = false; 3701 3701 if (Gatherer.c_man.built () && LocalLibraryServer.isRunning () == true) { … … 3786 3786 3787 3787 // If we're using the Local Library we must release the collection before writing to the collect.cfg file 3788 String collection_name = CollectionManager.getLoaded CollectionName ();3788 String collection_name = CollectionManager.getLoadedGroupQualifiedCollectionName(true); 3789 3789 boolean collection_released = false; 3790 3790 if (Gatherer.c_man.built () && LocalLibraryServer.isRunning () == true) { -
gli/branches/glicolgroup/src/org/greenstone/gatherer/cdm/GeneralManager.java
r19225 r19668 369 369 if (Gatherer.isGsdlRemote) { 370 370 Gatherer.remoteGreenstoneServer.uploadCollectionFile( 371 CollectionManager.getLoaded CollectionName(), collection_image_file);371 CollectionManager.getLoadedGroupQualifiedCollectionName(true), collection_image_file); 372 372 } 373 373 } -
gli/branches/glicolgroup/src/org/greenstone/gatherer/cdm/MacrosManager.java
r18412 r19668 221 221 // Users need to wait until the upload has finished before pressing Preview Collection! 222 222 if (Gatherer.isGsdlRemote) { 223 Gatherer.remoteGreenstoneServer.uploadCollectionFile(CollectionManager.getLoaded CollectionName(), extra_dm_file);223 Gatherer.remoteGreenstoneServer.uploadCollectionFile(CollectionManager.getLoadedGroupQualifiedCollectionName(true), extra_dm_file); 224 224 } 225 225 } -
gli/branches/glicolgroup/src/org/greenstone/gatherer/collection/BasicCollectionConfiguration.java
r19220 r19668 257 257 258 258 } 259 260 /** This current file is in .../<col_name>/etc/collect.cfg. This method returns .../<col_name> 261 * @return the short name of this collection as a String 262 */ 263 public String getCollectionPath() { 264 return file.getParentFile().getParentFile().getAbsolutePath(); 265 } 266 259 267 260 268 /** set the site for this coll */ -
gli/branches/glicolgroup/src/org/greenstone/gatherer/collection/CollectionManager.java
r19430 r19668 398 398 // Remove the lock file on the server 399 399 if (Gatherer.isGsdlRemote) { 400 Gatherer.remoteGreenstoneServer.deleteCollectionFile(collection.get Name(), lock_file);400 Gatherer.remoteGreenstoneServer.deleteCollectionFile(collection.getGroupQualifiedName(true), lock_file); 401 401 } 402 402 … … 572 572 573 573 // 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 i ttrying to access etc/main.cfg574 // can't be recovered from. For GS3, it doesn't work since it is trying to access etc/main.cfg 575 575 if (canDoScheduling()) { 576 576 scheduling(); … … 583 583 // Import default metadata sets, if any 584 584 // for (int i = 0; metadata_sets != null && i < metadata_sets.size(); i++) { 585 // importMetadataSet((MetadataSe t) metadata_sets.get(i));585 // importMetadataSet((MetadataSecollection_namet) metadata_sets.get(i)); 586 586 // } 587 587 … … 1106 1106 // If we're using a remote Greenstone server, upload the metadata file 1107 1107 if (Gatherer.isGsdlRemote) { 1108 Gatherer.remoteGreenstoneServer.uploadCollectionFile(collection.get Name(), metadata_set_file);1108 Gatherer.remoteGreenstoneServer.uploadCollectionFile(collection.getGroupQualifiedName(true), metadata_set_file); 1109 1109 } 1110 1110 } … … 1169 1169 { 1170 1170 DebugStream.println("Loading collection " + location + "..."); 1171 System.err.println("*** Loading collection " + location + "..."); 1171 1172 1172 1173 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()); 1174 1177 if (Gatherer.remoteGreenstoneServer.downloadCollection(collection_name).equals("")) { 1175 1178 return; … … 1670 1673 // If we're using a remote Greenstone server, delete the metadata file on the server 1671 1674 if (Gatherer.isGsdlRemote) { 1672 Gatherer.remoteGreenstoneServer.deleteCollectionFile(collection.get Name(), metadata_set_file);1675 Gatherer.remoteGreenstoneServer.deleteCollectionFile(collection.getGroupQualifiedName(true), metadata_set_file); 1673 1676 } 1674 1677 } … … 1806 1809 if (Gatherer.isGsdlRemote) { 1807 1810 Gatherer.remoteGreenstoneServer.deleteCollectionFile( 1808 collection.get Name(), new File(getLoadedCollectionIndexDirectoryPath()));1809 Gatherer.remoteGreenstoneServer.moveCollectionFile(collection.get Name(),1811 collection.getGroupQualifiedName(true), new File(getLoadedCollectionIndexDirectoryPath())); 1812 Gatherer.remoteGreenstoneServer.moveCollectionFile(collection.getGroupQualifiedName(true), 1810 1813 new File(getLoadedCollectionBuildingDirectoryPath()), new File(getLoadedCollectionIndexDirectoryPath())); 1811 1814 } -
gli/branches/glicolgroup/src/org/greenstone/gatherer/greenstone/LocalLibraryServer.java
r19585 r19668 378 378 * in an independently launched GSI (one not launched by GLI). */ 379 379 static public boolean isURLPending() { 380 /*if(Configuration.library_url != null) {381 System.err.println("**** Configuration.library_url: " + Configuration.library_url );382 return false; // don't need to do anything as we already have the url383 }*/384 380 385 381 llssite_cfg_file.load(true); // don't force reload, load only if modified … … 426 422 Configuration.library_url = new URL(url); 427 423 running = true; 424 // Run the server interface 425 //Gatherer.spawnApplication(local_library_server_command, ID); 428 426 } 429 427 catch (MalformedURLException exception) { -
gli/branches/glicolgroup/src/org/greenstone/gatherer/gui/DeleteCollectionPrompt.java
r19272 r19668 293 293 details.setCaretPosition(0); 294 294 } else { // trying to delete the collection that is open at present 295 // add a tooltip sayingto the confirmation checkbox saying that the current collection can't be deleted295 // add a tooltip to the confirmation checkbox saying that the current collection can't be deleted 296 296 String tooltip = Dictionary.get("DeleteCollectionPrompt.Cannot_Delete_Open_Collection_Tooltip", 297 297 collection.getName()); -
gli/branches/glicolgroup/src/org/greenstone/gatherer/gui/ExplodeMetadataDatabasePrompt.java
r18917 r19668 356 356 Utility.delete(metadata_file.getParentFile()); 357 357 Gatherer.remoteGreenstoneServer.downloadCollectionFile( 358 CollectionManager.getLoaded CollectionName(), metadata_file.getParentFile());358 CollectionManager.getLoadedGroupQualifiedCollectionName(true), metadata_file.getParentFile()); 359 359 } 360 360 -
gli/branches/glicolgroup/src/org/greenstone/gatherer/gui/Preferences.java
r19438 r19668 1032 1032 if (Gatherer.c_man.getCollection()!=null){ 1033 1033 File lock_file = new File(Gatherer.c_man.getLoadedCollectionDirectoryPath() + "gli.lck"); 1034 Gatherer.remoteGreenstoneServer.deleteCollectionFile(Gatherer.c_man.getLoaded CollectionName(),lock_file);1034 Gatherer.remoteGreenstoneServer.deleteCollectionFile(Gatherer.c_man.getLoadedGroupQualifiedCollectionName(true),lock_file); 1035 1035 Gatherer.g_man.closeCurrentCollection(); 1036 1036 } -
gli/branches/glicolgroup/src/org/greenstone/gatherer/gui/ReplaceSrcDocWithHtmlPrompt.java
r18645 r19668 394 394 // into the import directory on the client side 395 395 Gatherer.remoteGreenstoneServer.downloadCollectionFile( 396 CollectionManager.getLoaded CollectionName(),396 CollectionManager.getLoadedGroupQualifiedCollectionName(true), 397 397 new File(srcdoc_files[i].getParentFile(), htmlFile)); 398 398 … … 401 401 402 402 // If an associated_folder by such a name exists, download it 403 if(Gatherer.remoteGreenstoneServer.exists(CollectionManager.getLoaded CollectionName(), assoc_folder)) {403 if(Gatherer.remoteGreenstoneServer.exists(CollectionManager.getLoadedGroupQualifiedCollectionName(true), assoc_folder)) { 404 404 Gatherer.remoteGreenstoneServer.downloadCollectionFile( 405 CollectionManager.getLoaded CollectionName(), assoc_folder);405 CollectionManager.getLoadedGroupQualifiedCollectionName(true), assoc_folder); 406 406 } 407 407 } -
gli/branches/glicolgroup/src/org/greenstone/gatherer/metadata/MetadataXMLFileManager.java
r17612 r19668 369 369 // Upload the files modified since last time, then reset the list 370 370 Gatherer.remoteGreenstoneServer.uploadCollectionFiles( 371 CollectionManager.getLoaded CollectionName(), (File[]) modified_metadata_xml_files.toArray(new File[0]));371 CollectionManager.getLoadedGroupQualifiedCollectionName(true), (File[]) modified_metadata_xml_files.toArray(new File[0])); 372 372 modified_metadata_xml_files.clear(); 373 373 } -
gli/branches/glicolgroup/src/org/greenstone/gatherer/metadata/ProfileXMLFile.java
r17612 r19668 110 110 // This is inefficient but for simplicity we'll just upload the file every time it is changed 111 111 if (Gatherer.isGsdlRemote) { 112 Gatherer.remoteGreenstoneServer.uploadCollectionFile(CollectionManager.getLoaded CollectionName(), this);112 Gatherer.remoteGreenstoneServer.uploadCollectionFile(CollectionManager.getLoadedGroupQualifiedCollectionName(true), this); 113 113 } 114 114 -
gli/branches/glicolgroup/src/org/greenstone/gatherer/remote/RemoteGreenstoneServerAction.java
r19231 r19668 109 109 public DeleteCollectionAction(String collection_name) 110 110 { 111 this.collection_name = collection_name; 111 this.collection_name = collection_name; //.replace('/', File.separatorChar); // if colgroup contained url slashes 112 112 } 113 113 … … 137 137 public DeleteCollectionFileAction(String collection_name, File collection_file) 138 138 { 139 this.collection_name = collection_name; 139 this.collection_name = collection_name; //.replace('/', File.separatorChar); // if colgroup contained url slashes 140 140 this.collection_file = collection_file; 141 141 } … … 146 146 String collection_directory_path = CollectionManager.getCollectionDirectoryPath(collection_name); 147 147 String collection_file_relative_path = remote.getPathRelativeToDirectory(collection_file, collection_directory_path); 148 System.err.println("**** DeleteCollectionFile.\n\tcol_file: "+collection_file + "\n\t" + collection_directory_path); 149 148 150 collection_file_relative_path = collection_file_relative_path.replaceAll((Utility.isWindows() ? "\\\\" : "\\/"), "|"); 149 151 progress_bar.setAction("Deleting collection file " + collection_file_relative_path + "..."); … … 176 178 { 177 179 progress_bar.setAction("Downloading remote collection " + collection_name + "..."); 180 System.err.println("*** RGSAction.DownloadCollectionAction, col_name: " + collection_name); 178 181 179 182 String download_collection_command = "cmd=download-collection"; … … 613 616 public UploadFilesIntoCollectionAction(String collection_name, File[] source_files, File target_collection_directory) 614 617 { 615 this.collection_name = collection_name; 618 this.collection_name = collection_name; //.replace('/', File.separatorChar); // if colgroup contained url slashes 616 619 this.source_files = source_files; 617 620 this.target_collection_directory = target_collection_directory;
Note:
See TracChangeset
for help on using the changeset viewer.