Search in sources :

Example 1 with DccMetadata

use of org.icgc.dcc.song.importer.model.DccMetadata in project SONG by overture-stack.

the class DccMetadataFetcher method processDccMetadata.

private Set<File> processDccMetadata(DccMetadata dccMetadata, Map<String, List<PortalFileMetadata>> objectIdMap) {
    val objectId = dccMetadata.getId();
    val portalFileMetadatasForObjectId = objectIdMap.get(objectId);
    val file = simpleDccStorageClient.getFile(objectId, "N/A", dccMetadata.getFileName());
    return portalFileMetadatasForObjectId.stream().map(x -> buildFile(dccMetadata, file, x)).collect(toImmutableSet());
}
Also used : lombok.val(lombok.val) PortalFileMetadata(org.icgc.dcc.song.importer.model.PortalFileMetadata) Collectors.toImmutableSet(org.icgc.dcc.common.core.util.stream.Collectors.toImmutableSet) DccMetadataDao(org.icgc.dcc.song.importer.dao.dcc.DccMetadataDao) File(org.icgc.dcc.song.server.model.entity.File) SneakyThrows(lombok.SneakyThrows) Files(java.nio.file.Files) NonNull(lombok.NonNull) FileConverter.convertToFile(org.icgc.dcc.song.importer.convert.FileConverter.convertToFile) Collection(java.util.Collection) lombok.val(lombok.val) Collectors.groupingBy(java.util.stream.Collectors.groupingBy) Set(java.util.Set) DccMetadata(org.icgc.dcc.song.importer.model.DccMetadata) List(java.util.List) CounterMonitor.newMonitor(org.icgc.dcc.song.importer.measurement.CounterMonitor.newMonitor) SimpleDccStorageClient.calcMd5Sum(org.icgc.dcc.song.importer.storage.SimpleDccStorageClient.calcMd5Sum) Map(java.util.Map) DccMetadataConverter(org.icgc.dcc.song.importer.convert.DccMetadataConverter) SimpleDccStorageClient(org.icgc.dcc.song.importer.storage.SimpleDccStorageClient)

Aggregations

Files (java.nio.file.Files)1 Collection (java.util.Collection)1 List (java.util.List)1 Map (java.util.Map)1 Set (java.util.Set)1 Collectors.groupingBy (java.util.stream.Collectors.groupingBy)1 NonNull (lombok.NonNull)1 SneakyThrows (lombok.SneakyThrows)1 lombok.val (lombok.val)1 Collectors.toImmutableSet (org.icgc.dcc.common.core.util.stream.Collectors.toImmutableSet)1 DccMetadataConverter (org.icgc.dcc.song.importer.convert.DccMetadataConverter)1 FileConverter.convertToFile (org.icgc.dcc.song.importer.convert.FileConverter.convertToFile)1 DccMetadataDao (org.icgc.dcc.song.importer.dao.dcc.DccMetadataDao)1 CounterMonitor.newMonitor (org.icgc.dcc.song.importer.measurement.CounterMonitor.newMonitor)1 DccMetadata (org.icgc.dcc.song.importer.model.DccMetadata)1 PortalFileMetadata (org.icgc.dcc.song.importer.model.PortalFileMetadata)1 SimpleDccStorageClient (org.icgc.dcc.song.importer.storage.SimpleDccStorageClient)1 SimpleDccStorageClient.calcMd5Sum (org.icgc.dcc.song.importer.storage.SimpleDccStorageClient.calcMd5Sum)1 File (org.icgc.dcc.song.server.model.entity.File)1