View Javadoc
1   package org.andromda.metafacades.emf.uml22;
2   
3   import java.util.Collection;
4   import org.eclipse.uml2.uml.Element;
5   import org.eclipse.uml2.uml.Region;
6   import org.eclipse.uml2.uml.StateMachine;
7   import org.eclipse.uml2.uml.Vertex;
8   
9   /**
10   * MetafacadeLogic implementation for
11   * org.andromda.metafacades.uml.PartitionFacade.
12   *
13   * @see org.andromda.metafacades.uml.PartitionFacade
14   */
15  public class PartitionFacadeLogicImpl
16      extends PartitionFacadeLogic
17  {
18      private static final long serialVersionUID = 34L;
19      /**
20       * @param metaObject
21       * @param context
22       */
23      public PartitionFacadeLogicImpl(
24          final Region metaObject,
25          final String context)
26      {
27          super(metaObject, context);
28      }
29  
30      /**
31       * @see org.andromda.metafacades.uml.PartitionFacade#getActivityGraph()
32       */
33      @Override
34      protected StateMachine handleGetActivityGraph()
35      {
36          final Element owner = this.metaObject.getOwner();
37          if (owner instanceof StateMachine)
38          {
39              return (StateMachine)owner;
40          }
41          return null;
42      }
43  
44      /**
45       * @see org.andromda.metafacades.uml.PartitionFacade#getVertices()
46       */
47      @Override
48      protected Collection<Vertex> handleGetVertices()
49      {
50          return this.metaObject.getSubvertices();
51      }
52  }