InverseRulesAlgorithm
Keywords: uk.ac.bbk.dcs.automed.qproc.reformulate.InverseRulesAlgorithm class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      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:

  - Replace each variable in Q that does not appear in h by a distinct Consti with arguments the variables in h.
  - For each generator p<-cs in Q, generate a query defining cs in terms of [p|h<-c;Q'] where Q' contains all filters from Q.

  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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD