Structure
ATLXMISerializer
Serializes ATL modules to Eclipse ATL XMI format.
struct ATLXMISerializer
Overview
ATLXMISerializer converts ATL modules into the standard Eclipse ATL XMI representation, following the ATL metamodel structure defined at http://www.eclipse.org/gmt/2005/ATL.
Overview
The serializer supports all ATL constructs:
-
Modules: Top-level transformation units with source/target metamodel references
-
Rules: Matched rules, called rules, and lazy rules
-
Helpers: Context-free and contextual helper functions
-
Queries: Query definitions (when supported)
-
Expressions: Full OCL expression trees including let, tuple, iterate, etc.
XMI Format
The generated XMI follows Eclipse ATL standards:
<?xml version="1.0" encoding="UTF-8"?>
<atl:Module xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:atl="http://www.eclipse.org/gmt/2005/ATL"
name="ModuleName">
<!-- Module contents -->
</atl:Module>
Example Usage
let serializer = ATLXMISerializer()
let xmi = try serializer.serialize(atlModule)
print(xmi)
Topics
Initializers
?
init()
Creates a new ATL XMI serializer.
Instance Methods
F
serialize(_:)
Serializes an ATL module to Eclipse ATL XMI format.