Documentation Language: Swift

Class

ATLResource

A resource for managing ATL modules with XMI serialization support.

@MainActor final class ATLResource

Overview

ATLResource provides a container for ATL modules that integrates with the ECore resource framework. It enables loading and saving ATL modules in Eclipse ATL XMI format, supporting full roundtrip serialization.

Overview

ATL resources manage:

Architecture

ATLResource composes an ECore Resource actor for managing metamodel references while providing MainActor-isolated access to the ATL module. This design allows:

Example Usage

// Create a resource for an ATL module
let resource = ATLResource(uri: "file:///transformations/Book2Publication.atl")

// Load from XMI
try await resource.load()
if let module = resource.module {
    print("Loaded module: \(module.name)")
}

// Save to XMI
try await resource.save()

Topics

Initializers

?
init(uri:)

Creates a new ATL resource with the specified URI.

?
init(uri:module:)

Creates a new ATL resource with an ATL module.

Instance Properties

V
ecoreResource

The underlying ECore resource for managing metamodel references.

V
module

The ATL module contained in this resource.

V
resourceSet

The resource set that owns this resource, if any.

V
uri

The URI identifying this resource.

Instance Methods

F
load()

Loads the ATL module from its URI.

F
save()

Saves the ATL module to its URI.

F
setResourceSet(_:)

Sets the resource set that owns this resource.

Relationships

Conforms To