Package eu.planets_project.tb.impl.model.measure

Examples of eu.planets_project.tb.impl.model.measure.MeasurementImpl


    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;
View Full Code Here


     * @param valueChangedEvent
     */
    public void handleObsSelectChangeListener(ValueChangeEvent valueChangedEvent) {
        log.info("Handling event in handleObsSelectChangeListener.");
       
        MeasurementImpl targetBean = (MeasurementImpl) this.getObsTable().getRowData();
       
        ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
        Vector<String> props = expBean.getExperiment().getExperimentExecutable().getProperties();
        if( props.contains(targetBean.getIdentifier().toString()) ) {
            props.remove(targetBean.getIdentifier().toString());
            log.info("Removed: "+targetBean.getIdentifier());
        } else {
            props.add(targetBean.getIdentifier().toString());
            log.info("Added: "+targetBean.getIdentifier());
        }
       
    }
View Full Code Here

        if( props.contains(targetBean.getIdentifier().toString()) ) {
            //remove from the model
          expBean.getExperiment().getExperimentExecutable().removeManualProperty(stageName, targetBean.getIdentifier().toString());
            //remove from the bean
          exptype.getManualObservables().get(stageName);
          MeasurementImpl removeMeasurement=null;
          for(MeasurementImpl m : exptype.getManualObservables().get(stageName)){
            if(m.getIdentifier().toString().equals(targetBean.getIdentifier().toString())){
              removeMeasurement = m;   
            }
          }
View Full Code Here

          if(stagePropsSel.get(pURI) !=null){
            String val = stagePropsSel.get(pURI).get(stageb.getName());
            if(val!=null){
           
              //create a MeasurementImpl from the OntologyProperty
              MeasurementImpl measurement = OntoPropertyUtil.createMeasurementFromOntologyProperty(prop);
             
              //check if this property was already added
              boolean bContained = false;
              MeasurementImpl measurementContained=null;
              List<MeasurementImpl> lExistingMeasurements = props.get(stageb.getName());
              for(MeasurementImpl m : lExistingMeasurements){
                if(m.getIdentifier().equals(measurement.getIdentifier())){
                  bContained = true;
                  measurementContained = m;
View Full Code Here

                        log.info("updating measurement for input: "+digObjectRefCopy+" time: "+runEndDate.getTimeInMillis()+" stage: "+stageName+" propID: "+propertyID+" value: "+value);
                     
                    }
                    if(!bFound){
                      //no MeasurementRecord exists -> create a new one
                      MeasurementImpl mRec = new MeasurementImpl(URI.create(propertyID), value);
                      execStageRec.addManualMeasurement(mRec);
                      log.info("created new measurement for input: "+digObjectRefCopy+" time: "+runEndDate.getTimeInMillis()+" stage: "+stageName+" propID: "+propertyID+" value: "+value);
                    }
                  }
                }
View Full Code Here

            for(String propURI : ontoOps.get(stageName)){
              //query the authority to get the OntologyProperty by URI
              OntologyProperty ontoProp = ontohandler.getProperty(propURI);
             
          try {
            MeasurementImpl m = OntoPropertyUtil.createMeasurementFromOntologyProperty(ontoProp);
            l.add(m);
          } catch (Exception e) {
            log.error("error building Measurement from OntologyProperty: "+ontoProp + " :: " + e);
          }
            }
View Full Code Here

        target.setType(TargetType.DIGITAL_OBJECT);
        target.getDigitalObjects().add(0, dobURI1);
       
        //add the extracted information
    for(String value : extractedInformation){
        MeasurementImpl m = new MeasurementImpl();
        String actionIdentifier = WorkflowResultItem.SERVICE_ACTION_IDENTIFICATION;
          Property p = new Property.Builder(helperCreatePropertyURI(actionIdentifier)).value(value).description("Planets "+actionIdentifier+" Service Operation Result").name(actionIdentifier).build();
        m.setProperty(p);
          //m.setMeasurementType( MeasurementType.DOB);
          m.setTarget(target);
          execStageRec.addMeasurement(m);
      }
  }
View Full Code Here

        URI execStartURI = URI.create("planets://workflow/service/execution/start");
        URI execEndURI = URI.create("planets://workflow/service/execution/end");
        Property pStart = new Property.Builder(execStartURI).value(start+"").description("Planets Service Wrapper Execution start-time measured in milli-seconds").name("service execution start time").build();
        Property pEnd = new Property.Builder(execEndURI).value(end+"").description("Planets Service Wrapper Execution end-time measured in milli-seconds").name("service execution end time").build();
      
        MeasurementImpl mStart = new MeasurementImpl();
        //mStart.setMeasurementType( MeasurementType.SERVICE); 
        mStart.setProperty(pStart);
        mStart.setTarget(target);
        execStageRec.addMeasurement(mStart);
       
        MeasurementImpl mEnd = new MeasurementImpl();
        //mEnd.setMeasurementType( MeasurementType.SERVICE); 
        mEnd.setProperty(pEnd);
        mEnd.setTarget(target);
        execStageRec.addMeasurement(mEnd);
  }
View Full Code Here

            aboutObjects.add(outputDigoRef);
          if(aboutObjects.size()>0)
            target.setDigitalObjects(aboutObjects);
         
      for(Property p : wfResItem.getServiceReport().getProperties()){
        MeasurementImpl m = new MeasurementImpl();
            //m.setMeasurementType( MeasurementType.SERVICE);
            m.setProperty(p);
            m.setTarget(target);
            execStageRec.addMeasurement(m);
      }
    }
  }
View Full Code Here

        if(aboutObjects.size()>0)
          target.setDigitalObjects(aboutObjects);
     
      //add the extracted information
    for(String value : extractedInformation){
        MeasurementImpl m = new MeasurementImpl();
        String actionIdentifier = WorkflowResultItem.SERVICE_ACTION_COMPARE;
          Property p = new Property.Builder(helperCreatePropertyURI(actionIdentifier)).value(value).description("Planets "+actionIdentifier+" Service Operation Result").name(actionIdentifier).build();
        m.setProperty(p);
          //m.setMeasurementType( MeasurementType.DOB);
          m.setTarget(target);
          execStageRec.addMeasurement(m);
      }
    }
View Full Code Here

TOP

Related Classes of eu.planets_project.tb.impl.model.measure.MeasurementImpl

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.