return(this.getResultFromCache(f1, f2));
}
//the execution results are packed within this executable
//please note this mockup is not using the concept of the TestbedServiceTemplate
EvaluationExecutable executable = new EvaluationExecutableImpl();
executable.setExecutionStartDate(new GregorianCalendar().getTimeInMillis());
executable.setExecutableInvoked(true);
executable.setExecutionCompleted(false);
try{
//step1: identify using Pronom;
String[] sPronomIDs1 = runDroid(f1);
String[] sPronomIDs2 = runDroid(f2);
//if-else logic - linking pronom results as input for xcdl extraction
@SuppressWarnings("unused")
supportedTypes typeF1,typeF2;
typeF1 = getType(sPronomIDs1);
typeF2 = getType(sPronomIDs2);
//step2: extract the xcdl descriptions
String XCDL1 = runXCDLExtractor(f1 /*, typeF1.xcel()*/);
String XCDL2 = runXCDLExtractor(f2 /*, typeF2.xcel()*/);
//step3: run the XCDL comparison
String result = runXCDLComparator(XCDL1, XCDL2);
executable.setXCDLForSource(XCDL1);
executable.setXCDLForTarget(XCDL2);
executable.setXCDLsComparisonResult(result);
executable.setExecutionSuccess(true);
}catch(Exception e){
executable.setExecutionSuccess(false);
}
//End Workflow; write back the results into the executable
executable.setExecutionEndDate(new GregorianCalendar().getTimeInMillis());
executable.setExecutionCompleted(true);
//add the result to the cache
this.addResultToCache(executable, f1, f2);
return executable;