uk.ac.bbk.dcs.automed.qproc.reformulate
Class InverseRulesAlgorithm

java.lang.Object
  extended by uk.ac.bbk.dcs.automed.qproc.reformulate.InverseRulesAlgorithm

public class InverseRulesAlgorithm
extends java.lang.Object

Implements Inverse Rules algorithm for LAV and BAV query processing as described in the following paper:-

           P.J. McBrien and A. Poulovassilis. P2P query reformulation over Both-as-View
           data transformation rules. In Proc of DBISP2P 2006.
 

Author:
Sandeep Mittal

Method Summary
static java.util.Map invertRule(java.util.Map viewMap, int rangeSemantics)
          Takes a viewMap created by AtomicViewMap class and inverts the rules based on the map contents.
static java.util.Map invertRule(ViewKey targetScheme, Cell rule, int rangeSemantics)
           Inverts a rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invertRule

public static java.util.Map invertRule(java.util.Map viewMap,
                                       int rangeSemantics)
                                throws BuildViewException
Takes a viewMap created by AtomicViewMap class and inverts the rules based on the map contents.

Parameters:
viewMap - A transformation map created by AtomicViewMap class
rangeSemantics - RANGE_UPPER, RANGE_LOWER or RANGE_BOTH
Returns:
A Map of inverted rules with ViewKey as key and Cell tree as content.
Throws:
BuildViewException

invertRule

public static java.util.Map invertRule(ViewKey targetScheme,
                                       Cell rule,
                                       int rangeSemantics)
                                throws BuildViewException

Inverts a rule.

The definition of a construct c by a query of the form [h|Q] is inverted as follows:

Parameters:
targetSchemeInfo - SchemeInfo object for the target construct for which the transformation is defined.
rule - Transformation query specified for the sourceScheme
rangeSemantics - RANGE_UPPER, RANGE_LOWER or RANGE_BOTH
Returns:
HashMap containing ViewKey key and root cell of the new rule.
Throws:
BuildViewException