Changeset 26756
- Timestamp:
- 2013-01-19T22:49:04+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/GlamED/trunk/src/org/honours/agents/ImportCollections.java
r26701 r26756 70 70 71 71 /** 72 * TODO: Change this method so we only display the full name of the collection and the collection's description (the first 10 words).72 * Import any collection framesets found in Greenstone into GlamED. 73 73 * @param children 74 74 * @throws Exception … … 90 90 91 91 if(dir.isDirectory()){ 92 File exports = getExportDirectory(filename); 93 94 if(exports != null){ 95 //Search exports folder for 0.exp, 1.exp & frame.inf 96 String[] filesToMove = getFiles(exports); 92 93 File outputDir = new File(filename + File.separator + "export" + File.separator + collectionName); 94 95 if(outputDir.isDirectory()){ 96 97 String[] filesToMove = getFiles(outputDir); 97 98 98 99 if(filesToMove == null){ 99 String errorMsg = "Failed to import collection " + collectionName;100 String errorMsg = "Failed to import collection: " + collectionName; 100 101 MessageBay.errorMessage("ERROR: " + errorMsg); 101 102 throw new Exception(errorMsg); … … 103 104 104 105 File matchingFrameset = matchingFrameset(collectionName); 105 106 106 107 //Obtain first free frame for displaying collection row with links 107 108 Object[] freeFrameInfo = findFreeFrame(); … … 118 119 119 120 //Import collection into Expeditee. 120 importIntoExpeditee(matchingFrameset,exports,collectionName,tempCollections); 121 121 importIntoExpeditee(matchingFrameset,outputDir,collectionName,tempCollections); 122 122 } 123 123 } … … 182 182 }else{ 183 183 tempCollections.add(collect); 184 } 185 186 187 } 188 184 } 185 } 189 186 } 190 187 … … 349 346 350 347 for(int j = 0; j < newChildren.length; j++){ 351 if(newChildren[j].equals("export")) 352 return new File(filename + File.separator + "export"); 348 if(newChildren[j].equals("export")){ 349 String exportDir = filename + File.separator + "export"; 350 System.err.println(exportDir); 351 return new File(exportDir); 352 } 353 353 } 354 354
Note:
See TracChangeset
for help on using the changeset viewer.