AndroMDA namespace components are described through a single XML descriptor, the namespace.xml file. You'll find this file in a cartridge, translation-library or metafacades jar (basically any component that can reside with a namespace ) located in the /META-INF/andromda directory of that jar.
In order for a namespace component to be "discovered" by AndroMDA, it MUST be registered within this descriptor.
There are several purposes of the namespace descriptor:
Each namespace descriptor must adhere to this XML Schema.
Take a look at how a typlical namespace descriptor is structured in the example below. You'll notice from this example that both the cartridge and metafacades components are defined for the webservice namespace. What this means, is that when AndroMDA "discovers" this namespace, it will know that it needs to register both a cartridge and a set of metafacades under the namespace of webservice (the descriptors for both the cartridge and metafacades will be need to be present in the webservice cartridge jar in order for these to be correctly registered).
You'll also notice that we have plenty of properties defined in this example as well. AndroMDA uses these properties in two ways:
Each property element defines the following aspects about a given property:
Because of the fact the documentation element is of type xs:anyType you can embed any other xml elements within it.
<namespacename="webservice"> <components> <componentname="cartridge"> <path>META-INF/andromda/cartridge.xml</path> </component> <componentname="metafacades"> <path>META-INF/andromda/metafacades.xml</path> </component> </components> <properties> <propertyGroupname="Outlets"> <documentation> Defines the locations to which output is generated. </documentation> <propertyname="wsdls"> <documentation> Specifies the directory to which generated WSDL's will be placed. </documentation> </property> <propertyname="java-types"> <documentation> The directory to which any non implementation Java files will be generated. </documentation> </property> <propertyname="axis-configuration"> <documentation> The directory to which any AXIS specific configuration files are generated (such as the WSDD files, etc). </documentation> </property> <propertyname="axis-tests"required="false"> <documentation> The directory to which AXIS specific test classes are generated. </documentation> </property> <propertyname="axis-test-impls"required="false"> <documentation> The directory to which the AXIS specific test implementation classes are generated. </documentation> </property> <propertyname="wss4j-configuration"required="false"> <documentation> The directory to which any <ahref="http://ws.apache.org/ws-fx/wss4j/index.html">WSS4J</a> specific configuration files are generated. </documentation> </property> </propertyGroup> <propertyGroupname="Other"> <propertyname="namespacePrefix"> <default>impl</default> <documentation> Defines the prefix to give to the default namespace. </documentation> </property> <propertyname="qualifiedNameLocalPartPattern"> <default>{0}</default> <documentation> The pattern to use when a qualified name local part is created. <em>{0}</em> represents the name of the classifier (i.e. <em>WS{0}</em> would give all your types and services a prefix of <em>WS</em>). </documentation> </property> <propertyname="namespacePattern"> <default>http://{0}</default> <documentation> The pattern to use when a namespace is created. <em>{0}</em> represents the package name of the classifier (i.e. <em>ws.{0}</em> would prefix all your type and service namespaces with <em>ws.</em>). </documentation> </property> ... </propertyGroup> ... </properties> </namespace>