|
|
|
The Model-Driven System Builder
|
|
JeeWiz Architect's Guide
|
|
|
|
Contents >
16. 'JeeWiz' Reference
|
|
|
16.9 MetaModel Object
| Description | The 'meta-model' is the root object for a meta-model. There must be precisely one meta-meta class, as the root XML element in assembly.xml for the meta-model.
The main job of the 'model' is to hold definitions of meta-classes and meta-factors;
in other words, the meta-meta class and its children is the complete definition of a meta-model.
There are also helper functions in the implementation code to reference chains of models.
There is a rendering to build the Java classes and compile them into a jar; use resources/JeeWiz/control as the template directory.
The inputs and outputs of this process are:
- the input specification is in the 'specification' directory, with the meta-meta class defined in the assembly.xml file.
Other meta-class and meta-factor files are placed in the same directory with a '.xml' extension.
- the Java classes are created in the 'src' directory, one Java class file per meta-class in the meta-model
- the resulting jar is created as 'control/components.jar'.
JeeWiz uses naming conventions to switch between XML names and Java names.
Java names are obviously required when programming in Java;
the names specified in the XML meta- definitions can be either variety.
For example, the Java 'reference type' concept has a meta-class which is called 'reference-type' in the Java meta-model definition.
The generated class is called 'ReferenceType'. See the jeewiz/resources/java directory for further examples.
By convention, JeeWiz meta-models use a lower-case XML name, with '-' separate the name parts.
If you prefer to use Java names (with or without leading capital letters) you can.
The standard rendering always capitalises the final name of a meta-class, according to Java conventions for class names.
We say that 'meta-models can inherit'.
This is implemented by particular meta-classes referring to meta-classes in other meta-models.
However, there is no definition in the meta-model layer of this inheritance; it is deduced by implication from the meta-class inheritance.
|
Contained Lists |
| 1 |
| Name | metaFactor |
| Type | metaFactor |
| Indexed property | name |
|
| |
| 2 |
| Name | metaClass |
| Type | metaClass |
| Indexed property | name |
|
|
Inherited properties |
| description |
(base property)
| |
| template |
(base property)
| |
| text |
(base property)
| |
| jwpattern |
(base property)
| |
|
16.9.1 Property 'name'
|
| Description | This is a descriptive name for the meta-model.
For example, the Java meta-model has the name 'java'.
This name is used to identify the meta-class when a reference to a meta-class in another meta-model is made.
This name is not used in the renderings.
|
| Type | String |
16.9.2 Property 'descriptiveName'
|
| Description | This is a non-programming-style descriptive name for the meta-model.
When rendering the meta-model to documentation, it is used as the title of meta-model chapters in the generated documentation.
|
| Type | String |
16.9.3 Property 'abbreviation'
|
| Description | This is a unique, programming-style name for the meta-model.
It is deprecated: it is not used in the renderings, and the directory name is used in generation instead.
|
| Type | String |
16.9.4 Property 'package'
|
| Description | This is the Java package to be used in the generated code.
It is normal to make the package unique across all meta-models;
in other words, don't reuse the package name across different meta-models.
In practical terms, meta-models may not to compile if the name is not unique.
However, if a meta-model is a plug-in replacement for another,
it should copy the package name from the replacement.
This will allow the meta-models to be used at switched at generate-time.
There are no restrictions on the format beyond those imposed by Java.
The convention we use on standard JeeWiz meta-models is
- the company package ('uk.co.nte')
- the product (jw)
- a unique identifier for the package (e.g. 'components.object' or 'components.businessObject').
So for example the Java meta-model's package is 'uk.co.nte.jw.components.object'.
|
| Type | String |
Copyright (c) 2001-2008 New Technology/enterprise Ltd.
| |