Objects are created in Enterprise Architect by generating text in the following form:
objectType
{
objectProperties
}
where:
objectType is one of the following object types:
· | InterruptibleActivityRegion |
objectProperties is zero, or one or more of the following properties:
and zero, or one or more of the following elements:
Note: Some of the above only apply to certain object types.
Note: Every object created in a transformation should include an XRef element, as it enables Enterprise Architect to synchronize with the element and makes it possible to create a connector to that class in a transformation.
Classes
A simple class can be created as follows:
Class
{
name = "Example"
}
It is then easy to add to this. The following example sets the language to C++, and adds a Tagged Value and an attribute:
Class
{
name = "Example"
language = "C++"
Tag
{
name = "defaultCollectionClass"
value = "List"
}
Attribute
{
name = "count"
type = "int"
}
}
Attributes
Attributes are created with the same structure as objects, and include the following properties:
and the following elements:
Operations
Operations are created with the same structure as objects, and include the following properties:
and the following elements:
Parameters
Parameters are created with the same structure as objects, and include the tag element and the following properties:
Packages
Packages differ from other objects in the following ways:
· | A reduced set of properties of alias, author, name, namespaceRoot, notes, scope, stereotype and version |
· | The extra property namespaceRoot |
· | Must have a name specified |
· | Name can be a qualified name; when a qualified name is specified the properties given are applied only to the final package |
· | Can contain other packages |
· | Can't contain attributes and operations. |
Tables
Tables are a special sort of object, with the following differences from other object types:
· | Can include columns and primary keys |
· | Can't include attributes. |
Columns
Columns are similar to attributes, but have an autonumber element containing Startnum and increment, and the following added properties: