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

java.lang.Object
  extended by uk.ac.bbk.dcs.automed.wrappers.IQLTranslator
Direct Known Subclasses:
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.HashMap 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.HashMap memberMap
          Contains subselect statements and the variables assigned to them.
 IQLTranslator parentTranslator
           
 java.util.HashMap varAsMap
          Contains mapping between variables and the AS SQL names of the constructs that the variables point to.
 java.util.HashMap varConsMap
          Contains mapping between variables and SQL constructs.
 
Constructor Summary
IQLTranslator()
           
 
Method Summary
 java.util.HashMap getAsMap()
           
 java.util.HashMap getCompSubCompMap()
           
 ASG getHeadPattern()
           
 java.util.HashMap getVarAsMap()
           
 java.util.HashMap getVarConsMap()
           
protected abstract  void initialise()
           
 boolean isAggregateQuery()
           
 boolean isCollectionQuery()
           
 void logMaps()
           
 java.lang.String translate(ASG g)
           
abstract  java.lang.String translate(Cell c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

varConsMap

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


varAsMap

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


memberMap

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


compSubCompMap

public java.util.HashMap 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 java.lang.String translate(ASG g)
                           throws QProcException
Throws:
QProcException

logMaps

public void logMaps()

translate

public abstract java.lang.String translate(Cell c)
                                    throws QProcException
Throws:
QProcException

initialise

protected abstract void initialise()

getHeadPattern

public final ASG getHeadPattern()

isAggregateQuery

public final boolean isAggregateQuery()

isCollectionQuery

public final boolean isCollectionQuery()

getVarConsMap

public final java.util.HashMap getVarConsMap()

getAsMap

public final java.util.HashMap getAsMap()

getCompSubCompMap

public final java.util.HashMap getCompSubCompMap()

getVarAsMap

public final java.util.HashMap getVarAsMap()