axis_examplecompt_changesinfo-opsversion-2.00version-3.01version-3.02
Last change
on this file since df783c1 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
|
Rev | Line | |
---|
[8780cbec] | 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 soilution edge represents an edge in a trust target graph |
---|
| 9 | * between a <CODE>LinkingGoalNode</CODE> and it's solution children. |
---|
| 10 | */ |
---|
| 11 | public 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.