The model transformation system's main class is TGGEngine. It provides three transformation operations:
transformFromFiles(URI sourceFileUri, URI targetFileUri, TransformationDirection direction, String ruleSetID, boolean synchronize)Performs a model transformation on the model files. The models are loaded from the files, the transformation or synchronization is performed, and the target model is written to file. If the synchronize flag is true, a mapping transformation is performed first to create the correspondence model.
transformInMemory(URI sourceFileUri, URI targetFileUri, TransformationDirection direction, String ruleSetID, boolean synchronize)Performs a model transformation in memory using appropriate model adapters. The diagram adapters a responsible for retrieving the model resource using the given URIs.
transformInMemory(EResource sourceResource, EResource targetResource, TransformationDirection direction, String ruleSetID, boolean synchronize)Performs a model transformation in memory on the specified resources. Use this operation, if you already have the resouces containing the models.
If you want to use the transformation system from your own code, create a new TGGEngine using the MoteFactory class. Then, you would usually use the third operation. You only have to provide the source and target resources, specify the transformation direction and the rule set to use, and state, whether a transformation or a synchronization should be performed.