Package eu.planets_project.tb.gui.backing

Examples of eu.planets_project.tb.gui.backing.ExperimentBean


      countEvaluationItems = 0;
      int countWeights = 0;
      int countWeightEvaluationItems = 0;
      countNotEvaluationItems = 0;
     
      ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
      Experiment exp = expBean.getExperiment();
     
      //iterate over all inputDigitalObjects
      for(DigitalObjectBean inputDigo : expBean.getExperimentInputDataValues()){
        for(EvaluationPropertyResultsBean evalPropResBean: expBean.getEvaluationPropertyResultsBeans(inputDigo.getDigitalObject())){
          if(evalPropResBean.getPropertyEvalValue()!=-1){
           
            String propertyID = evalPropResBean.getMeasurementPropertyID();
            //get the value
            Integer value = evalPropResBean.getPropertyEvalValue();
View Full Code Here


  private Double userRating = Double.valueOf(0)
    /**
     * takes a given experiment rating and stores it within the expeirment's user ratings
     */
    public void handleUserExperimentRating(){
       ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
         Experiment exp = expBean.getExperiment();
        
         //get the current logged-in user
         UserBean user = (UserBean)JSFUtil.getManagedObject("UserBean");
         exp.setUserRatingForExperiment(user.getUserid(), getUserExperimentRating());
         Double rating = exp.getUserRatingOfExperiment(user.getUserid());
View Full Code Here

    /**
     * Loads an existing experiment rating for the user at hand
     * @return
     */
    public int getUserExpRatingFromDB(){
       ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
         Experiment exp = expBean.getExperiment();
         //get the current logged-in user
         UserBean user = (UserBean)JSFUtil.getManagedObject("UserBean");
         return (int)Math.round(exp.getUserRatingOfExperiment(user.getUserid()));
    }
View Full Code Here

  public void setUserExperimentRating(Double rating) {
    this.userRating = rating;
  }
 
  public Experiment getExperimentAtHand(){
    ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
      return expBean.getExperiment();
  }
View Full Code Here

           
        }

        // Ensure the parameters are stored/remembered:
        if( ewfCache != null ) {
            ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
            try {
              if(ewfCache.getParameters().equals(expBean.getExperiment().getExperimentExecutable().getParameters())){
                //no update - don't call the time consuming ewfCache.setParameters
              }else{
                ewfCache.setParameters(expBean.getExperiment().getExperimentExecutable().getParameters());
              }
              
            } catch (Exception e) {
                //Version v1.0 - the ExperimentExecutable().getParameters() aren't any longer used! All Information is encoded in a WFConf object
              //TODO AL remove the Parameters from the ExperimentExecutable AND the ExpTypeBackingBean
View Full Code Here

     * since version 1.0
     * This method is used to persist the ExpTypeBean specific information within step2 'configure workflow'
     * of an experiment to the DB model.
     */
    public void saveExpTypeBean_Step2_WorkflowConfiguration_ToDBModel(){
    ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
        //store information in the db entities
    ExperimentExecutable expExecutable = expBean.getExperiment().getExperimentExecutable();
        //specify which batch processing system WEE or TB/Local we want to use for this experiment - default it's the old TB one.
        expExecutable.setBatchSystemIdentifier(BatchProcessor.BATCH_IDENTIFIER_TESTBED_LOCAL);
    }
View Full Code Here

   
    /**
     * @return the viewerService
     */
    public String getViewerService() {
        ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
        log.info("Got params: "+expBean.getExperiment().getExperimentExecutable().getParameters() );
        log.info("Got param: "+expBean.getExperiment().getExperimentExecutable().getParameters().get(ViewerWorkflow.PARAM_SERVICE) );
        return expBean.getExperiment().getExperimentExecutable().getParameters().get(ViewerWorkflow.PARAM_SERVICE);
    }
View Full Code Here

    /**
     * @param viewerService the viewerService to set
     */
    public void setViewerService(String viewerService) {
        log.info("Setting the Viewer service to: "+viewerService);
        ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
        expBean.getExperiment().getExperimentExecutable().getParameters().put(ViewerWorkflow.PARAM_SERVICE, viewerService);
        expBean.updateExperiment();
    }
View Full Code Here

    /* (non-Javadoc)
     * @see eu.planets_project.tb.gui.backing.exp.ExpTypeBackingBean#getManualObservables()
     */
    @Override
    public HashMap<String,List<MeasurementImpl>> getManualObservables() {
      ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
      if(manualObsCache==null||(cacheExperimentID != expBean.getExperiment().getEntityID())){
        cacheExperimentID = expBean.getExperiment().getEntityID();
       
          //query for properties that have been added from the Ontology
          HashMap<String,Vector<String>> ontoPropIDs = new HashMap<String, Vector<String>>();
          for(ExperimentStageBean stage : expBean.getStages()){
            ontoPropIDs.put(stage.getName(),expBean.getExperiment().getExperimentExecutable().getManualProperties(stage.getName()));
          }
         
          //this is the static list of manual properties - normally empty
          HashMap<String,List<MeasurementImpl>> staticWFobs = getWorkflow(AdminManagerImpl.EMULATE).getManualObservables();
         
View Full Code Here

   
    /**
     * @return
     */
    public List<CreateViewResultsForDO> getViewResults() {
        ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
        List<CreateViewResultsForDO> results = new Vector<CreateViewResultsForDO>();
        // Populate using the results:
        for( String file : expBean.getExperimentInputData().values() ) {
            CreateViewResultsForDO res = new CreateViewResultsForDO(file);
            results.add(res);
        }

        // Now return the results:
View Full Code Here

TOP

Related Classes of eu.planets_project.tb.gui.backing.ExperimentBean

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.