*/
public SimpleContextNodeFatherSSBNNode evaluateUncertaintyReferenceCase(MFragInstance mFragInstance,
ContextNode contextNode, OrdinaryVariable ovFault) throws ImplementationRestrictionException{
List<OVInstance> ovInstanceList = new ArrayList<OVInstance>();
ContextNodeEvaluator avaliator = new ContextNodeEvaluator(kb);
//1 Evaluate if the context node attend to restrictions and fill the ovinstancelist
if(!avaliator.testContextNodeFormatRestriction(contextNode)){
throw new ImplementationRestrictionException(
ImplementationRestrictionException.INVALID_CTXT_NODE_FORMULA);
};
Collection<OrdinaryVariable> contextOrdinaryVariableList = contextNode.getVariableList();
for(OrdinaryVariable ov: contextOrdinaryVariableList){
if(!ov.equals(ovFault)){
List<OVInstance> ovInstanceForOvList = mFragInstance.getOVInstanceListForOrdinaryVariable(ov);
if(ovInstanceForOvList.size() > 1){
throw new ImplementationRestrictionException(
ImplementationRestrictionException.ONLY_ONE_OVINSTANCE_FOR_OV);
}else{
ovInstanceList.add(ovInstanceForOvList.get(0));
}
}
}
//2 Recover alll the entites of the specifc type
List<String> result = null;
List<LiteralEntityInstance> list = avaliator.searchEntitiesForOrdinaryVariable(ovFault);
if((list == null)||(list.size()==0)){
return null;
}else{
result = new ArrayList<String>();