Source:
private SnomedRf2ExportModel convertConfiguration(final ISnomedExportConfiguration configuration) { final ContentSubType contentSubType = convertType(configuration.getRf2ReleaseType()); Branch branch = RepositoryRequests.branching() .prepareGet(configuration.getBranchPath()) .build(SnomedDatastoreActivator.REPOSITORY_UUID) .execute(bus) .getSync(); final SnomedRf2ExportModel model = createExportModelWithAllRefSets(contentSubType, branch, configuration.getNamespaceId()); if (configuration.getModuleIds().isEmpty()) { model.getModulesToExport().addAll(SnomedRequests.prepareSearchConcept() .all() .filterByActive(true) .filterByAncestor(Concepts.MODULE_ROOT) .build(SnomedDatastoreActivator.REPOSITORY_UUID, branch.path()) .execute(ApplicationContext.getServiceForClass(IEventBus.class)) .then(new Function<SnomedConcepts, Collection<String>>() { @Override public Collection<String> apply(SnomedConcepts input) { return FluentIterable.from(input).transform(IComponent.ID_FUNCTION).toSet(); } }) .getSync()); } else { model.getModulesToExport().addAll(configuration.getModuleIds()); } model.setStartEffectiveTime(configuration.getStartEffectiveTime()); model.setEndEffectiveTime(configuration.getEndEffectiveTime()); model.setIncludeUnpublised(configuration.isIncludeUnpublised()); final String transientEffectiveTime = configuration.getTransientEffectiveTime(); if (StringUtils.isEmpty(transientEffectiveTime)) { model.setUnsetEffectiveTimeLabel(""); } else if ("NOW".equals(transientEffectiveTime)) { model.setUnsetEffectiveTimeLabel(EffectiveTimes.format(Dates.todayGmt(), DateFormats.SHORT)); } else { try { EffectiveTimes.parse(transientEffectiveTime, DateFormats.SHORT); } catch (SnowowlRuntimeException e) { throw new BadRequestException("Transient effective time '%s' is not in the expected date format.", transientEffectiveTime); } model.setUnsetEffectiveTimeLabel(transientEffectiveTime); } model.setCodeSystemShortName(configuration.getCodeSystemShortName()); model.setExtensionOnly(configuration.isExtensionOnly()); return model; }

Target:
private SnomedRf2ExportModel convertConfiguration(final ISnomedExportConfiguration configuration) { final ContentSubType contentSubType = convertType(configuration.getRf2ReleaseType()); Branch branch = RepositoryRequests.branching() .prepareGet(configuration.getBranchPath()) .build(SnomedDatastoreActivator.REPOSITORY_UUID) .execute(bus) .getSync(); final SnomedRf2ExportModel model = createExportModelWithAllRefSets(contentSubType, branch, configuration.getNamespaceId()); if (configuration.getModuleIds().isEmpty()) { model.getModulesToExport().addAll(SnomedRequests.prepareSearchConcept() .all() .filterByActive(true) .filterByAncestor(Concepts.MODULE_ROOT) .build(SnomedDatastoreActivator.REPOSITORY_UUID, branch.path()) .execute(ApplicationContext.getServiceForClass(IEventBus.class)) .then(new Function<SnomedConcepts, Collection<String>>() { @Override public Collection<String> apply(SnomedConcepts input) { return FluentIterable.from(input).transform(IComponent.ID_FUNCTION).toSet(); } }) .getSync()); } else { model.getModulesToExport().addAll(configuration.getModuleIds()); } model.setStartEffectiveTime(configuration.getStartEffectiveTime()); model.setEndEffectiveTime(configuration.getEndEffectiveTime()); model.setIncludeUnpublised(configuration.isIncludeUnpublished()); final String transientEffectiveTime = configuration.getTransientEffectiveTime(); if (StringUtils.isEmpty(transientEffectiveTime)) { model.setUnsetEffectiveTimeLabel(""); } else if ("NOW".equals(transientEffectiveTime)) { model.setUnsetEffectiveTimeLabel(EffectiveTimes.format(Dates.todayGmt(), DateFormats.SHORT)); } else { try { EffectiveTimes.parse(transientEffectiveTime, DateFormats.SHORT); } catch (SnowowlRuntimeException e) { throw new BadRequestException("Transient effective time '%s' is not in the expected date format.", transientEffectiveTime); } model.setUnsetEffectiveTimeLabel(transientEffectiveTime); } model.setCodeSystemShortName(configuration.getCodeSystemShortName()); model.setExtensionOnly(configuration.isExtensionOnly()); return model; }