<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>1.1.2. Namespace Definition</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VtclFile.html" title="1.1. VTCL Files"><link rel="prev" href="def_VtclFile.html" title="1.1.1. VTCL file"><link rel="next" href="def_NamespaceImport.html" title="1.1.3. Namespace Import"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">1.1.2. Namespace Definition</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_VtclFile.html">Prev</a> </td><th align="center" width="60%">1.1. VTCL Files</th><td align="right" width="20%"> <a accesskey="n" href="def_NamespaceImport.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_NamespaceDefinition"></a>1.1.2. Namespace Definition</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_NamespaceDefinition-Description"></a>Description</th></tr><tr><td valign="top" align="left"><p> | |
Like in modern programming languages, namespaces are used also in VTCL. | |
<span class="strong"><strong>Namespaces</strong></span> | |
<a name="N100E8" class="indexterm"></a> | |
make it easier to identify model elements uniquely in a hierarchical way. | |
</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_NamespaceDefinition-Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting"> | |
NamespaceDefAST ::= $empty | |
| <span class="token">namespace</span> <a href="def_ModelElementName.html" title="5.7.1. Model Element Name">QualifiedTypeNameAST</a> <span class="token">;</span> | |
</pre><p> | |
Namespaces are identified by <a href="def_ModelElementName.html" title="5.7.1. Model Element Name">qualified model element names</a>. | |
</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_NamespaceDefinition-Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p> | |
The <span class="strong"><strong>namespace</strong></span> structure corresponds to the containment hierarchy of the VPM model space. | |
Model elements can be referenced either by their fully qualified names or by their local names (identifiers) if the namespace | |
in which they are contained is reachable (either because it is the currently defined namespace or because it | |
is imported). | |
</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_NamespaceDefinition-Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>All element names must be unique within the scope of their direct containers.</p></td></tr></table></div><div class="highlights"><a name="def_NamespaceDefinition-Remarks"></a><p><b>Remarks. </b> | |
The recommended structure of namespaces is to divide the root namespace into technological spaces (like | |
ASM, UML, BPM, MOF etc.). In these technological namespaces define the following containers | |
<a href="def_NamespaceDefinition.html#fig:NamespaceStruct" title="Figure 2.1. Recommended structure of namespaces">Figure 2.1, “Recommended structure of namespaces”</a>): | |
<div class="figure-float" style="float: right;"><div class="figure"><a name="fig:NamespaceStruct"></a><p class="title"><b>Figure 2.1. Recommended structure of namespaces</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="images/others/NamespaceStruct.png" align="middle" width="200" alt="Recommended structure of namespaces"></div></div><p></p></div><br class="figure-break"></div> | |
<div class="itemizedlist"><ul type="disc"><li><p> | |
<span class="emphasis"><em>metamodel</em></span> for containing the metamodel of the given technology, | |
</p></li><li><p> | |
<span class="emphasis"><em>models</em></span> for all the models that are instances of the above mentioned metamodel, | |
</p></li><li><p> | |
<span class="emphasis"><em>references</em></span> | |
for all the additional information that is related to transformations transforming to other | |
technological spaces organized into subcontainers: | |
<div class="itemizedlist"><ul type="circle"><li><p> | |
<span class="emphasis"><em>metamodels</em></span> | |
for the metamodels of reference structures that defines the relationship between | |
the elements of the metamodels of the current and the target technology, | |
</p></li><li><p> | |
<span class="emphasis"><em>models</em></span> | |
for all the models that are instances of the reference metamodel, | |
</p></li></ul></div> | |
</p></li></ul></div> | |
This structure clearly separates the various types of metamodels, models, transformations and other | |
related model elements. | |
</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_VtclFile.html">Prev</a> </td><td align="center" width="20%"><a accesskey="u" href="sec_VtclFile.html">Up</a></td><td align="right" width="40%"> <a accesskey="n" href="def_NamespaceImport.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">1.1.1. VTCL file </td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%"> 1.1.3. Namespace Import</td></tr></table></div></body></html> |