01: package org.andromda.metafacades.uml14;
02:
03: import org.omg.uml.foundation.datatypes.PseudostateKindEnum;
04:
05: /**
06: * Metaclass facade implementation.
07: */
08: public class PseudostateFacadeLogicImpl extends PseudostateFacadeLogic {
09: public PseudostateFacadeLogicImpl(
10: org.omg.uml.behavioralelements.statemachines.Pseudostate metaObject,
11: String context) {
12: super (metaObject, context);
13: }
14:
15: protected boolean handleIsChoice() {
16: return PseudostateKindEnum.PK_CHOICE.equals(metaObject
17: .getKind());
18: }
19:
20: protected boolean handleIsInitialState() {
21: return PseudostateKindEnum.PK_INITIAL.equals(metaObject
22: .getKind());
23: }
24:
25: protected boolean handleIsJoin() {
26: return PseudostateKindEnum.PK_JOIN.equals(metaObject.getKind());
27: }
28:
29: protected boolean handleIsFork() {
30: return PseudostateKindEnum.PK_FORK.equals(metaObject.getKind());
31: }
32:
33: protected boolean handleIsJunction() {
34: return PseudostateKindEnum.PK_JUNCTION.equals(metaObject
35: .getKind());
36: }
37:
38: protected boolean handleIsDecisionPoint() {
39: return (this .isChoice() || this .isJunction())
40: && metaObject.getOutgoing().size() > 1;
41: }
42:
43: protected boolean handleIsMergePoint() {
44: return (this .isChoice() || this .isJunction())
45: && metaObject.getIncoming().size() > 1;
46: }
47:
48: protected boolean handleIsDeepHistory() {
49: return PseudostateKindEnum.PK_DEEP_HISTORY.equals(metaObject
50: .getKind());
51: }
52:
53: protected boolean handleIsShallowHistory() {
54: return PseudostateKindEnum.PK_SHALLOW_HISTORY.equals(metaObject
55: .getKind());
56: }
57:
58: protected boolean handleIsSplit() {
59: return (this .isJoin() || this .isFork())
60: && metaObject.getOutgoing().size() > 1;
61: }
62:
63: protected boolean handleIsCollect() {
64: return (this .isJoin() || this .isFork())
65: && metaObject.getIncoming().size() > 1;
66: }
67:
68: public Object getValidationOwner() {
69: return this.getStateMachine();
70: }
71: }
|