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 | */ |
---|
10 | public interface ProofNode extends BackwardSolutionListener, ForwardSolutionListener |
---|
11 | { |
---|
12 | EntityExpression getRoleExp(); |
---|
13 | |
---|
14 | void addBackwardListener(BackwardSolutionListener sl); |
---|
15 | |
---|
16 | /** |
---|
17 | * Process this node for search in the backward direction. The |
---|
18 | * implementation of this method should find all nodes that can reach |
---|
19 | * this node directly and do appropriate things. |
---|
20 | */ |
---|
21 | void backwardProcess(); |
---|
22 | |
---|
23 | void invalidateBackward(); |
---|
24 | |
---|
25 | void addForwardListener(ForwardSolutionListener sl); |
---|
26 | |
---|
27 | void forwardProcess(); |
---|
28 | |
---|
29 | void invalidateForward(); |
---|
30 | |
---|
31 | /** |
---|
32 | * add a node as a parent to this node |
---|
33 | * @param node: the parent node |
---|
34 | */ |
---|
35 | void addParent(ProofNode node, Object evidence); |
---|
36 | |
---|
37 | void addChild(ProofNode node, Object evidence); |
---|
38 | |
---|
39 | ResultEvidenceMap getForwardSolutions(); |
---|
40 | |
---|
41 | ResultEvidenceMap getBackwardSolutions(); |
---|
42 | |
---|
43 | /** |
---|
44 | * Enable this node for backward searching, it then should store all |
---|
45 | * backward solutions (entities that are member of this node). |
---|
46 | */ |
---|
47 | // void enableAllBackwardGoals(); |
---|
48 | |
---|
49 | /** |
---|
50 | * If one only wants to know whether this node has some particular |
---|
51 | * backward solutions, and doesn't care about others, then one can use |
---|
52 | * this call to tell this proof node. It might improve efficiency in |
---|
53 | * bi-direction search. |
---|
54 | */ |
---|
55 | // void enableBackwardGoal(EntityExpression g); |
---|
56 | |
---|
57 | // void enableAllForwardGoals(); |
---|
58 | // void enableForwardGoal(EntityExpression g); |
---|
59 | |
---|
60 | // boolean hasParent(ProofNode node); |
---|
61 | // boolean hasChild(ProofNode node); |
---|
62 | |
---|
63 | } // End of class ProofNode |
---|
64 | |
---|