version-1.30
Last change
on this file since 4adc697 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
|
Line | |
---|
1 | package com.nailabs.abac.process; |
---|
2 | |
---|
3 | import com.nailabs.abac.trust.*; |
---|
4 | import com.nailabs.abac.test.*; |
---|
5 | import java.util.*; |
---|
6 | |
---|
7 | /** |
---|
8 | * A linking implication edge represents an edge in a trust target graph |
---|
9 | * between a <CODE>LinkTTNode</CODE> and a <CODE>LinkingGoalNode</CODE> |
---|
10 | */ |
---|
11 | public class LinkingMonitorEdge extends EdgeOperation { |
---|
12 | /** Default constructor (used for TNT integration).*/ |
---|
13 | public LinkingMonitorEdge() { |
---|
14 | super(); |
---|
15 | type = new String("LinkingMonitor"); |
---|
16 | } |
---|
17 | |
---|
18 | /** Parsed element constructor */ |
---|
19 | public LinkingMonitorEdge(TrustTarget parent, LinkingGoal child, |
---|
20 | ProcessingState state) { |
---|
21 | super(parent, child, state, null); |
---|
22 | type = "LinkingMonitor"; |
---|
23 | } |
---|
24 | |
---|
25 | public void performAdditional(TTG graph) { |
---|
26 | LinkTTNode parent = (LinkTTNode)graph.getNodeByHash(getParent()); |
---|
27 | LinkingGoalNode child = |
---|
28 | (LinkingGoalNode)graph.getNodeByHash(getChild()); |
---|
29 | |
---|
30 | parent.addChild(child); |
---|
31 | child.addParent(parent); |
---|
32 | } |
---|
33 | |
---|
34 | public void performNewAdditional(TTG graph) { |
---|
35 | LinkingGoalNode child = |
---|
36 | (LinkingGoalNode)graph.getNodeByHash(getChild()); |
---|
37 | if(child == null) { |
---|
38 | child = (LinkingGoalNode)TTGNode.createNode(getChild()); |
---|
39 | child.getProcessingState().update(state); |
---|
40 | graph.putNodeByHash(child); |
---|
41 | } |
---|
42 | performAdditional(graph); |
---|
43 | } |
---|
44 | |
---|
45 | } |
---|
46 | |
---|
47 | |
---|
48 | |
---|
49 | |
---|
50 | |
---|
Note: See
TracBrowser
for help on using the repository browser.