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); }
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); } } }