source: fedd/abac-src/ttg/process/IntersectionEdge.java @ b770aa0

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

ABAC sources from Cobham

  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[8780cbec]1package com.nailabs.abac.process;
2
3import com.nailabs.abac.trust.*;
4import com.nailabs.abac.test.*;
5
6public class IntersectionEdge extends EdgeOperation {
7   
8    /** Jared: Added this method to make XML processing easier */
9    public IntersectionEdge() {
10        super();
11        type = new String("Intersection");
12    }
13
14    public IntersectionEdge(Goal parent, Goal child, ProcessingState state) {
15        super(parent, child, state, null);
16        //TBD: add extra type checking--verify child is a part of the and-ing
17        type = new String("Intersection");
18        Debug.debug("intersection", toString());
19    }
20
21    public void performAdditional(TTG graph) {
22        IntersectionTTNode parent = 
23            (IntersectionTTNode)graph.getNodeByHash(getParent());
24        TargetNode child = (TargetNode)graph.getNodeByHash(getChild());
25
26        parent.addIntersectionChild(child);
27        child.addImplicationParent(parent);
28    }
29   
30    public void performNewAdditional(TTG graph) {
31        TargetNode child = (TargetNode)graph.getNodeByHash(getChild());
32        if(child == null) {
33            Debug.debug("intersection", "child = " + child);
34            child = (TargetNode)TTGNode.createNode(getChild());
35            child.getProcessingState().update(state);
36            graph.putNodeByHash(child);
37        }
38        performAdditional(graph); 
39    }
40
41    public String toString() {
42        StringBuffer buff = new StringBuffer("[");
43        buff.append(type).append("Edge ");
44        buff.append(getParent()).append(" <<=== ");
45        buff.append(getChild()).append(", state = ");
46        buff.append(state).append("]");
47        return buff.toString();
48    }
49
50}
Note: See TracBrowser for help on using the repository browser.