Package ca.ucalgary.ispia.rebac.impl

Examples of ca.ucalgary.ispia.rebac.impl.ConjunctionImpl


    }
   
    else if (tPolicy instanceof ConjunctionImpl){
      // Already primitive. Recurse on contained policies.
     
      ConjunctionImpl temp = (ConjunctionImpl) tPolicy;
      // Get contained fields
      Policy tempA = temp.getPolicyA();
      Policy tempB = temp.getPolicyB();
      // Translate contained fields
      tempA = translate(tempA);
      tempB = translate(tempB);
      // Create translated policy
      translatedPolicy = new ConjunctionImpl(tempA, tempB);
    }
   
    else if (tPolicy instanceof DisjunctionImpl){
      // Disjunction(policyA, policyB) =
      //  Negation(Conjunction((Negation(policyA)), (Negation(policyB))))
     
      DisjunctionImpl temp = (DisjunctionImpl) tPolicy;
      // Get contained fields
      Policy tempA = temp.getPolicyA();
      Policy tempB = temp.getPolicyB();
      // Translate contained policies
      tempA = new NegationImpl (translate(tempA));
      tempB = new NegationImpl (translate(tempB));
      // Create translated policy
      Policy tempC = new ConjunctionImpl(tempA, tempB);
      translatedPolicy = new NegationImpl (tempC);
     
    }
   
    else if (tPolicy instanceof BoxImpl){
View Full Code Here


      NegationImpl temp = (NegationImpl) policy;
      findFreeVars(temp.getPolicy(), free_vars);
    }
   
    else if (policy instanceof ConjunctionImpl){
      ConjunctionImpl temp = (ConjunctionImpl) policy;
     
      Set temp_setA = findFreeVars(temp.getPolicyA(), new HashSet<Object>());
      Set temp_setB = findFreeVars(temp.getPolicyB(), new HashSet<Object>());
      free_vars.addAll(temp_setA);
      free_vars.addAll(temp_setB);
    }
   
    else if (policy instanceof DisjunctionImpl){
      DisjunctionImpl temp = (DisjunctionImpl) policy;
     
      Set temp_setA = findFreeVars(temp.getPolicyA(), new HashSet<Object>());
      Set temp_setB = findFreeVars(temp.getPolicyB(), new HashSet<Object>());
      free_vars.addAll(temp_setA);
      free_vars.addAll(temp_setB);
    }
   
    else if (policy instanceof BoxImpl){
      BoxImpl temp = (BoxImpl) policy;
      findFreeVars(temp.getPolicy(), free_vars);
    }
   
    else if (policy instanceof DiamondImpl){
      DiamondImpl temp = (DiamondImpl) policy;
      free_vars = findFreeVars(temp.getPolicy(), free_vars);
    }
   
    else if (policy instanceof BindImpl){
      BindImpl temp = (BindImpl) policy;
      findFreeVars(temp.getPolicy(), free_vars);
      free_vars.remove(temp.getVariable());
    }
   
    else if (policy instanceof AtImpl){
      AtImpl temp = (AtImpl) policy;
      findFreeVars(temp.getPolicy(), free_vars);
      free_vars.add(temp.getVariable());
    }
    return free_vars;
  }
View Full Code Here

     
      else if (tPolicy instanceof ConjunctionImpl){
        // Conjunction(policyA, policyB) =
        //            Negation(Disjunction((Negation(policyA)), (Negation(policyB))))
       
        ConjunctionImpl temp = (ConjunctionImpl) tPolicy;
        // Get contained fields
        Policy tempA = temp.policyA;
        Policy tempB = temp.policyB;
        // Translate contained policies
        tempA = new NegationImpl (translate(tempA));
View Full Code Here

        }
      }
     
      if (element.getNodeName().equals("and")){
        // If element represents "and" variant, then create new Conjunction object
        newPolicy = new ConjunctionImpl(policyA, policyB);
      }
      else {
        // Else element represents "or" variant, create new Disjunction object
        newPolicy = new DisjunctionImpl(policyA, policyB);
      }
