public void execute(String mappingTaskFile) throws Exception { String fileName = mappingTaskFile.substring(mappingTaskFile.lastIndexOf(File.separator)); if (logger.isDebugEnabled()) logger.debug( "###################################### " + fileName + "########################################"); mappingTask = daoMappingTask.loadMappingTask(mappingTaskFile); if (logger.isDebugEnabled()) logger.debug("Requires sort: " + sortChecker.needsRuntimeSortInSkolems(mappingTask)); }
public void findCorrespondences(String inputFile, String outputFile) throws DAOException { DAOMappingTask daoMappingTask = new DAOMappingTask(); MappingTask mappingTask = daoMappingTask.loadMappingTask(5, inputFile, false); INode source = mappingTask.getSourceProxy().getSchema(); INode target = mappingTask.getTargetProxy().getSchema(); NodeExtractorVisitor visitorSource = new NodeExtractorVisitor(); source.accept(visitorSource); List<INode> sourceAttributes = visitorSource.getResult(); NodeExtractorVisitor visitorTarget = new NodeExtractorVisitor(); target.accept(visitorTarget); List<INode> targetAttributes = visitorTarget.getResult(); generateCorrespondences(sourceAttributes, targetAttributes, mappingTask); daoMappingTask.saveMappingTask(mappingTask, outputFile); }