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

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

Direct Known Subclasses:
  MiniConQueryRewriter, RangeBasedQueryRewriter

    public abstract class QueryRewriter

extends java.lang.Object

Field Summary
`protected QueryAnalyser` | `_qa`
`protected ASG` | `query`
`protected java.util.List` | `views`

Constructor Summary
`QueryRewriter()` Creates a new instance of QueryRewriter

Method Summary
`abstract QueryAnalyser` | `analyse()` Analyse query and view rules to prepare for the actual rewriting to take place
`abstract QueryAnalyser` | `getQueryAnalyser()` Return reference to the `QueryAnalyser` object which was used to analyse the query
`static QueryRewriter` | `getQueryRewriterInstance(ASG query, ASG extent, int rewriterType)` Special-purpose rewriters
`static QueryRewriter` | `getQueryRewriterInstance(ASG query, java.util.List views, int rewriterType)` A factory method to create a new `QueryRewriter` object
`static QueryRewriter` | `getQueryRewriterInstance(ASG query, QueryAnalyser[] viewMetadata, int rewriterType)` An overloading factory method to create a new `QueryRewriter` object given metadata objects of cached views
`static QueryRewriter` | `getQueryRewriterInstance(QueryAnalyser qa, ASG extent, int rewriterType)` Special-purpose rewriters
`abstract QueryRewriterResult` | `rewrite()` Rewrite query

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

Field Detail

### query

    protected ASG query

### views

    protected java.util.List views

### _qa

    protected QueryAnalyser _qa

Constructor Detail

### QueryRewriter

    public QueryRewriter()

  Creates a new instance of QueryRewriter

Method Detail

### getQueryRewriterInstance

    public static QueryRewriter getQueryRewriterInstance(ASG query,
                                                         java.util.List views,
                                                         int rewriterType)

  A factory method to create a new `QueryRewriter` object

  Parameters:
    `rewriterType` - the rewriter type which should be one of:
    - `#TYPE_BUCKET`
    - `#TYPE_INVERSE_RULE`
    - `#TYPE_MINICON`
  Returns:
    `QueryWriter` a query rewriter object

### getQueryRewriterInstance

    public static QueryRewriter getQueryRewriterInstance(ASG query,
                                                         QueryAnalyser[] viewMetadata,
                                                         int rewriterType)

  An overloading factory method to create a new `QueryRewriter` object given metadata objects of cached views

  Parameters:
    `query` - the query to rewrite
    `viewMetadata` - an array of `QueryAnalyser` objects
    `rewriterType` - the rewriter type which should be one of:
    - `#TYPE_BUCKET`
    - `#TYPE_INVERSE_RULE`
    - `#TYPE_MINICON`
  Returns:
    `QueryWriter` a query rewriter object

### getQueryRewriterInstance

    public static QueryRewriter getQueryRewriterInstance(ASG query,
                                                         ASG extent,
                                                         int rewriterType)

  Special-purpose rewriters

### getQueryRewriterInstance

    public static QueryRewriter getQueryRewriterInstance(QueryAnalyser qa,
                                                         ASG extent,
                                                         int rewriterType)

  Special-purpose rewriters

### analyse

    public abstract QueryAnalyser analyse()
                                   throws AutoMedException

  Analyse query and view rules to prepare for the actual rewriting to take place

  Returns:
    `QueryAnalysre` object that contains query's metadata
  Throws:
    `AutoMedException`

### rewrite

    public abstract QueryRewriterResult rewrite()
                                         throws AutoMedException

  Rewrite query

  Throws:
    `AutoMedException`

### getQueryAnalyser

    public abstract QueryAnalyser getQueryAnalyser()

  Return reference to the `QueryAnalyser` object which was used to analyse
  the query

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