Package unbbayes.prs.mebn.ssbn.exception

Examples of unbbayes.prs.mebn.ssbn.exception.ImplementationRestrictionException


          contextParentsCount++;
          contextNodeFatherList.add(contextNodeFather);

          if(contextParentsCount > 1)  {
            //In this implementation, only one context node parent is accept
            throw new ImplementationRestrictionException(
                ImplementationRestrictionException.MORE_THAN_ONE_CTXT_NODE_SEARCH);
          }
        }else{
          //In this case the ov was solved using the IsA nodes.
        }
View Full Code Here


   
    //1) FIND THE ENTITY ORDEREABLE
    List<OrdinaryVariable> ovOrdereableList = residentNode.getOrdinaryVariablesOrdereables();
   
    if(ovOrdereableList.size() > 1){
      throw new ImplementationRestrictionException(
          ImplementationRestrictionException.MORE_THAN_ONE_ORDEREABLE_VARIABLE);
    }
   
    if(ovOrdereableList.size() < 1){
      throw new ImplementationRestrictionException(
          ImplementationRestrictionException.RV_NOT_RECURSIVE);
    }
   
    OrdinaryVariable ovOrdereable = ovOrdereableList.get(0); //Have only one element...
   
View Full Code Here

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

      List<SimpleContextNodeFatherSSBNNode> simpleContextNodeList =
        simple.getContextParents();
     
      if(simpleContextNodeList.size() > 0){
        if(simpleContextNodeList.size() > 1){
          throw new ImplementationRestrictionException(
              ImplementationRestrictionException.MORE_THAN_ONE_CTXT_NODE_SEARCH);
        }else{
          //We have only one context node father
          ContextNode contextNode = simpleContextNodeList.get(0).getContextNode();
          ContextFatherSSBNNode contextFather = mapContextNode.get(contextNode);
View Full Code Here

TOP

Related Classes of unbbayes.prs.mebn.ssbn.exception.ImplementationRestrictionException

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.