Examples of QuestionType


Examples of com.vst.model.QuestionType

        assertTrue(questionType != null);
        questionTypeDao.verify();
    }

    public void testSaveQuestionType() throws Exception {
        QuestionType questionType = new QuestionType();

        // set expected behavior on dao
        questionTypeDao.expects(once()).method("saveQuestionType")
            .with(same(questionType)).isVoid();
View Full Code Here

Examples of com.vst.model.QuestionType

        questionTypeManager.saveQuestionType(questionType);
        questionTypeDao.verify();
    }

    public void testAddAndRemoveQuestionType() throws Exception {
        QuestionType questionType = new QuestionType();

        // set required fields

        // set expected behavior on dao
        questionTypeDao.expects(once()).method("saveQuestionType")
            .with(same(questionType)).isVoid();
        questionTypeManager.saveQuestionType(questionType);
        questionTypeDao.verify();

        // reset expectations
        questionTypeDao.reset();

        questionTypeDao.expects(once()).method("removeQuestionType").with(eq(new Long(questionTypeId)));
        questionTypeManager.removeQuestionType(questionTypeId);
        questionTypeDao.verify();

        // reset expectations
        questionTypeDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(QuestionType.class, questionType.getQuestionTypeId());
        questionTypeDao.expects(once()).method("removeQuestionType").isVoid();
        questionTypeDao.expects(once()).method("getQuestionType").will(throwException(ex));
        questionTypeManager.removeQuestionType(questionTypeId);
        try {
            questionTypeManager.getQuestionType(questionTypeId);
View Full Code Here

Examples of com.vst.model.QuestionType

    /**
     * @see com.vst.dao.QuestionTypeDao#getQuestionType(Integer questionTypeId)
     */
    public QuestionType getQuestionType(final Integer questionTypeId) {
        QuestionType questionType = (QuestionType) getObject(questionTypeId);
        return questionType;
    }
View Full Code Here

Examples of nl2sql.questionWords.questionType

    }
    ArrayList<String> ColLeft = new ArrayList<String>();
    ArrayList<String> ColRight = new ArrayList<String>();
   
    public QuestionWordAction(String _question, LinguisticComponent _chunk, ArrayList<String> NewLeft, ArrayList<String> NewRight){
        questionType qT = new questionType(_question, _chunk);
        int qType = qT.identifyType();
       
        Database db;
        try {
            db = new Database("đại học công nghệ");
            for (int i = 0; i < NewRight.size(); i++) {
                if (db.attribute.contains(NewRight.get(i))) {
                    ColLeft.add(NewLeft.get(i));
                    ColRight.add(NewRight.get(i));
                }
            }
        } catch (Exception ex) {
            System.err.println(ex.getMessage());
        }
       
       
        String qTarget = qT.identifyTarget(qType, ColLeft);
       
        int pos = ColLeft.indexOf(qTarget);
        String qTargetC;
        if(pos!= -1){
            qTargetC = ColRight.get(pos);
        } else{
            qTargetC = qTarget;
        }
       
        if(qTargetC.equals("*")){
            SELECT += " * ";
        }else
        if(qType == qT.getENTITY()){
            if(qTargetC.isEmpty()){
                qTargetC = "*";
            }
            System.out.println("QuestionType : ENTITY");
            SELECT += " `" + qTargetC+ "`";
        } else
        if(qType == qT.getNUMBER() ){
            if(qTargetC.isEmpty()){
                qTargetC = "stt";
            }
            SELECT += " COUNT(`" + qTargetC+ "`)";
            System.out.println("QuestionType : NUMBER");
        } else
        if(qType == qT.getRATIO() ){
            if(qTargetC.isEmpty()){
                qTargetC = "stt";
            }
            SELECT += " (COUNT(`" + qTargetC+ "`)/594 * 100)";
            System.out.println("QuestionType : RATIO");
View Full Code Here

Examples of se.inera.ifv.findallquestionsresponder.v1.QuestionType

            response.setQuestionsLeft(questionValue.getQuestionsLeft());
            response.setQuestions(new QuestionsType());

            for (Question q : questionValue.getQuestions()) {
                QuestionFromFkType questionFromFk = (QuestionFromFkType) q.getMessage();
                QuestionType qt = new QuestionType();
                qt.setId(q.getId().toString());
                qt.setReceivedDate(q.getArrived());
                qt.setQuestion(questionFromFk);

                response.getQuestions().getQuestion().add(qt);

                q.setStatusRetrieved();
            }
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.