- Timestamp:
- 2020-07-23T18:33:28+12:00 (4 years ago)
- Location:
- main/trunk/gli
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/classes/dictionary.properties
r34283 r34285 536 536 MetaToCSV.ExportAction:Export 537 537 MetaToCSV.ConvertAction:Convert 538 MetaToCSV.CSVFileExtensionType:CSV spreadsheet file (*.csv) 538 539 MetaToCSV.ChooseMetaCSVFile:{0} metadata from GLI to a new CSV file or add to existing 539 540 MetaToCSV.ConvertMetaXMLToCSV_Warning_Message:Warning, this will remove all metadata from GLI (metadata.xml files) after exporting to CSV.\nThis means you will no longer be able to edit this metadata from within GLI.\nProceed? -
main/trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r34284 r34285 224 224 225 225 // refresh coll view if meta.csv was created somewhere inside this coll's import folder 226 // And for remote case, also upload any new file that's inside 227 // the collection's import dir to the remote server 228 if(success && csvFile.exists() && csvFile.getAbsolutePath().startsWith(importDir)) { 226 // And for remote case, also upload any new meta csv file if created anywhere inside the collection dir 227 // (incl especially its import dir) to the remote server 228 if(success && csvFile.exists() && csvFile.getAbsolutePath().startsWith(collection_directory_path)) { 229 // When the user *converts* metadata to CSV, it's set up to be easiest to create in the import folder 230 // When the user *exports* meta to CSV, it's set up to create this easiest in the collection folder 231 232 // Beware in export case: client-gli can create a metadata CSV file in the collection 233 // folder and this will get successfully uploaded and store into the collect folder 234 // on the remote server. However, when the collection is reopened in client-gli, the 235 // collection that's downloaded will NOT contain such a metadata CSV file (even though it 236 // still exists on the remote server in the collection folder) since the remote server 237 // selectively sends files across when a collection is opened. 238 // Not just anything and everything that exists in the collection folder (or its etc 239 // subfolder) is sent back to the client. There must be a reason why the GS3 server sends 240 // across some files and not others, so I'm not going to change that to incorporate any 241 // *.csv files found anywhere in the server's collection folder. 242 // When someone is using client-GLI it may not anyway make sense for them to save a file 243 // into their collection folder: the coll folder is hidden away in the gli user directory 244 // and even if client-GLI got it transferred back from the server and shows the user that 245 // their metadata.csv file exists locally, they still can't locate it that easily on 246 // their filesystem. It's best for the user to create the exported metadata in an easily 247 // located location on the client file system. 229 248 if(Gatherer.isGsdlRemote) { 230 249 Gatherer.remoteGreenstoneServer.uploadFilesIntoCollection(currCollName, new File[] {csvFile}, csvFile.getParentFile()); 231 250 } 232 Gatherer.g_man.refreshCollectionTree(DragTree.COLLECTION_CONTENTS_CHANGED); 233 } 251 if(csvFile.getAbsolutePath().startsWith(importDir)) { 252 Gatherer.g_man.refreshCollectionTree(DragTree.COLLECTION_CONTENTS_CHANGED); 253 } 254 } 234 255 } 235 256 -
main/trunk/gli/src/org/greenstone/gatherer/metadata/MetadataToCSV.java
r34283 r34285 572 572 chooser.setDialogTitle(Dictionary.get("MetaToCSV.ChooseMetaCSVFile", actionName)); 573 573 chooser.setApproveButtonText(Dictionary.get("MetaToCSV.Choose"));//actionName); 574 FileNameExtensionFilter filter = new FileNameExtensionFilter( "CSV spreadsheet file", "csv");574 FileNameExtensionFilter filter = new FileNameExtensionFilter(Dictionary.get("MetaToCSV.CSVFileExtensionType"), "csv"); 575 575 chooser.setFileFilter(filter);//.addChoosableFileFilter(filter); 576 576 int returnVal = chooser.showOpenDialog(parent); -
main/trunk/gli/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java
r34160 r34285 836 836 { 837 837 String file_path = file.getAbsolutePath(); 838 839 // Special case: if file path is longer by File separator, 840 // still dealing with practcally the same folder path, return relative path as "." 841 if(directory_path.equals(file_path + File.separator)) { 842 return "."; 843 } 838 844 if (!file_path.startsWith(directory_path)) { 839 845 System.err.println("ERROR: File path " + file_path + " is not a child of " + directory_path);
Note:
See TracChangeset
for help on using the changeset viewer.