private void processDependency(Dependency dependency) { assignAuthoritativeSources(dependency); aliasAssigner.assignAliases(dependency); variableFinder.findVariables( dependency, task.getSource().getTableNames(), task.getAuthoritativeSources()); checker.checkVariables(dependency); equivalenceClassFinder.findVariableEquivalenceClasses(dependency); }
public void addDC(Dependency d) { if (!(d.getConclusion() instanceof NullFormula)) { throw new ParserException("DC must have no conclusion"); } IDatabase source = task.getSource(); List<String> sourceTables = source.getTableNames(); IDatabase target = task.getTarget(); List<String> targetTables = target.getTableNames(); checkAtomsForDCs(sourceTables, targetTables, d.getPremise()); this.dcs.add(d); }
public void apply(CellChanges cellChanges, EGTask task) { intitializeOperators(task); IDatabase dirtyTarget = task.getTarget(); if (task.getConfiguration().isCloneTargetSchema()) { String dirtySuffix = BartUtility.getDirtyCloneSuffix(task); DBMSDB target = (DBMSDB) task.getTarget(); try { databaseManager.removeClone(target, dirtySuffix); } catch (Exception e) { } dirtyTarget = databaseManager.cloneTarget(target, dirtySuffix); task.setDirtyTarget(dirtyTarget); } for (ICellChange cellChange : cellChanges.getChanges()) { cellUpdater.execute(new CellRef(cellChange.getCell()), cellChange.getNewValue(), dirtyTarget); } }
private void assignAuthoritativeSources(Dependency dependency) { for (IFormulaAtom formulaAtom : dependency.getPremise().getAtoms()) { if (!(formulaAtom instanceof RelationalAtom)) { continue; } TableAlias tableAlias = ((RelationalAtom) formulaAtom).getTableAlias(); if (task.getAuthoritativeSources().contains(tableAlias.getTableName())) { tableAlias.setAuthoritative(true); } } }
// final callback method for processing tgds public void processDependencies() { for (Dependency dc : dcs) { processDependency(dc); } task.setDCs(dcs); }