01: package org.andromda.metafacades.emf.uml2;
02:
03: import java.util.ArrayList;
04:
05: import org.eclipse.uml2.Element;
06: import org.eclipse.uml2.StateMachine;
07:
08: /**
09: * MetafacadeLogic implementation for
10: * org.andromda.metafacades.uml.StateVertexFacade.
11: *
12: * @see org.andromda.metafacades.uml.StateVertexFacade
13: */
14: public class StateVertexFacadeLogicImpl extends StateVertexFacadeLogic {
15: public StateVertexFacadeLogicImpl(
16: final org.eclipse.uml2.Vertex metaObject,
17: final String context) {
18: super (metaObject, context);
19: }
20:
21: /**
22: * @see org.andromda.metafacades.uml.StateVertexFacade#getOutgoing()
23: */
24: protected java.util.Collection handleGetOutgoing() {
25: ArrayList outList = new ArrayList();
26: outList.addAll(this .metaObject.getOutgoings());
27: return outList;
28: }
29:
30: /**
31: * @see org.andromda.metafacades.uml.StateVertexFacade#getIncoming()
32: */
33: protected java.util.Collection handleGetIncoming() {
34: ArrayList inList = new ArrayList();
35: inList.addAll(this .metaObject.getIncomings());
36: return inList;
37: }
38:
39: /**
40: * @see org.andromda.metafacades.uml.StateVertexFacade#getContainer()
41: */
42: protected java.lang.Object handleGetContainer() {
43: //TODO: What's this ?
44: return this .metaObject.getContainer().getNamespace();
45: }
46:
47: /**
48: * @see org.andromda.metafacades.uml.StateVertexFacade#getPartition()
49: */
50: protected java.lang.Object handleGetPartition() {
51: return this .metaObject.getContainer();
52: }
53:
54: /**
55: * @see org.andromda.metafacades.uml.StateVertexFacade#getStateMachine()
56: */
57: protected java.lang.Object handleGetStateMachine() {
58: Element owner = this .metaObject;
59: while (!(owner instanceof StateMachine)) {
60: owner = owner.getOwner();
61: }
62: return owner;
63: }
64:
65: public Object getValidationOwner() {
66: return getStateMachine();
67: }
68: }
|