Package eu.planets_project.tb.api.persistency

Examples of eu.planets_project.tb.api.persistency.ExperimentPersistencyRemote


        ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
        BatchExecutionRecordImpl batch = expBean.getExperiment().getExperimentExecutable().getBatchExecutionRecords().iterator().next();
        ExecutionRecordImpl run = batch.getRuns().iterator().next();
       
        // Remove the Event itself:
        ExperimentPersistencyRemote db = tbm.getExperimentPersistencyRemote();
        setTargetInvocation(null);
        setTargetExecution(null);
        db.removeMeasurementEvent(this);
        log.info("deleteMeasurementEvent: Removed the event, now updating the experiment");
       
        // And clip it out of the parent:
        MeasurementEventImpl toRemove = null;
        for( MeasurementEventImpl fme : run.getMeasurementEvents() ) {
View Full Code Here


     *
     */
    public void deleteMeasurement() {
        if( this.getEvent() != null && this.measurementRecordId != -1 ) {
            TestbedManagerImpl tbm = (TestbedManagerImpl) JSFUtil.getManagedObject("TestbedManager");
            ExperimentPersistencyRemote db = tbm.getExperimentPersistencyRemote();
            // Remove the record.
            MeasurementImpl m = null;
            log.info("For measurment "+this.measurementRecordId );
            for( MeasurementImpl fm : getEvent().getMeasurements() ) {
                log.info("Looking at Measurement "+fm.getId());
                if( fm.getId() == this.measurementRecordId )
                    m = fm;
            }
            this.getEvent().getMeasurements().remove(m);
            db.removeMeasurement(m);
            // Now update experiment.
            ExperimentInspector.persistExperiment();
        }
    }
View Full Code Here

     */
    public void setExperimentId(String experimentId) {
        this.experimentId = experimentId;
        log.info("Setting eid = "+experimentId);
        // Lookup experiment and add
        ExperimentPersistencyRemote edao = ExperimentPersistencyImpl.getInstance();
        this.experiment = edao.findExperiment( Long.parseLong( this.experimentId ) );
        this.vrb = null;
    }
View Full Code Here

        if( expBean != null ) {
            log.info("Experiment Bean found: "+expBean.getEname());
        }
       
        // Load it:
        ExperimentPersistencyRemote edao = ExperimentPersistencyImpl.getInstance();
        if( edao != null && eid != null ) {
            exp = edao.findExperiment(eid);
        }

        // Also look for an experiment bean in the session:
        FacesContext ctx = FacesContext.getCurrentInstance();
        ExperimentBean sessExpBean = (ExperimentBean) ctx.getExternalContext().getSessionMap().get(ExperimentInspector.EXP_BEAN_IN_SESSION_DEPRECATED);
View Full Code Here

     * Used to ensure that the ExperimentBean reflects changes made in the background.
     */
    private void refreshExperimentBean() {
          TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
          ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
          ExperimentPersistencyRemote epr = testbedMan.getExperimentPersistencyRemote();
          Experiment exp = epr.findExperiment(expBean.getExperiment().getEntityID());
          expBean.setExperiment(exp);
          // Only updates the exp itself, as only the BG data might have changed.
          //ExperimentInspector.putExperimentIntoSessionExperimentBean( exp );
    }
View Full Code Here

        Writer out = new BufferedWriter( new OutputStreamWriter( os, "UTF-8" ) );
        CSVWriter writer = new CSVWriter(out);

        long id = Long.parseLong(expId);

        ExperimentPersistencyRemote edao = ExperimentPersistencyImpl.getInstance();
        Experiment exp = edao.findExperiment(id);

        // The string array
        String sa[] = new String[8];
        sa[0] = "Name";
        sa[1] = "Run #";
View Full Code Here

        Writer out = new BufferedWriter( new OutputStreamWriter( os, "UTF-8" ) );
        CSVWriter writer = new CSVWriter(out);

        long id = Long.parseLong(expId);

        ExperimentPersistencyRemote edao = ExperimentPersistencyImpl.getInstance();
        Experiment exp = edao.findExperiment(id);

        // The string array
        String sa[] = new String[8];
        sa[0] = "Name";
        sa[1] = "Digital Object #";
View Full Code Here

public class ExperimentExecutionCharts {
    /** */
    private static Log log = LogFactory.getLog(ExperimentExecutionCharts.class);

    public JFreeChart createXYChart(String expId) {
        ExperimentPersistencyRemote edao = ExperimentPersistencyImpl.getInstance();
        long eid = Long.parseLong(expId);
        log.info("Building experiment chart for eid = "+eid);
        Experiment exp = edao.findExperiment(eid);

        final DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        final String expName = exp.getExperimentSetup().getBasicProperties().getExperimentName();
        List<Boolean> success = new ArrayList<Boolean>();

View Full Code Here

   * to performance reasons within this class.
   * @return
   */
  private HashMap<Long,Experiment> queryAllExperiments(){
    HashMap<Long,Experiment> hmRet = new HashMap<Long,Experiment>();
    ExperimentPersistencyRemote dao_r = ExperimentPersistencyImpl.getInstance();
    List<Experiment> list = dao_r.queryAllExperiments();
    Iterator<Experiment> itList = list.iterator();
    while(itList.hasNext()){
      Experiment exp = itList.next();
      hmRet.put(exp.getEntityID(), exp);
    }
View Full Code Here

  /* (non-Javadoc)
   * @see eu.planets_project.tb.api.TestbedManager#isExperimentNameUnique(java.lang.String)
   */
  public boolean isExperimentNameUnique(String expName) {
    ExperimentPersistencyRemote dao_r = ExperimentPersistencyImpl.getInstance();
    return dao_r.queryIsExperimentNameUnique(expName);
  }
View Full Code Here

TOP

Related Classes of eu.planets_project.tb.api.persistency.ExperimentPersistencyRemote

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.