Package org.zanata.webtrans.shared.model

Examples of org.zanata.webtrans.shared.model.TransMemoryQuery


            prepareTMQuery(List<String> contents,
                    HasSearchType.SearchType searchType, MergeOptions opts,
                    String resId) {

        if (opts == null) {
            return new TransMemoryQuery(contents, searchType,
                    new TransMemoryQuery.Condition(false, projectSlug),
                    new TransMemoryQuery.Condition(false, docId),
                    new TransMemoryQuery.Condition(false, resId));
        } else {
            TransMemoryQuery.Condition projectCondition =
                    new TransMemoryQuery.Condition(
                            opts.getDifferentProject() == MergeRule.REJECT,
                            projectSlug);

            TransMemoryQuery.Condition documentCondition =
                    new TransMemoryQuery.Condition(
                            opts.getDifferentDocument() == MergeRule.REJECT,
                            docId);

            TransMemoryQuery.Condition resCondition =
                    new TransMemoryQuery.Condition(
                            opts.getDifferentResId() == MergeRule.REJECT, resId);

            return new TransMemoryQuery(contents, searchType, projectCondition,
                    documentCondition, resCondition);
        }
    }
View Full Code Here


                importedTmResult(tuResultSource.getId(), 100);

        Optional<TransMemoryResultItem> match = Optional.of(mostSimilarTM);

        // A Translation memory query
        TransMemoryQuery tmQuery =
                prepareTMQuery(hTextFlow.getContents(), FUZZY_PLURAL, null,
                        hTextFlow.getResId());

        // Expectations:
        when(localeService.getByLocaleId(action.getWorkspaceId().getLocaleId()))
View Full Code Here

TOP

Related Classes of org.zanata.webtrans.shared.model.TransMemoryQuery

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.