}
//2. build the results on a per property basis
for(String propertyID : propertyIDs){
MeasurementPropertyResultsBean resBean = new MeasurementPropertyResultsBean(inputDigoRef, propertyID,this.getAllRunDates());
//2a. now iterate over the results and filter out the relevant ones for this property
for(BatchExecutionRecordImpl batchr : this.getExperiment().getExperimentExecutable().getBatchExecutionRecords()){
Calendar runDate = batchr.getEndDate();
for(ExecutionRecordImpl execRec : batchr.getRuns()){
//filter out by the selected inputDigitalObject
if(execRec.getDigitalObjectReferenceCopy().equals(inputDigoRef)){
for(ExecutionStageRecordImpl execStageRec : execRec.getStages()){
//filter out the selected stage
if(execStageRec.getStage().equals(stageName)){
List<MeasurementImpl> mRecords=null;
if(manualProps){
//fetch the manual properties
mRecords = execStageRec.getManualMeasurements();
}
else{
//fetch the automatically measured properties
mRecords = execStageRec.getMeasurements();
}
for(MeasurementImpl mr : mRecords){
if(mr.getIdentifier().equals(propertyID)){
//log.info("adding "+inputDigoRef+ " "+runDate.getTimeInMillis()+" "+execStageRec.getStage()+" "+mr.getIdentifier() +" "+ mr.getValue());
//found the measurementRecord for this property in this run
resBean.addResult(runDate, mr);
}
}
}
}
}
}
}
//finally add the MeasurementInfo data (name, description, for the propertyID etc.
if(manualProps){
OntologyProperty ontop = OntologyHandlerImpl.getInstance().getProperty(propertyID);
//create a MeasurementImpl from the OntologyProperty
try {
MeasurementImpl measurementinfo = OntoPropertyUtil.createMeasurementFromOntologyProperty(ontop);
resBean.setMeasurementInfo(measurementinfo);
} catch (Exception e) {
log.debug("Could not retrieve Ontology Property information for propertyID: "+propertyID);
}
}
else{