Package com.infoclinika.web.dto

Examples of com.infoclinika.web.dto.TranslationResult


    public Service translationService() {
        Service translationService = mock(Service.class);
        when(translationService.translateFiles(Matchers.<TranslationRequest>anyObject())).thenAnswer(new Answer<TranslationResult>() {
            @Override
            public TranslationResult answer(InvocationOnMock invocation) throws Throwable {
                final TranslationResult result = new TranslationResult();
                result.setTranslatedIds(new ArrayList<Long>(Collections.nCopies(7, 0L)));
                return result;
            }
        });

        when(translationService.preCacheChart(any(Long[].class), anyInt(), anyInt(), any(SpectrumType[].class), anyFloat(),
View Full Code Here


    public Service translationService() {
        Service translationService = mock(Service.class);
        when(translationService.translateFiles(Matchers.<TranslationRequest>anyObject())).thenAnswer(new Answer<TranslationResult>() {
            @Override
            public TranslationResult answer(InvocationOnMock invocation) throws Throwable {
                final TranslationResult result = new TranslationResult();
                result.setTranslatedIds(new ArrayList<Long>(Collections.nCopies(7, 0L)));
                return result;
            }
        });
        when(translationService.preCacheChart(any(Long[].class), anyInt(), anyInt(), any(SpectrumType[].class), anyFloat(),
                anyFloat(), anyDouble(), anyDouble())).thenAnswer(new Answer<PreCachingResult>() {
View Full Code Here

                "\n Workflow type = " + experimentWorkflowType + "." +
                "\n Vendor type = " + vendorType + "." +
                "\n Target bucket = " + targetBucket + "." +
                "\n Target folder = " + targetKeyPrefix);

        TranslationResult translationResult = null;
        TranslationError translationError = null;
        try {
            AnalysisBounds bounds = experiment.getBounds();
            final List<Double> lockMasses = experiment.getLockMasses();
            final TranslationRequest request = new TranslationRequest(urls, names, conditions, avoidNullList(lockMasses), experimentWorkflowType, vendorType, targetBucket, targetKeyPrefix,
                    bounds.getMinRt(), bounds.getMaxRt(), bounds.getMinMz(), bounds.getMaxMz());
            translationResult = translationService.translateFiles(request);
            LOG.debug(" * Got result from translation service. Translated IDs = " + translationResult.getTranslatedIds() + ". Error message = " + translationResult.translationError);
            translationError = translationResult.translationError;
        } catch (Exception e) {
            LOG.error(" * Translation failed for the experiment with ID = " + experimentId, e);
            translationError = new TranslationError("Translation failed.");
        }
View Full Code Here

TOP

Related Classes of com.infoclinika.web.dto.TranslationResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.