RangeBasedQueryRewriter
Keywords: uk.ac.ic.doc.rodex.qproc.RangeBasedQueryRewriter 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.ic.doc.rodex.qproc
Class RangeBasedQueryRewriter

    java.lang.Object
      uk.ac.ic.doc.rodex.qproc.QueryRewriter
          uk.ac.ic.doc.rodex.qproc.RangeBasedQueryRewriter

    public class RangeBasedQueryRewriter

extends QueryRewriter

Field Summary

Fields inherited from class uk.ac.ic.doc.rodex.qproc.QueryRewriter
`query, views`

Constructor Summary
`RangeBasedQueryRewriter(ASG query, ASG extent)` Creates a new instance of RangeBasedQueryRewriter given only a list of cached views
`RangeBasedQueryRewriter(QueryAnalyser qa, ASG extent)` Creates a new instance of RangeBasedQueryRewriter given only a list of cached views

Method Summary
`QueryAnalyser` | `analyse()` Implements method in `QueryWriter` parent class Analyse query and view rules into head vars and sub-goals in order to prepare for the actual rewrite to take place
`QueryAnalyser` | `getQueryAnalyser()` Return query analyser
`AutoMedType[]` | `getValueRange(QuerySubGoal qsg)` Get a value range for a query sub-goal in the query based on the functions associated to this sub-goal.
`AutoMedType[]` | `getValueRange(QueryVariable var)` Get a value range for query variable in the query based on the functions associated to this variable.
`QueryRewriterResult` | `rewrite()` Rewrite an existing query into a set of equivalent sub-queries based on range analysis.

Methods inherited from class uk.ac.ic.doc.rodex.qproc.QueryRewriter
`getQueryRewriterInstance, getQueryRewriterInstance, getQueryRewriterInstance, getQueryRewriterInstance`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RangeBasedQueryRewriter

    public RangeBasedQueryRewriter(ASG query,
                                   ASG extent)

  Creates a new instance of RangeBasedQueryRewriter given only a list of cached views

### RangeBasedQueryRewriter

    public RangeBasedQueryRewriter(QueryAnalyser qa,
                                   ASG extent)

  Creates a new instance of RangeBasedQueryRewriter given only a list of cached views

Method Detail

### analyse

    public QueryAnalyser analyse()
                          throws QueryRewriterException,
                                 QueryIntegrityException

  Implements method in `QueryWriter` parent class
  Analyse query and view rules into head vars and sub-goals in order to prepare
  for the actual rewrite to take place

  Specified by:
    `analyse` in class `QueryRewriter`
  Returns:
    `QueryAnalysre` object that contains query's metadata
  Throws:
    `QueryRewriterException`
    `QueryIntegrityException`

### getQueryAnalyser

    public QueryAnalyser getQueryAnalyser()

  Return query analyser

  Specified by:
    `getQueryAnalyser` in class `QueryRewriter`

### rewrite

    public QueryRewriterResult rewrite()
                                throws QueryRewriterException

  Rewrite an existing query into a set of equivalent sub-queries based on range analysis. Range-based analysis is performed for both numeric and string data values.

  Specified by:
    `rewrite` in class `QueryRewriter`
  Throws:
    `QueryRewriterException`

### getValueRange

    public AutoMedType[] getValueRange(QuerySubGoal qsg)

  Get a value range for a query sub-goal in the query based on the functions associated to this sub-goal.
  This method supports two types of query expressions: numeric and literal

  Parameters:
    `var` - a `QueryVariable` object to analyse
  Returns:
    AutoMedType[] an array of two `AutoMedType` objects, one for the lower bound and the other for the upper bound

### getValueRange

    public AutoMedType[] getValueRange(QueryVariable var)

  Get a value range for query variable in the query based on the functions associated to this variable.
  This method supports two types of query expressions: numeric and literal

  Parameters:
    `var` - a `QueryVariable` object to analyse
  Returns:
    AutoMedType[] an array of two `AutoMedType` objects, one for the lower bound and the other for the upper bound

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