Package org.zanata.dao

Examples of org.zanata.dao.TextFlowDAO.findById()


                new VersionLocaleKey(event.getProjectIterationId(),
                        event.getLocaleId());
        WordStatistic stats = versionStatisticCache.get(key);
        if (stats != null) {
            TextFlowDAO textFlowDAO = serviceLocator.getInstance(TextFlowDAO.class);
            HTextFlow textFlow = textFlowDAO.findById(event.getTextFlowId());

            stats.decrement(event.getPreviousState(),
                    textFlow.getWordCount().intValue());
            stats.increment(event.getNewState(),
                    textFlow.getWordCount().intValue());
View Full Code Here


    public void searchBestMatchTMTest2() {
        TextFlowDAO textFlowDAO = seam.autowire(TextFlowDAO.class);

        // content0="One file removed" content1="%d files removed"
        // best matches has 100% similarity
        HTextFlow textFlow = textFlowDAO.findById(101L, false);
        assert textFlow != null;

        executeFindBestTMMatch(textFlow, 80, true);
        executeFindBestTMMatch(textFlow, 90, true);
        executeFindBestTMMatch(textFlow, 100, true);
View Full Code Here

    public void searchBestMatchTMTest() {
        TextFlowDAO textFlowDAO = seam.autowire(TextFlowDAO.class);

        // content0="Yet Another File removed" content1="%d files removed"
        // best matches has 83.33% similarity
        HTextFlow textFlow = textFlowDAO.findById(105L, false);
        assert textFlow != null;

        executeFindBestTMMatch(textFlow, 70, true);
        executeFindBestTMMatch(textFlow, 80, true);
        executeFindBestTMMatch(textFlow, 90, false);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.