1 package org.andromda.metafacades.uml14;
2
3 import org.omg.uml.behavioralelements.statemachines.Pseudostate;
4 import org.omg.uml.foundation.datatypes.PseudostateKindEnum;
5
6
7
8
9
10 public class PseudostateFacadeLogicImpl
11 extends PseudostateFacadeLogic
12 {
13 private static final long serialVersionUID = 34L;
14
15
16
17
18 public PseudostateFacadeLogicImpl(
19 Pseudostate metaObject,
20 String context)
21 {
22 super(metaObject, context);
23 }
24
25
26
27
28 @Override
29 protected boolean handleIsChoice()
30 {
31 return PseudostateKindEnum.PK_CHOICE.equals(metaObject.getKind());
32 }
33
34
35
36
37 @Override
38 protected boolean handleIsInitialState()
39 {
40 return PseudostateKindEnum.PK_INITIAL.equals(metaObject.getKind());
41 }
42
43
44
45
46 @Override
47 protected boolean handleIsJoin()
48 {
49 return PseudostateKindEnum.PK_JOIN.equals(metaObject.getKind());
50 }
51
52
53
54
55 @Override
56 protected boolean handleIsFork()
57 {
58 return PseudostateKindEnum.PK_FORK.equals(metaObject.getKind());
59 }
60
61
62
63
64 @Override
65 protected boolean handleIsJunction()
66 {
67 return PseudostateKindEnum.PK_JUNCTION.equals(metaObject.getKind());
68 }
69
70
71
72
73 @Override
74 protected boolean handleIsDecisionPoint()
75 {
76 return (this.isChoice() || this.isJunction()) && metaObject.getOutgoing().size() > 1;
77 }
78
79
80
81
82 @Override
83 protected boolean handleIsMergePoint()
84 {
85 return (this.isChoice() || this.isJunction()) && metaObject.getIncoming().size() > 1;
86 }
87
88
89
90
91 @Override
92 protected boolean handleIsDeepHistory()
93 {
94 return PseudostateKindEnum.PK_DEEP_HISTORY.equals(metaObject.getKind());
95 }
96
97
98
99
100 @Override
101 protected boolean handleIsShallowHistory()
102 {
103 return PseudostateKindEnum.PK_SHALLOW_HISTORY.equals(metaObject.getKind());
104 }
105
106
107
108
109 @Override
110 protected boolean handleIsSplit()
111 {
112 return (this.isJoin() || this.isFork()) && metaObject.getOutgoing().size() > 1;
113 }
114
115
116
117
118 @Override
119 protected boolean handleIsCollect()
120 {
121 return (this.isJoin() || this.isFork()) && metaObject.getIncoming().size() > 1;
122 }
123
124
125
126
127 @Override
128 public Object handleGetValidationOwner()
129 {
130 return this.getStateMachine();
131 }
132 }