Documentation Language: Swift

Structure

ATLTargetModel

Adapter for ATL target models to conform to ECore IModel interface.

struct ATLTargetModel

Overview

Target models provide write access for creating transformed output data. The adapter supports element creation, modification, and deletion whilst maintaining consistency with the underlying resource structure.

Example Usage

let targetAdapter = ATLTargetModel(
    resource: personsResource,
    alias: "Persons",
    metamodel: personsMetamodel
)

let newPerson = try await targetAdapter.createElement(personClass)

Topics

Initializers

?
init(resource:alias:metamodel:)

Create a new target model adapter.

Instance Properties

V
alias

Model alias for namespace identification.

V
isTarget

Target models are writable.

V
metamodel

Associated metamodel package for type operations.

V
referenceModel

Reference model (metamodel) for this target model.

V
resource

The underlying resource for storing created elements.

Instance Methods

F
addElement(_:)

Add an existing element to this model.

F
clearCreationTracking()

Clear all created element tracking.

F
createElement(_:)

Create a new element of the specified type.

F
createElement(ofType:)

Creates a new element of the specified type.

F
getCreationStatistics()

Get statistics about element creation.

F
getElementsByType(_:)

Get all elements of a specific type.

F
isModelOf(_:)

Check if an object belongs to this model.

F
removeElement(_:)

Remove an element from this model.

Relationships

Conforms To

See Also

Model Adapters

S
ATLSourceModel

Adapter for ATL source models to conform to ECore IModel interface.

S
ATLModelAdapterFactory

Factory for creating model adapters from ATL execution context.