Changeset 403
- Timestamp:
- Aug 17, 2007, 11:56:04 AM (16 years ago)
- Location:
- trunk/uk/ac/ebi
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/uk/ac/ebi/AffyArrayDesignBatchImporter/src/uk/ac/ebi/nugo/common/ZipUnpacker.java
r402 r403 32 32 This class unpacks zip file provided by users into the base file structure 33 33 @author Dominic Oyeniran 34 @email oyeniran@ebi.ac.uk 35 36 37 34 @version 1.0 35 @email oyeniran@ebi.ac.uk 38 36 */ 39 37 … … 74 72 { 75 73 createSubDirectory( file, user); 76 // now call the mathod to unpack the zip files77 74 PluginDefinition zipFilePlugin = PluginDefinition.getByClassName(dc, "net.sf.basedb.plugins.ZipFileUnpacker"); 78 75 FileUnpacker unpacker = zipFilePlugin.newInstance(net.sf.basedb.plugins.ZipFileUnpacker.class, null, dc.getSessionControl(), null, null); … … 103 100 @param inStream 104 101 @param dc 105 @return true, if user has sufficient qu qota and false otherwise102 @return true, if user has sufficient quota and false otherwise 106 103 */ 107 104 private boolean checkUserQuota(InputStream inStream, DbControl dc) … … 112 109 Quota quota = user.getQuota(); 113 110 QuotaType totalQuotaType = QuotaType.getById(dc, SystemItems.getId(QuotaType.TOTAL)); 114 //unlimited storage (e.g. for user root) will return -1115 111 long quotaValue = quota.getQuotaValue(totalQuotaType, Location.PRIMARY); 116 //System.out.println("the quota value of the user: " + user.getName()+ " is: "+quotaValue );117 112 long currentDiskUsage = user.getDiskUsage(totalQuotaType, Location.PRIMARY); 118 //check whether remaining disk space and zip file size are compatible119 113 long remainingSpace = quotaValue - currentDiskUsage; 120 //System.out.println("the remaining space for user: " + user.getName()+ " is: "+remainingSpace );121 114 if(remainingSpace < zipFileSize && quotaValue!=-1) 122 115 { … … 171 164 //get the parent directory 172 165 Directory zipFileDir = zipFile.getDirectory(); 173 //System.out.println("zipFile is located in dir " + zipFile.getPath());174 166 Directory d = Directory.getById(dc, zipFileDir.getId()); 175 167 Directory subDir = d.newSubDirectory(); -
trunk/uk/ac/ebi/AnnotationTypeCvImporter/README.txt
r402 r403 47 47 - updating existing annotation types: set to false by default, do set this to true if an existing annotation type should be updated 48 48 - character set : is the character set of the file to be imported, the default is ISO-8859-1 49 - data separator: the data separator for multiple values in a data columns. If the import file contains more than one value per data column, do specifiy the data separator, the default is colon. Only semi-colon, colon and comma are allowed.49 - data separator: the data separator for multiple values in a data columns. If the import file contains more than one value per data column, do specifiy the data separator, the default is colon. Only semi-colon, colon and comma are allowed. 50 50 7. On the next screen click Finish and wait for the job to complete. You will be shown the progress of the import in the dialog, with the page refreshing itself regularly. 51 51 -
trunk/uk/ac/ebi/AnnotationTypeCvImporter/src/uk/ac/ebi/nugo/common/ZipUnpacker.java
r402 r403 32 32 This class unpacks zip file provided by users into the base file structure 33 33 @author Dominic Oyeniran 34 @email oyeniran@ebi.ac.uk 35 36 37 34 @version 1.0 35 @email oyeniran@ebi.ac.uk 38 36 */ 39 37 … … 74 72 { 75 73 createSubDirectory( file, user); 76 // now call the mathod to unpack the zip files77 74 PluginDefinition zipFilePlugin = PluginDefinition.getByClassName(dc, "net.sf.basedb.plugins.ZipFileUnpacker"); 78 75 FileUnpacker unpacker = zipFilePlugin.newInstance(net.sf.basedb.plugins.ZipFileUnpacker.class, null, dc.getSessionControl(), null, null); … … 103 100 @param inStream 104 101 @param dc 105 @return true, if user has sufficient qu qota and false otherwise102 @return true, if user has sufficient quota and false otherwise 106 103 */ 107 104 private boolean checkUserQuota(InputStream inStream, DbControl dc) … … 112 109 Quota quota = user.getQuota(); 113 110 QuotaType totalQuotaType = QuotaType.getById(dc, SystemItems.getId(QuotaType.TOTAL)); 114 //unlimited storage (e.g. for user root) will return -1115 111 long quotaValue = quota.getQuotaValue(totalQuotaType, Location.PRIMARY); 116 //System.out.println("the quota value of the user: " + user.getName()+ " is: "+quotaValue );117 112 long currentDiskUsage = user.getDiskUsage(totalQuotaType, Location.PRIMARY); 118 //check whether remaining disk space and zip file size are compatible119 113 long remainingSpace = quotaValue - currentDiskUsage; 120 //System.out.println("the remaining space for user: " + user.getName()+ " is: "+remainingSpace );121 114 if(remainingSpace < zipFileSize && quotaValue!=-1) 122 115 { … … 171 164 //get the parent directory 172 165 Directory zipFileDir = zipFile.getDirectory(); 173 //System.out.println("zipFile is located in dir " + zipFile.getPath());174 166 Directory d = Directory.getById(dc, zipFileDir.getId()); 175 167 Directory subDir = d.newSubDirectory(); -
trunk/uk/ac/ebi/Tab2MageExporter/src/uk/ac/ebi/nugo/common/ZipUnpacker.java
r402 r403 27 27 import org.apache.log4j.Logger; 28 28 29 30 31 29 /** 32 30 This class unpacks zip file provided by users into the base file structure 33 31 @author Dominic Oyeniran 34 @email oyeniran@ebi.ac.uk 35 36 37 32 @version 1.0 33 @email oyeniran@ebi.ac.uk 38 34 */ 39 35 … … 74 70 { 75 71 createSubDirectory( file, user); 76 // now call the mathod to unpack the zip files77 72 PluginDefinition zipFilePlugin = PluginDefinition.getByClassName(dc, "net.sf.basedb.plugins.ZipFileUnpacker"); 78 73 FileUnpacker unpacker = zipFilePlugin.newInstance(net.sf.basedb.plugins.ZipFileUnpacker.class, null, dc.getSessionControl(), null, null); … … 103 98 @param inStream 104 99 @param dc 105 @return true, if user has sufficient qu qota and false otherwise100 @return true, if user has sufficient quota and false otherwise 106 101 */ 107 102 private boolean checkUserQuota(InputStream inStream, DbControl dc) … … 112 107 Quota quota = user.getQuota(); 113 108 QuotaType totalQuotaType = QuotaType.getById(dc, SystemItems.getId(QuotaType.TOTAL)); 114 //unlimited storage (e.g. for user root) will return -1115 109 long quotaValue = quota.getQuotaValue(totalQuotaType, Location.PRIMARY); 116 //System.out.println("the quota value of the user: " + user.getName()+ " is: "+quotaValue );117 110 long currentDiskUsage = user.getDiskUsage(totalQuotaType, Location.PRIMARY); 118 //check whether remaining disk space and zip file size are compatible119 111 long remainingSpace = quotaValue - currentDiskUsage; 120 //System.out.println("the remaining space for user: " + user.getName()+ " is: "+remainingSpace );121 112 if(remainingSpace < zipFileSize && quotaValue!=-1) 122 113 { … … 171 162 //get the parent directory 172 163 Directory zipFileDir = zipFile.getDirectory(); 173 //System.out.println("zipFile is located in dir " + zipFile.getPath());174 164 Directory d = Directory.getById(dc, zipFileDir.getId()); 175 165 Directory subDir = d.newSubDirectory();
Note: See TracChangeset
for help on using the changeset viewer.