1 // license-header java merge-point
2 //
3 // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4 //
5 package org.andromda.metafacades.uml14;
6
7 import java.util.Collection;
8 import org.andromda.core.metafacade.ModelValidationMessage;
9 import org.andromda.metafacades.uml.NodeFacade;
10 import org.omg.uml.foundation.core.Node;
11
12 /**
13 * A computational resource upon which artifacts may be deployed for execution. Nodes can be
14 * interconnected through communication paths to define network structures.
15 * MetafacadeLogic for NodeFacade
16 *
17 * @see NodeFacade
18 */
19 public abstract class NodeFacadeLogic
20 extends ClassifierFacadeLogicImpl
21 implements NodeFacade
22 {
23 /**
24 * The underlying UML object
25 * @see Node
26 */
27 protected Node metaObject;
28
29 /** Create Metafacade implementation instance using the MetafacadeFactory from the context
30 * @param metaObjectIn
31 * @param context
32 */
33 protected NodeFacadeLogic(Node metaObjectIn, String context)
34 {
35 super(metaObjectIn, getContext(context));
36 this.metaObject = metaObjectIn;
37 }
38
39 /**
40 * Gets the context for this metafacade logic instance.
41 * @param context String. Set to NodeFacade if null
42 * @return context String
43 */
44 private static String getContext(String context)
45 {
46 if (context == null)
47 {
48 context = "org.andromda.metafacades.uml.NodeFacade";
49 }
50 return context;
51 }
52
53 /** Reset context only for non-root metafacades
54 * @param context
55 */
56 @Override
57 public void resetMetafacadeContext(String context)
58 {
59 if (!this.contextRoot) // reset context only for non-root metafacades
60 {
61 context = getContext(context); // to have same value as in original constructor call
62 setMetafacadeContext (context);
63 }
64 }
65
66 /**
67 * @return boolean true always
68 * @see NodeFacade
69 */
70 public boolean isNodeFacadeMetaType()
71 {
72 return true;
73 }
74
75 /**
76 * @param validationMessages Collection<ModelValidationMessage>
77 * @see ClassifierFacadeLogicImpl#validateInvariants(Collection validationMessages)
78 */
79 @Override
80 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
81 {
82 super.validateInvariants(validationMessages);
83 }
84 }