source: fedd/abac-src/ttg/process/LinkingSolutionEdge.java @ 7c9a0a4

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

ABAC sources from Cobham

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[8780cbec]1package com.nailabs.abac.process;
2
3import com.nailabs.abac.trust.*;
4import com.nailabs.abac.test.*;
5import java.util.*;
6
7/**
8 * A linking soilution edge represents an edge in a trust target graph
9 * between a <CODE>LinkingGoalNode</CODE> and it's solution children.
10 */
11public class LinkingSolutionEdge extends EdgeOperation {
12    /** Default constructor */   
13    public LinkingSolutionEdge() {
14        super();
15        type = new String("LinkingSolution");
16    }
17
18    /** Parsed element constructor */
19    public LinkingSolutionEdge(LinkingGoal parent, TrustTarget child, 
20                              ProcessingState state) {
21        super(parent, child, state, null);
22        type = "LinkingSolution";
23    }
24   
25    public void performAdditional(TTG graph) {
26        SimpleTTNode child = (SimpleTTNode)graph.getNodeByHash(getChild());
27        LinkingGoalNode parent = 
28            (LinkingGoalNode)graph.getNodeByHash(getParent());
29
30        parent.addChild(child);
31        child.addLinkingSolutionParent(parent);
32    }
33   
34    public void performNewAdditional(TTG graph) {
35        TargetNode child = (TargetNode)graph.getNodeByHash(getChild());
36        if(child == null) {
37            child = (TargetNode)TTGNode.createNode(getChild());
38            child.getProcessingState().update(state);
39            graph.putNodeByHash(child);
40        }
41        performAdditional(graph); 
42    }
43
44}
45
46
47
48
49
Note: See TracBrowser for help on using the repository browser.