Examples of Study


Examples of org.cipres.treebase.domain.study.Study

    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("In FormbackingObject");
    }

    Study study = ControllerUtil.findStudy(request, mStudyService);
    Submission submission = (Submission) study.getSubmission();

    AnalyzedDataCommand command = new AnalyzedDataCommand();
    String analysis_step_id = ServletRequestUtils.getStringParameter(
      request,
      "analysis_step_id",
View Full Code Here

Examples of org.cipres.treebase.domain.study.Study

      return showForm(request, response, myerrors);
    }

    /* pass List<File> to service layer */
    // get user's Submission Object
    Study study = ControllerUtil.findStudy(request, mStudyService);
    Submission submission = study.getSubmission();
    MyProgressionListener listener = new MyProgressionListener();

    UploadFileResult uploadResult = getSubmissionService().addNexusFilesJDBC(
      submission,
      files,
View Full Code Here

Examples of org.cipres.treebase.domain.study.Study

   * Creation date: June 3, 2006 2:24:42 PM
   */
  @Override
  protected Object formBackingObject(HttpServletRequest request) throws ServletException {

    Study s = ControllerUtil.findStudy(request, getStudyService());
    ControllerUtil.saveStudy(request, s); // user has made selection

    return s;
  }
View Full Code Here

Examples of org.cipres.treebase.domain.study.Study

   * @see org.springframework.web.servlet.mvc.SimpleFormController#referenceData(javax.servlet.http.HttpServletRequest)
   */
  @Override
  protected Map<String,Object> referenceData(HttpServletRequest pRequest) throws Exception {
    Map<String,Object> resultMap = new HashMap<String,Object>();
    Study study = ControllerUtil.findStudy(pRequest, getStudyService());
    Collection<Matrix> matrices = study.getSubmission().getSubmittedMatricesReadOnly();
    Collection<PhyloTree> trees;

    if (pRequest.getParameter("id") == null) {
      trees = study.getSubmission().getAllSubmittedTrees();
    } else {
      trees = new ArrayList<PhyloTree>();
      trees.add(getPhyloTreeService().findByID(Long.parseLong(pRequest.getParameter("id"))));
    }

View Full Code Here

Examples of org.cipres.treebase.domain.study.Study

      LOGGER.debug("Entering onSubmit()..."); //$NON-NLS-1$
    }

    if (request.getParameter(ACTION_DELETE) != null) {

      Study study = ControllerUtil.findStudy(request, getStudyService());
      getSubmissionService().deleteSubmittedData(study.getSubmission());
    }
    // TODO Submission submission = study.getSubmission();
    // MyProgressionListener listener = new MyProgressionListener();
    // mSubmissionService.addNexusFiles(submission, files, listener);
View Full Code Here

Examples of org.cipres.treebase.domain.study.Study

    return "T";
  }

  @Override
  protected String getFileContent(long pTreeId, HttpServletRequest request) {
    Study study = ControllerUtil.findStudy(request, mStudyService);
    PhyloTree tree = getPhyloTreeService().findByID(pTreeId);
    tree = getPhyloTreeService().resurrect(tree);
    TreeBlock enclosingTreeBlock = getPhyloTreeService().resurrect(tree.getTreeBlock());
    TaxonLabelSet tls = getPhyloTreeService().resurrect(enclosingTreeBlock.getTaxonLabelSet());
    if ( getFormat(request) == FORMAT_NEXML || getFormat(request) == FORMAT_RDF ) {
View Full Code Here

Examples of org.cipres.treebase.domain.study.Study

    throws EmptyStudyException {   
    // TODO:       
    Map attribute = (Map) request.getSession().getAttribute(Constants.STUDY_MAP);
    Map<String, Object> map = attribute;
    Long id;
    Study study = null;
    ;

    if (map != null) {
      String action = (String) map.get("action");
View Full Code Here

Examples of org.cipres.treebase.domain.study.Study

    bindSession();
    if (studyId == null) {
      Set<TaxonLabelSet> result = new HashSet<TaxonLabelSet> ();
      return result;
    } else {
      Study s = getStudyHome().findPersistedObjectByID(Study.class, studyId);
      if (s == null) {
        System.err.println("No study with id=" + studyId);
        unbindSession();
        return null;
      }
View Full Code Here

Examples of org.cipres.treebase.domain.study.Study

    Analysis a1 = new Analysis();
    a1.setName("1 " + newName);
    Analysis a2 = new Analysis();
    a2.setName("2 " + newName);

    Study s = new Study();
    s.setName(newName);
    s.setStudyStatus(inprogress);
    s.setCitation(c);
    c.setStudy(s);
    s.addAnalysis(a1);
    s.addAnalysis(a2);

    TaxonLabel label = new TaxonLabel();
    label.setTaxonLabel(newName);
    label.setStudy(s);

    getStudyHome().store(label);
    getStudyHome().store(s);

    // force commit immeidately, important:
    setComplete();
    endTransaction();

    onSetUp();

    // Notes: this is important: why?? there are two copies of s in the same session.
    // how???
    s = (Study) hibernateTemplate.merge(s);

    Long studyID = s.getId();
    Long citationID = c.getId();
    logger.info("study created: " + s.getName() + "id = " + studyID);
    logger.info("citation created: " + c.getTitle() + "id = " + citationID);
    logger.info("analysis created: " + a1.getName() + "id = " + a1.getId());
    logger.info("analysis created: " + a2.getName() + "id = " + a2.getId());
    logger.info("taxonLabel created: " + label.getTaxonLabel() + "id = " + label.getId());

    // 2. verify
    String sqlStr = "select count(*) from Study where study_id=" + s.getId();
    int count = jdbcTemplate.queryForInt(sqlStr);
    assertTrue(count == 1);

    String taxonLabelsql = "select count(*) from taxonLabel where taxonLabel_id="
      + label.getId();
View Full Code Here

Examples of org.cipres.treebase.domain.study.Study

    StudyStatus inprogress = getStudyStatusHome().findStatusInProgress();

    Citation c = new ArticleCitation();
    c.setTitle(newName);

    Study s = new Study();
    s.setName(newName);
    s.setStudyStatus(inprogress);
    s.setCitation(c);
    c.setStudy(s);
    getStudyHome().store(s);

    // force commit immeidately, important:
    setComplete();
    endTransaction();

    Long studyID = s.getId();
    Long citationID = c.getId();
    logger.info("study created: " + s.getName() + "id = " + studyID);
    logger.info("citation created: " + c.getTitle() + "id = " + citationID);

    Analysis a1 = new Analysis();
    a1.setName("1 " + newName);
    Analysis a2 = new Analysis();
    a2.setName("2 " + newName);

    // NOTES: this will fail to add analysis to studyu!!
    // s.addAnalysis(a1);
    // s.addAnalysis(a2);

    Analysis updatedA1 = getFixture().update(a1);
    Analysis updatedA2 = getFixture().update(a2);

    s.addAnalysis(updatedA1);
    s.addAnalysis(updatedA2);
    Study updatedS = getFixture().update(s);

    // Note: a1.getID() and a2.getID() will return false.
    logger.info("analysis created: " + a1.getName() + "id = " + updatedA1.getId());
    logger.info("analysis created: " + a2.getName() + "id = " + updatedA2.getId());
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.