Examples of Question


Examples of com.tmm.enterprise.microblog.domain.Question

    Account acc = accountService.loadAccountByUserName(currentUserName);
    Person currentUser = acc.getUserProfile();
    // assigning to
    if (currentUser != null) {
      Contactable contact = contactService.loadContactable(assignedToId);
      Question q = new Question();
      q.setTitle(title);
      q.setDetails(description);
      q.setRaisedBy(currentUser);
      q.setAssignedTo(contact);

      if (tags != null && !"".equals(tags)) {
        String[] listTags = tags.split(",");
        for (String t : listTags) {
          QuestionTag tag = questionTagDao.loadOrCreateTagByName(t.trim());
          q.addTag(tag);
        }
      }

      questionDao.persist(q);
    }
View Full Code Here

Examples of com.uphea.domain.Question

      String fileName = file.getHeader().getFileName();
      String baseName = FileNameUtil.getBaseName(fileName);
      id = Long.valueOf(baseName);
    }

    Question question = questionService.findQuestionById(id);
    if ((question != null) && file.isValid()) {
      System.out.println(file);
      try {
        FileUtil.writeBytes(new File(appData.getImgRoot(), question.getId() + ".jpg"), file.getFileContent());
      } catch (IOException ioex) {
        log.error("Unable to save uploaded file.", ioex);
        throw new UpheaException("Unable to save uploaded file.", ioex);
      }
    }
View Full Code Here

Examples of com.vst.model.Question

        List questions;
        if (request.getParameter("isSearched") == null) {
            questions = questionManager.getQuestions(null);
        } else {
            Question question = new Question();
            Integer constructionTypeId = (Integer) Integer.parseInt(request.getParameter("constructionTypeId"));
            Integer questionTypeId = (Integer) Integer.parseInt(request.getParameter("questionTypeId"));
            question.setConstructionTypeId(constructionTypeId);
            if (questionTypeId.equals(new Integer(1))) {
                question.setQuestionTypeId(new Integer(1));
            }
            if (questionTypeId.equals(new Integer(2))) {
                question.setQuestionTypeId(new Integer(1));
                question.setForObjectStructure(true);
            }

            if (questionTypeId.equals(new Integer(3))) {
                question.setQuestionTypeId(new Integer(0));
            }
            questions = questionManager.findQuestions(question);
            request.setAttribute("currentConstructionTypeId", constructionTypeId);
            request.setAttribute("currentQuestionTypeId", questionTypeId);
        }
View Full Code Here

