Package unbbayes.prs.mebn.ssbn

Examples of unbbayes.prs.mebn.ssbn.ContextNodeEvaluator


   */
  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>();
View Full Code Here

TOP

Related Classes of unbbayes.prs.mebn.ssbn.ContextNodeEvaluator

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.