View Full Code Here

      // Already primitive. Recurse on contained policies.

     

      ConjunctionImpl temp = (ConjunctionImpl) tPolicy;

      // Get contained fields

      Policy tempA = temp.getPolicyA();

      Policy tempB = temp.getPolicyB();

      // Translate contained fields

      tempA = translate(tempA);

      tempB = translate(tempB);

      // Create translated policy

      translatedPolicy = new ConjunctionImpl(tempA, tempB);

    }

   

    else if (tPolicy instanceof DisjunctionImpl){

      // Disjunction(policyA, policyB) =

      //  Negation(Conjunction((Negation(policyA)), (Negation(policyB))))

     

      DisjunctionImpl temp = (DisjunctionImpl) tPolicy;

      // Get contained fields

      Policy tempA = temp.getPolicyA();

      Policy tempB = temp.getPolicyB();

      // Translate contained policies

      tempA = new NegationImpl (translate(tempA));

      tempB = new NegationImpl (translate(tempB));

      // Create translated policy

      Policy tempC = new ConjunctionImpl(tempA, tempB);

      translatedPolicy = new NegationImpl (tempC);

     
View Full Code Here

   

    else if (policy instanceof ConjunctionImpl){

      ConjunctionImpl temp = (ConjunctionImpl) policy;

     

      Set temp_setA = findFreeVars(temp.getPolicyA(), new HashSet<Object>());

      Set temp_setB = findFreeVars(temp.getPolicyB(), new HashSet<Object>());

      free_vars.addAll(temp_setA);

      free_vars.addAll(temp_setB);

    }

   

    else if (policy instanceof DisjunctionImpl){

      DisjunctionImpl temp = (DisjunctionImpl) policy;

     

      Set temp_setA = findFreeVars(temp.getPolicyA(), new HashSet<Object>());

      Set temp_setB = findFreeVars(temp.getPolicyB(), new HashSet<Object>());

      free_vars.addAll(temp_setA);

      free_vars.addAll(temp_setB);

    }

   

    else if (policy instanceof BoxImpl){

      BoxImpl temp = (BoxImpl) policy;

      findFreeVars(temp.getPolicy(), free_vars);

    }

   

    else if (policy instanceof DiamondImpl){

      DiamondImpl temp = (DiamondImpl) policy;

      free_vars = findFreeVars(temp.getPolicy(), free_vars);

    }

   

    else if (policy instanceof BindImpl){

      BindImpl temp = (BindImpl) policy;

      findFreeVars(temp.getPolicy(), free_vars);

      free_vars.remove(temp.getVariable());

    }

   

    else if (policy instanceof AtImpl){

      AtImpl temp = (AtImpl) policy;

      findFreeVars(temp.getPolicy(), free_vars);

      free_vars.add(temp.getVariable());

    }

    return free_vars;
View Full Code Here

        }
      }
     
      if (element.getNodeName().equals("and")){
        // If element represents "and" variant, then create new Conjunction object
        newPolicy = new ConjunctionImpl(policyA, policyB);
      }
      else {
        // Else element represents "or" variant, create new Disjunction object
        newPolicy = new DisjunctionImpl(policyA, policyB);
      }
View Full Code Here

      // Already primitive. Recurse on contained policies.

     

      ConjunctionImpl temp = (ConjunctionImpl) tPolicy;

      // Get contained fields

      Policy tempA = temp.getPolicyA();

      Policy tempB = temp.getPolicyB();

      // Translate contained fields

      tempA = translate(tempA);

      tempB = translate(tempB);

      // Create translated policy

      translatedPolicy = new ConjunctionImpl(tempA, tempB);

    }

   

    else if (tPolicy instanceof DisjunctionImpl){

      // Disjunction(policyA, policyB) =

      //  Negation(Conjunction((Negation(policyA)), (Negation(policyB))))

     

      DisjunctionImpl temp = (DisjunctionImpl) tPolicy;

      // Get contained fields

      Policy tempA = temp.getPolicyA();

      Policy tempB = temp.getPolicyB();

      // Translate contained policies

      tempA = new NegationImpl (translate(tempA));

      tempB = new NegationImpl (translate(tempB));

      // Create translated policy

      Policy tempC = new ConjunctionImpl(tempA, tempB);

      translatedPolicy = new NegationImpl (tempC);

     
View Full Code Here

        }
      }
     
      if (element.getNodeName().equals("and")){
        // If element represents "and" variant, then create new Conjunction object
        newPolicy = new ConjunctionImpl(policyA, policyB);
      }
      else {
        // Else element represents "or" variant, create new Disjunction object
        newPolicy = new DisjunctionImpl(policyA, policyB);
      }
View Full Code Here

TOP

Related Classes of ca.ucalgary.ispia.rebac.impl.ConjunctionImpl

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.