use of eu.esdihumboldt.hale.common.headless.impl.ProjectTransformationEnvironment in project hale by halestudio.
the class AbstractMergeCellMigratorTest method mergeWithMigrator.
/**
* Perform merging using a specific merge migrator.
*
* @param migrator the migrator to test, <code>null</code> if the migrator
* configured in the system should be used
* @param cellId the ID of the cell to migrate
* @param projectToMigrate the location of the project containing the cell
* (Mapping from B to C)
* @param matchingProject the location of the project providing the matching
* (Mapping from A to B) information
* @return the merge result
* @throws Exception if preparing or running the test fails
*/
public List<MutableCell> mergeWithMigrator(MergeCellMigrator migrator, String cellId, URL projectToMigrate, URL matchingProject) throws Exception {
ProjectTransformationEnvironment projectToMigrateEnv = projectCache.get(projectToMigrate.toURI());
Alignment migrateAlignment = projectToMigrateEnv.getAlignment();
Cell cellToMigrate = migrateAlignment.getCell(cellId);
assertNotNull(MessageFormat.format("Cell with ID {0} not found in alignment to migrate", cellId), cellToMigrate);
ProjectTransformationEnvironment matchingProjectEnv = projectCache.get(matchingProject.toURI());
return mergeWithMigrator(migrator, cellToMigrate, matchingProjectEnv);
}
Aggregations