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