Objects

Return to Introduction  Previous page  Next page

Objects are created in Enterprise Architect by generating text in the following form:

objectType

{

objectProperties

}

where:

objectType is one of the following object types:

·Action
·ActionPin
·Activity
·ActivityParameter
·ActivityPartition
·ActivityRegion
·Actor
·Association
·Change
·Class
·Collaboration
·CollaborationOccurrence
·Component
·DeploymentSpecification
·DiagramFrame
·Decision
·EntryPoint
·Event
·ExitPoint
·ExceptionHandler
·ExpansionNode
·ExpansionRegion
·ExposedInterface
·GUIElement
·InteractionFragment
·InteractionOccurrence
·InteractionState
·Interface
·InterruptibleActivityRegion
·Issue
·Iteration
·Object
·ObjectNode
·MessageEndpoint
·Node
·Package
·Parameter
·Part
·Port
·ProvidedInterface
·RequiredInterface
·Requirement
·Sequence
·State
·StateNode
·Synchronization
·Table
·TimeLine
·UMLDiagram
·UseCase.

objectProperties is zero, or one or more of the following properties:

·Abstract
·Alias
·Arguments
·Author
·Cardinality
·Classifier
·Complexity
·Concurrency
·Filename
·Header
·Import
·IsActive
·IsLeaf
·IsRoot
·IsSpecification
·Keyword
·Language
·Multiplicity
·Name
·Notes
·Persistence
·Phase
·Scope
·Status
·Stereotype
·Version
·Visibility.

and zero, or one or more of the following elements:

·Attribute
·Classifier
·Parameter
·Operation
·Parent
·Tag
·XRef
·Any object.

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:

·Alias
·Classifier
·Collection
·Container
·Containment
·Constant
·Default
·Derived
·LowerBound
·Name
·Notes
·Ordered
·Scope
·Static
·Stereotype
·Type
·UpperBound
·Volatile.

and the following elements:

·Classifier
·Tag
·XRef.

Operations

Operations are created with the same structure as objects, and include the following properties:

·Abstract
·Alias
·Behavior
·Classifier
·Code
·Constant
·IsQuery
·Name
·Notes
·Pure
·ReturnArray
·Scope
·Static
·Stereotype
·Type.

and the following elements:

·Classifier
·Parameter
·Tag
·XRef.

Parameters

Parameters are created with the same structure as objects, and include the tag element and the following properties:

·Classifier
·Default
·Fixed
·Name
·Notes
·Kind
·Stereotype.

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:

·Length
·NotNull
·Precision
·PrimaryKey
·Scale
·Unique.