Examples of edu.cmu.cs.stage3.alice.core.Question

  public long m_clickTimeThreshold = 300;
  public int m_clickDistanceThresholdSquared = 100;

  public void manufactureAnyNecessaryDetails() {
    if( details.size()==2 ) {
      Question what = new PickQuestion();
      what.name.set( "what" );
      what.setParent( this );
      details.add( what );
    }
    for( int i=0; i<details.size(); i++ ) {
      Object o = details.get( i );
      if( o instanceof PickQuestion ) {
View Full Code Here

Examples of eu.scape_project.watch.domain.Question

      return triggers;
    }
   
    private void addTrigger(Leaf leaf) {
      Measure meas = leaf.getMeasure();
      Question q = null;
        if (leaf.getTransformer() instanceof OrdinalTransformer) {
          // TODO
        } else if (leaf.getTransformer() instanceof NumericTransformer){
            NumericTransformer numericT = (NumericTransformer)leaf.getTransformer();
           
            String name = meas.getName();
            String operator;
            if (numericT.hasIncreasingOrder()) {
              // values must be greater or equal threshold 1, therefore we watch for smaller values
                operator = " < ";
            } else {
              // values must be smaller or equal threshold 1, therefore we watch for higher values
                operator = " > ";
            }
           
        if ("http://purl.org/DP/quality/measures#11".equals(meas.getUri())) {
          // this value is accumulated, we check for min/max
         
              if (numericT.hasIncreasingOrder()) {
                  name = "Minimum " + name;
              } else {
                  name = "Maximum " + name;
              }
              String threshold = "" + numericT.getThreshold1();
          String sparql = String.format(
              "?p rdf:type watch:Property. " +
                "?p watch:name ?n . " +
                "?v watch:property ?p. " +
                "?v watch:floatValue ?fv. " +
                "FILTER (?n = \"%s\"  && ?fv %s %s ) " +
                " BIND(CONCAT(?n, \" is \", str(?fv) , \", should not be %s %s \") AS ?s )",
                name, operator, threshold, operator, threshold);
             
            q = new Question(sparql, RequestTarget.PROPERTY_VALUE);
        }
        }
        if (q != null) {
          final Notification n = new Notification("email", Arrays.asList(new DictionaryItem("recepients",
                this.recipients)));
View Full Code Here

Examples of facebook4j.Question

            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<Question> questions = new ResponseListImpl<Question>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject questionJSONObject = list.getJSONObject(i);
                Question question = new QuestionJSONImpl(questionJSONObject);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(question, questionJSONObject);
                }
                questions.add(question);
            }
View Full Code Here

Examples of hibernate.Question

        int counter = 0;
       
       
        //this loop extracts all the questions from the list and creates a new QuestionJson for each.
        for (Iterator<Question> questionIterator = questionList.iterator(); questionIterator.hasNext();) {
              Question myQuestions = questionIterator.next();
             
              // This will find the group associationed with the question
              List<Group> group = myGroupTools.getTypeList(Table.Group, Column.id, myQuestions.getGroupId());
              String groupTitle = group.get(0).getGroupTitle();
             
              //for each question, create a new QuesitonJson via the QuesitonFactory
              QuestionDetailsJson questionJson = QuestionFactory.createQuestionDetailsJson(myQuestions, groupTitle);
             
View Full Code Here

Examples of metier.Question

        scores = new ArrayList<Float>();
        this.webApi = new WebApi();
    }
   
    public Question getQuestion1() {
        Question question = new Question(1);
        question.setIntitule("Placer les saisons");
        question.setExplaination("Explanations?");

        //Cases
        Element e1 = new Element();
        e1.setLibelle("Feu");
        e1.setUrl_image("/ressources/Feu");
        e1.setID(1);
        question.addFixedElement(e1);
   
        Element e2 = new Element();
        e2.setLibelle("Eau");
        e2.setUrl_image("/ressources/Eau");
        e2.setID(2);
        question.addFixedElement(e2);
   
        Element e3 = new Element();
        e3.setLibelle("Terre");
        e3.setUrl_image("/ressources/Terre");
        e3.setID(3);
        question.addFixedElement(e3);
   
        Element e4 = new Element();
        e4.setLibelle("Eau");
        e4.setUrl_image("/ressources/M�tal");
        e4.setID(4);
        question.addFixedElement(e4);
   
        Element e5 = new Element();
        e5.setLibelle("Bois");
        e5.setUrl_image("/ressources/Bois");
        e5.setID(5);
        question.addFixedElement(e5);
   
  //Mots � placer
  Element e6 = new Element();
        e6.setLibelle("Rate");
        e6.setUrl_image("/ressources/Rate");
  question.addMovableElement(1, e6);
   
  Element e7 = new Element();
        e7.setLibelle("Poumon");
        e7.setUrl_image("/ressources/Poumon");
  question.addMovableElement(2, e7);
   
  Element e8 = new Element();
        e8.setLibelle("Reins");
        e8.setUrl_image("/ressources/Rein");
  question.addMovableElement(3, e8);
   
  Element e9 = new Element();
        e9.setLibelle("Coeur");
        e9.setUrl_image("/ressources/Coeur");
  question.addMovableElement(4, e9);
   
        return question;
    }
View Full Code Here

Examples of models.Question

    }

   
    public static void provision() {
      for(int i=0; i<100; i++){
        Question q = new Question(
            "question",
            "answer",
            "slug",
            100L,
            30L,
            1L);
       
        q.insert();
      }
      render();
     
    }
View Full Code Here

Examples of nl.nuggit.moltest.model.question.Question

          t++;
        } else if (line.startsWith(QUESTION)) {
          if (test == null) {
            throw new IllegalArgumentException(String.format("Found %s without %s: %s", QUESTION, TEST, line));
          }
          Question question = Question.getInstance(line);
          test.getQuestions().add(question);
          q++;
        }
      }
    } catch (FileNotFoundException e) {
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.