[8780cbec] | 1 | package edu.stanford.peer.rbtm.engine; |
---|
| 2 | |
---|
| 3 | import java.util.*; |
---|
| 4 | |
---|
| 5 | import edu.stanford.peer.rbtm.credential.*; |
---|
| 6 | import edu.stanford.peer.rbtm.util.*; |
---|
| 7 | |
---|
| 8 | /** |
---|
| 9 | * The class AbstractProofGraph represents a proof graph. It <OL> |
---|
| 10 | * <LI> makes sure that the same node is not added more than once |
---|
| 11 | * <LI> makes sure that the same edge is not added more than once </OL> |
---|
| 12 | * If one wants to implement priority queue, one should extend this |
---|
| 13 | * class. |
---|
| 14 | */ |
---|
| 15 | public interface ProofGraph extends SolutionFilter |
---|
| 16 | { |
---|
| 17 | /** Add a node into the worklist for forward processing */ |
---|
| 18 | ProofNode addForwardNode(EntityExpression roleExp); |
---|
| 19 | |
---|
| 20 | /** Add a node into the worklist for backward processing */ |
---|
| 21 | ProofNode addBackwardNode (EntityExpression roleExp); |
---|
| 22 | |
---|
| 23 | /** Search graph for credentials based on their right hand side (RHS) */ |
---|
| 24 | Iterator findCredentialsBySubject(EntityExpression re); |
---|
| 25 | |
---|
| 26 | /** Search graph for credentials w/subject intersection matching part */ |
---|
| 27 | Iterator findCredentialsByPartialSubject(EntityExpression part); |
---|
| 28 | |
---|
| 29 | /** Search graph for credentials based on their left hand side (LHS) */ |
---|
| 30 | Iterator findCredentialsDefiningRole(Role r); |
---|
| 31 | |
---|
| 32 | /** Find all the members of a role expression */ |
---|
| 33 | ResultEvidenceMap backwardSearch(EntityExpression roleExp); |
---|
| 34 | |
---|
| 35 | /** Find all the roles to which a role expression belongs */ |
---|
| 36 | ResultEvidenceMap forwardSearch(EntityExpression roleExp); |
---|
| 37 | |
---|
| 38 | /** Public accessor method for the predicate if any for this graph. */ |
---|
| 39 | Predicate getPredicate(); |
---|
| 40 | |
---|
| 41 | /** Utility function for composing a credential chain */ |
---|
| 42 | public HashSet getChain(EntityExpression source, EntityExpression target); |
---|
| 43 | |
---|
| 44 | } |
---|