Loading src/main/java/org/gesis/dda/wizard/service/FeederService.java +8 −4 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ package org.gesis.dda.wizard.service; import java.time.Instant; import java.util.Optional; import java.util.Set; import java.util.stream.Stream; import javax.inject.Inject; Loading Loading @@ -80,6 +81,7 @@ public class FeederService { BundlesSource bundlesSourceEntity = bundlesSourceRepository.findByReference(sourceReference); log.info("bundlesSourceEntity={}", bundlesSourceEntity); log.info("feeding context={}", feedingContext.toString()); BundlesStreamSource bundlesStreamSource = feedingContext.getBundlesStreamSource(); BundlesSourceState bundlesSourceState = bundlesSourceEntity.getBundlesSourceState(); Loading @@ -91,16 +93,18 @@ public class FeederService { nihis.updateNextIncrementalHarvestingStartInstant(startOfFeedingInstant); bundlesSourceEntity.setBundlesSourceState(BundlesSourceState.PROCESSING); BundlesSource savedBundlesSourceEntity = bundlesSourceRepository.save(bundlesSourceEntity); BundleState fullIngestionResult = bundlesStreamSource. getBundlesStream(). Stream<Bundle> bundlesStream = bundlesStreamSource.getBundlesStream(); BundleState fullIngestionResult = bundlesStream. map(bundle -> { BundleState result; log.info("bundle iterate: {}", bundle.getReference()); org.gesis.dda.wizard.domain.Bundle bundleEntity = createOrUpdateBundle(bundle, savedBundlesSourceEntity); log.info("bundleEntity= {}", bundleEntity.getId()); // by now, we have an existing bundleEntity result = feedBundle(feedingContext, bundleEntity, bundle); BundlesSourceEntityDataModificationStrategy dataModificationStrategy = feedingContext.getBundlesSourceEntityDataModificationStrategy(); BundlesSource bse = dataModificationStrategy.updateDataOnBundleIngestionResult(savedBundlesSourceEntity, bundle, result); log.info("BSE= {}", bse.getId()); bse = bundlesSourceRepository.save(bse); return result; }). Loading src/main/java/org/gesis/dda/publishing/domain/BundlesStreamSource.java +1 −1 File changed.Contains only whitespace changes. Show changes Loading
src/main/java/org/gesis/dda/wizard/service/FeederService.java +8 −4 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ package org.gesis.dda.wizard.service; import java.time.Instant; import java.util.Optional; import java.util.Set; import java.util.stream.Stream; import javax.inject.Inject; Loading Loading @@ -80,6 +81,7 @@ public class FeederService { BundlesSource bundlesSourceEntity = bundlesSourceRepository.findByReference(sourceReference); log.info("bundlesSourceEntity={}", bundlesSourceEntity); log.info("feeding context={}", feedingContext.toString()); BundlesStreamSource bundlesStreamSource = feedingContext.getBundlesStreamSource(); BundlesSourceState bundlesSourceState = bundlesSourceEntity.getBundlesSourceState(); Loading @@ -91,16 +93,18 @@ public class FeederService { nihis.updateNextIncrementalHarvestingStartInstant(startOfFeedingInstant); bundlesSourceEntity.setBundlesSourceState(BundlesSourceState.PROCESSING); BundlesSource savedBundlesSourceEntity = bundlesSourceRepository.save(bundlesSourceEntity); BundleState fullIngestionResult = bundlesStreamSource. getBundlesStream(). Stream<Bundle> bundlesStream = bundlesStreamSource.getBundlesStream(); BundleState fullIngestionResult = bundlesStream. map(bundle -> { BundleState result; log.info("bundle iterate: {}", bundle.getReference()); org.gesis.dda.wizard.domain.Bundle bundleEntity = createOrUpdateBundle(bundle, savedBundlesSourceEntity); log.info("bundleEntity= {}", bundleEntity.getId()); // by now, we have an existing bundleEntity result = feedBundle(feedingContext, bundleEntity, bundle); BundlesSourceEntityDataModificationStrategy dataModificationStrategy = feedingContext.getBundlesSourceEntityDataModificationStrategy(); BundlesSource bse = dataModificationStrategy.updateDataOnBundleIngestionResult(savedBundlesSourceEntity, bundle, result); log.info("BSE= {}", bse.getId()); bse = bundlesSourceRepository.save(bse); return result; }). Loading
src/main/java/org/gesis/dda/publishing/domain/BundlesStreamSource.java +1 −1 File changed.Contains only whitespace changes. Show changes