Documentation Language: Swift

Structure

ATLSourceModel

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

struct ATLSourceModel

Overview

Source models provide read-only access to input data for transformations. The adapter bridges ATL’s resource-based model representation to the ECore execution engine’s IModel interface, enabling seamless integration with navigation and query operations.

Example Usage

let sourceAdapter = ATLSourceModel(
    resource: familiesResource,
    alias: "Families",
    metamodel: familiesMetamodel
)

let engine = ECoreExecutionEngine(models: [
    "Families": sourceAdapter
])

Topics

Initializers

?
init(resource:alias:metamodel:)

Create a new source model adapter.

Instance Properties

V
alias

Model alias for namespace identification.

V
isTarget

Source models are read-only.

V
metamodel

Associated metamodel package for type queries.

V
referenceModel

Reference model (metamodel) for this source model.

V
resource

The underlying resource containing model elements.

Instance Methods

F
createElement(ofType:)

Creates a new element of the specified type.

F
findElements(matching:)

Find elements matching a predicate.

F
getAllElements()

Get all elements in the model.

F
getElementsByType(_:)

Get all elements of a specific type.

F
isModelOf(_:)

Check if an object belongs to this model.

Relationships

Conforms To

See Also

Model Adapters

S
ATLTargetModel

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

S
ATLModelAdapterFactory

Factory for creating model adapters from ATL execution context.