要素の変換

<< 目次を表示 >>

ページ位置:  Enterprise Architectの操作 > 要素 > MDAスタイルの変換 > モデル変換テンプレートの記述 >

要素の変換

中間言語

要素は次のような形式からEnterprise Architectで生成することができます。

objectType

{

objectProperties*

XRef{xref}*

Tag{tag}*

Attribute{attributes}*

Operation{operations}*

Classifier{classifiers}*

Parameter{parameters}*

}

 

この基本形に必要に応じて情報を追加していきます。次の例は言語をC++に設定し、タグ付き値と属性を追加しています。

Class

{

      name = "Example"

      language = "C++"

      Tag

      {

              name = "defaultCollectionClass"

              value = "List"

      }

      Attribute

      {

              name = "count"

              type = "int"

      }

}

 

それぞれの生成された要素にはXRefの情報を含むべきです。これにより、Enterprise Architectが要素の同期処理を行ったり、要素間に接続を作成したりできます。

 

利用できる内容

項目

説明

要素の種類

objectTypeは次のいずれかになります。

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

 

注意:

  • 要素の種類によっては、上記の項目で利用できないものもあります。
  • それぞれの生成された要素にはXRefの情報を含むべきです。これにより、Enterprise Architectが要素の同期処理を行ったり、要素間に接続を作成したりできます。

要素のプロパティ

objectPropertiesは、以下の値になります。

複数個の指定あるいは指定しないことも可能です。

 

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

属性

Attributeも要素などと同じような形式で生成できます。次のプロパティが利用できます。

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

 

および次の項目が利用可能です。

  • Classifier
  • Tag
  • XRef

操作

Operationも要素などと同じような形式で生成できます。次のプロパティが利用できます。

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

 

および次の項目が利用可能です。

  • Classifier
  • Parameter
  • Tag
  • XRef

パラメータ

Parameterも要素などと同じような形式で生成できます。次のプロパティが利用できます。

  • Classifier
  • Default
  • Fixed
  • Name
  • Notes
  • Kind
  • Stereotype

タグ付き値

 

タグ付き値には、以下の値を指定します。

  • Name
  • Value

 

 

補足:

以下の内容は、特別な場合についての補足です。

項目

説明

パッケージ

パッケージは他の要素と次の点が異なります。

  • 次のプロパティのみが利用できます。alias, author, name, namespaceRoot, notes, scope, stereotype, version
  • namespaceRootというプロパティが利用できます。
  • 名前の指定が必須です。
  • 名前は完全修飾された名前空間名にすることも可能です。この場合、指定されたプロパティは最後のパッケージにのみ設定されます。
  • 別のパッケージを含むことができます。
  • 属性と操作を持つことはできません。

XRef

相互参照は、変換文で定義します。以下の内容が含まれます。

  • Namespace
  • Name
  • Source
  • Notes

テーブル

テーブルは要素の特別な形であり、次の点が異なります。:

  • 列と主キーを持つことができます。
  • 属性をもつことはできません。

(参考:外部キーの変換)

列は属性と似ていますが、autonumber要素を保持してstartnum・incrementおよび次のプロパティを持つことができます。

  • Length
  • NotNull
  • Precision
  • PrimaryKey
  • Scale
  • Unique

注意:

列の定義では、値にNotNull, PrimaryKey, Uniqueのプロパティを割り当てることはできません。

 

 

参照: