Changeset 1407 for webservices/net.sf.basedb.examples/trunk/src
- Timestamp:
- Oct 18, 2011, 2:50:36 PM (11 years ago)
- Location:
- webservices/net.sf.basedb.examples/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
webservices/net.sf.basedb.examples/trunk
- Property svn:ignore
-
old new 3 3 build 4 4 dist 5 build.properties 6 .settings
-
- Property svn:ignore
-
webservices/net.sf.basedb.examples/trunk/src/net/sf/basedb/ws/example/Main.java
r651 r1407 4 4 Copyright (C) Authors contributing to this file. 5 5 6 This file is part of BASE - BioArray Software Environment. 7 Available at http://base.thep.lu.se/ 8 9 BASE is free software; you can redistribute it and/or 6 This is free software; you can redistribute it and/or 10 7 modify it under the terms of the GNU General Public License 11 as published by the Free Software Foundation; either version 28 as published by the Free Software Foundation; either version 3 12 9 of the License, or (at your option) any later version. 13 14 BASEis distributed in the hope that it will be useful,10 11 The software is distributed in the hope that it will be useful, 15 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 14 GNU General Public License for more details. 18 15 19 16 You should have received a copy of the GNU General Public License 20 along with this program; if not, write to the Free Software 21 Foundation, Inc., 59 Temple Place - Suite 330, 22 Boston, MA 02111-1307, USA. 17 along with BASE. If not, see <http://www.gnu.org/licenses/>. 23 18 */ 24 19 package net.sf.basedb.ws.example; … … 35 30 import net.sf.basedb.info.DataFileTypeInfo; 36 31 import net.sf.basedb.info.ExperimentInfo; 32 import net.sf.basedb.info.FileInfo; 33 import net.sf.basedb.info.FileSetMemberInfo; 37 34 import net.sf.basedb.info.ProjectInfo; 38 35 import net.sf.basedb.info.QueryOptions; … … 254 251 throws AxisFault 255 252 { 256 DataFileTypeInfo[] files = rc.getDataFileTypes(info.getId(), new QueryOptions());253 FileSetMemberInfo[] files = rc.getDataFiles(info.getId(), new QueryOptions()); 257 254 if (files == null || files.length == 0) 258 255 { … … 261 258 else 262 259 { 263 for (DataFileTypeInfo fileType : files) 264 { 265 System.out.print(" " + fileType.getName()); 260 for (FileSetMemberInfo member : files) 261 { 262 DataFileTypeInfo fileType = member.getDataFileTypeInfo(); 263 FileInfo file = member.getFileInfo(); 264 265 System.out.println(" " + fileType.getName() + ": " + 266 file.getName() + " [id=" + file.getId() + "] " + file.getSize() + " bytes"); 266 267 if (downloadDir != null) 267 268 { 268 String extension = fileType.getExtension() == null ? "" : "." + fileType.getExtension(); 269 File downloadTo = new File(downloadDir, info.getName() + extension); 269 File downloadTo = new File(downloadDir, info.getName() + "." + file.getName()); 270 270 try 271 271 { … … 275 275 out.close(); 276 276 in.close(); 277 System.out.print(" ;Download --> " + downloadTo);277 System.out.print(" Download --> " + downloadTo); 278 278 } 279 279 catch (IOException ex) 280 280 { 281 System.out.print(" ;Download failed: " + ex.getMessage());281 System.out.print(" Download failed: " + ex.getMessage()); 282 282 } 283 283 }
Note: See TracChangeset
for help on using the changeset viewer.