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