Package eu.planets_project.tb.api.model

Examples of eu.planets_project.tb.api.model.ExperimentPhase


       
      String intensity = Integer.toString(exp.getExperimentSetup().getExperimentResources().getIntensity());
      if (intensity != null && intensity != "-1")
        this.intensity = intensity;
      // determine current Stage
      ExperimentPhase currPhaseObj = exp.getCurrentPhase();
      if (currPhaseObj != null) {
        String currPhase = currPhaseObj.getPhaseName();
        if (currPhase.equals(ExperimentPhase.PHASENAME_EXPERIMENTSETUP)) {
          this.currStage = exp.getExperimentSetup().getSubStage();
        } else if (currPhase.equals(ExperimentPhase.PHASENAME_EXPERIMENTAPPROVAL)) {
          this.currStage = ExperimentBean.PHASE_EXPERIMENTAPPROVAL;
        } else if (currPhase.equals(ExperimentPhase.PHASENAME_EXPERIMENTEXECUTION)) {
View Full Code Here


 
  public void testGetCurrentPhase(){
    Experiment test_exp = manager.getExperiment(this.expID1);

    //Test1:
    ExperimentPhase phase = test_exp.getCurrentPhase();
    assertNotNull(phase);
    assertEquals(Experiment.PHASE_EXPERIMENTSETUP, phase.getPhasePointer());
   
    //Test2:
    test_exp.getExperimentSetup().setState(Experiment.STATE_COMPLETED);
    test_exp.getExperimentApproval().setState(Experiment.STATE_IN_PROGRESS);
View Full Code Here

 
  public void testGetCurrentPhaseName(){
    Experiment test_exp = manager.getExperiment(this.expID1);

    //Test1:
    ExperimentPhase phase = test_exp.getCurrentPhase();   
    assertNotNull(phase);
    assertEquals(Experiment.PHASE_EXPERIMENTSETUP, phase.getPhasePointer());
   
    //Test2:
    test_exp.getExperimentSetup().setState(Experiment.STATE_COMPLETED);
    test_exp.getExperimentApproval().setState(Experiment.STATE_IN_PROGRESS);
    int iPhase = test_exp.getCurrentPhase().getPhasePointer();
View Full Code Here

  /* (non-Javadoc)
   * @see eu.planets_project.tb.api.model.Experiment#getCurrentPhase()
   */
  public ExperimentPhase getCurrentPhase() {
   
    ExperimentPhase ret = null;
    if(this.expSetup.getState() == ExperimentPhase.STATE_IN_PROGRESS)
      if(checkAllOtherStagesCompleted(0))
        ret = this.expSetup;
     
    if(this.expApproval.getState() == ExperimentPhase.STATE_IN_PROGRESS)
View Full Code Here

TOP

Related Classes of eu.planets_project.tb.api.model.ExperimentPhase

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.