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

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

public class GAVQueryReformulationProvider
extends java.lang.Object

The query reformulator accepts an IQL query on the source schema and rewrites it in terms of constructs of the target schemata.

To do this, on construction, the query reformulator traverses the pathways from the source schema to the target schemata and builds a view definition over target schema constructs for each source schema construct.


Field Summary
protected  java.util.logging.Logger logger
           
protected  Schema sourceSchema
           
protected  Schema[] targetSchemata
           
protected  java.util.HashMap viewmap
          Viewmap contains the constructs of the source schema in the LHS and the IQL view of each construct of the LHS in the RHS.
 
Constructor Summary
protected GAVQueryReformulationProvider()
           
  GAVQueryReformulationProvider(Schema sourceschema, Schema[] targetschemata)
          Deprecated. use GAVQueryReformulationProvider(Schema, Schema[], QueryProcessorConfiguration) instead
  GAVQueryReformulationProvider(Schema sourceSchema, Schema[] targetSchemata, QueryProcessorConfiguration qpc)
           
 
Method Summary
protected  void buildViews()
          Traverses BAV pathways and builds GAV views.
 void finalize()
           
static void main(java.lang.String[] args)
           
 void reformulate(ASG g, QueryProcessorConfiguration qrc)
          Reformulates the query represented by the ASG g according to the view defintions it has stored.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected java.util.logging.Logger logger

sourceSchema

protected Schema sourceSchema

targetSchemata

protected Schema[] targetSchemata

viewmap

protected java.util.HashMap viewmap
Viewmap contains the constructs of the source schema in the LHS and the IQL view of each construct of the LHS in the RHS.

Constructor Detail

GAVQueryReformulationProvider

protected GAVQueryReformulationProvider()

GAVQueryReformulationProvider

public GAVQueryReformulationProvider(Schema sourceschema,
                                     Schema[] targetschemata)
                              throws QueryReformulationException
Deprecated. use GAVQueryReformulationProvider(Schema, Schema[], QueryProcessorConfiguration) instead

Throws:
QueryReformulationException

GAVQueryReformulationProvider

public GAVQueryReformulationProvider(Schema sourceSchema,
                                     Schema[] targetSchemata,
                                     QueryProcessorConfiguration qpc)
                              throws QueryReformulationException
Parameters:
sourceschema - the source schema
targetschemata - the target schemata
qpc - the input configuration
Throws:
QueryReformulationException - if there was a problem building the view definitions of the source schema constructs over target schema constructs
Method Detail

buildViews

protected void buildViews()
                   throws QueryReformulationException
Traverses BAV pathways and builds GAV views.

Throws:
QueryReformulationException
IntegrityException
NotFoundException

reformulate

public void reformulate(ASG g,
                        QueryProcessorConfiguration qrc)
                 throws QueryReformulationException
Reformulates the query represented by the ASG g according to the view defintions it has stored.

Throws:
QueryReformulationException

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception