source: fedd/abac-src/rbtm/engine/EntityProofNode.java @ 3c20a31

axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change on this file since 3c20a31 was 8780cbec, checked in by Jay Jacobs <Jay.Jacobs@…>, 15 years ago

ABAC sources from Cobham

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[8780cbec]1package edu.stanford.peer.rbtm.engine;
2
3import java.util.*;
4import edu.stanford.peer.rbtm.credential.*;
5/**
6 * A proof node which respresents an entity in the credential graph.
7 */
8public class EntityProofNode extends AbstractProofNode
9{
10        /**
11         * A map for managing all the partial solutions per intersection that arrive
12         */
13   static protected PartialSolutionMap partialSolutions = 
14                 new PartialSolutionMap();
15
16        /**
17         * Default constructor
18         */
19   protected EntityProofNode(ProofGraph graph, Entity re, int trackType) {
20                 super(graph, re, trackType);
21        }
22       
23        public void additionalBackwardProcess() {
24            //backwardSolutionAdded(this, getRoleExp());
25        }
26
27        public void additionalForwardProcess() {
28           
29        }
30         
31        /**
32         * Adds a forward solution but propagating the solution backwards along
33         * the credential chain. If s is a partial solution and all k pieces have
34         * arrived, then add edge from this node to the intersection.
35         */
36        public void forwardSolutionAdded(ProofNode s, ForwardSolution r) {
37                 super.forwardSolutionAdded(s, r);
38                 EntityExpression expr = s.getRoleExp();
39                 System.out.println("Additional forward processing on " + getRoleExp() +
40                                                                  " where s = " + expr);
41                 Iterator iCreds = getGraph().findCredentialsByPartialSubject(expr);
42                 while(iCreds.hasNext()) { // if s is partial solution of intersection(s)
43                          StaticCredential credential = (StaticCredential) iCreds.next();
44                          Intersection i = (Intersection)credential.getSubject();                               
45                          System.out.println(getRoleExp() + " matches partial solution " + i);
46                          if(partialSolutions.addPartialSolution(i, expr)) {
47                                        ProofNode node = getGraph().addForwardNode(i);
48                                        node.addParent(node, r);
49                          }
50                 } 
51        }
52
53         
54}   
55
56
Note: See TracBrowser for help on using the repository browser.