Beispiel #1
0
 /**
  * asDto.
  *
  * @param file a {@link net.sourceforge.seqware.common.model.File} object.
  * @return a {@link net.sourceforge.seqware.webservice.dto.FileDto} object.
  */
 public static FileDto asDto(File file) {
   FileDto dto = new FileDto();
   dto.setFilePath(file.getFilePath());
   if (file.getMetaType() != null) {
     dto.setMetaType(file.getMetaType());
   }
   if (file.getDescription() != null) {
     dto.setDescription(file.getDescription());
   }
   if (file.getMd5sum() != null) {
     dto.setMd5sum(file.getMd5sum());
   }
   if (file.getSize() != null) {
     dto.setSize(file.getSize());
   }
   if (file.getType() != null) {
     dto.setType(file.getType());
   }
   return dto;
 }