uk.ac.bbk.dcs.automed.wrappers
Class IQLTranslator

java.lang.Object
  extended by uk.ac.bbk.dcs.automed.wrappers.IQLTranslator
Direct Known Subclasses:
IQL2SQLTranslator, IQL2XQuery

public abstract class IQLTranslator
extends java.lang.Object

Class Task Description

Author:
Lucas Zamboulis

Field Summary
 java.lang.String aggregateIQLFunction
           
 boolean aggregateQuery
           
 boolean collectionQuery
           
 java.util.Map compSubCompMap
          Contains mapping between the vars in a generator pattern and the vars in the head of a subcomp.
 ASG headPattern
           
protected  java.util.logging.Logger logger
           
 java.util.Map memberMap
          Contains subselect statements and the variables assigned to them.
 IQLTranslator parentTranslator
           
protected static int queryCount
          Integer for enumerating the number of different subqueries in the translated query.
 java.util.Map varAsMap
          Contains mapping between variables and the AS SQL names of the constructs that the variables point to.
 java.util.Map varConsMap
          Contains mapping between variables and SQL constructs.
 AutoMedWrapper w
           
 
Constructor Summary
IQLTranslator()
           
 
Method Summary
 ASG getHeadPattern()
           
abstract  java.lang.String getQuery()
           
protected abstract  void initialise()
           
 boolean isAggregateQuery()
           
 void logMaps()
           
 void translate(ASG g)
           
protected abstract  void translate(Cell c)
           
(package private)  void updateParent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

w

public AutoMedWrapper w

headPattern

public ASG headPattern

aggregateQuery

public boolean aggregateQuery

aggregateIQLFunction

public java.lang.String aggregateIQLFunction

collectionQuery

public boolean collectionQuery

parentTranslator

public IQLTranslator parentTranslator

logger

protected java.util.logging.Logger logger

queryCount

protected static int queryCount
Integer for enumerating the number of different subqueries in the translated query.


varConsMap

public java.util.Map varConsMap
Contains mapping between variables and SQL constructs.


varAsMap

public java.util.Map varAsMap
Contains mapping between variables and the AS SQL names of the constructs that the variables point to.


memberMap

public java.util.Map memberMap
Contains subselect statements and the variables assigned to them. This is only for translating the member IQL function.


compSubCompMap

public java.util.Map compSubCompMap
Contains mapping between the vars in a generator pattern and the vars in the head of a subcomp.

Constructor Detail

IQLTranslator

public IQLTranslator()
Method Detail

translate

public void translate(ASG g)
               throws TranslationException
Throws:
TranslationException

getQuery

public abstract java.lang.String getQuery()

updateParent

void updateParent()

logMaps

public void logMaps()

translate

protected abstract void translate(Cell c)
                           throws TranslationException
Throws:
TranslationException

initialise

protected abstract void initialise()

getHeadPattern

public final ASG getHeadPattern()

isAggregateQuery

public final boolean isAggregateQuery()