|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.rodex.qproc.QueryAnalyser
public class QueryAnalyser
Constructor Summary | |
---|---|
QueryAnalyser(ASG asg)
Creates a new instance of QueryAnalyser |
Method Summary | |
---|---|
void |
analyse()
Start analysing the query |
boolean |
containsSubGoal(java.util.List subGoals)
Check if a query/view contains some sub-goals |
ASG |
getASG()
The original ASG object of the represented view |
Cell |
getASGRoot()
|
java.util.List |
getConstantVariables()
Return a List of constant variables in the query. |
java.util.List |
getFunctions()
Return the List of QueryFunction objects found.Returns null if no functions found |
java.util.List |
getFunctions(QuerySubGoal qsg)
Get a List of query functions which are linked to a specified
query sub-goal |
java.util.List |
getFunctions(QueryVariable var)
Get a List of query functions which are linked to a specified
query variable |
int |
getHeadVarIndex(java.lang.String var)
Return the index of a head variable in the query head var set |
java.util.List |
getHeadVars()
Getter methods |
java.util.Map |
getHeadVarsForTable(java.lang.String tableName)
Return a Map of head vars that are associated to a table. |
java.lang.String |
getInternalQuery(boolean rebuildIfExist)
Create the internal representation of the original query in which each query scheme is replaced by a unique object-id assigned to it in the repository. |
java.lang.String |
getQueryString()
Return the query representation as it was originally passed in |
java.util.Map |
getQueryVariables()
|
java.lang.String |
getSchemaName()
Return the schema name of the query |
java.util.List |
getSubGoals()
Return a list of QuerySubGoal objects |
java.util.List |
getTableNames()
|
java.util.List |
getVariableMappings(QueryVariable var)
Check if a query variable is mappable to one of the variables of the query If mappings found, return them in a List |
boolean |
hasConstants()
A quick check whether there are constants in the query |
boolean |
hasFunctions(QueryVariable var)
Test if a QueryVariable has any associated functions |
boolean |
isHeadVar(QueryVariable var)
|
boolean |
isMappableToHeadVar(QueryVariable var)
Check that a query variable object is truly a head var, i.e. |
void |
setSchemaName(java.lang.String schemaName)
Set the schema name |
void |
setSubGoal(int index,
QuerySubGoal qsg)
Push a sub-goal object in a pariticular position in the sub goal list |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryAnalyser(ASG asg)
Method Detail |
---|
public void analyse() throws QueryIntegrityException
QueryIntegrityException
public java.util.List getHeadVars()
public int getHeadVarIndex(java.lang.String var)
public boolean isHeadVar(QueryVariable var)
public boolean isMappableToHeadVar(QueryVariable var)
public java.util.List getSubGoals()
QuerySubGoal
objects
public boolean containsSubGoal(java.util.List subGoals)
public java.util.List getTableNames()
public java.util.Map getQueryVariables()
public java.util.List getConstantVariables()
List
of constant variables in the query. If there
null
is returned instead.
public void setSubGoal(int index, QuerySubGoal qsg)
public boolean hasConstants()
public boolean hasFunctions(QueryVariable var)
QueryVariable
has any associated functions
public java.util.List getVariableMappings(QueryVariable var)
List
var
- a QueryVariable
object
List
of mapped QueryVariable
s in the querypublic java.lang.String getSchemaName()
public void setSchemaName(java.lang.String schemaName)
public java.util.List getFunctions()
List
of QueryFunction
objects found.null
if no functions found
public java.util.List getFunctions(QueryVariable var)
List
of query functions which are linked to a specified
query variable
public java.util.List getFunctions(QuerySubGoal qsg)
List
of query functions which are linked to a specified
query sub-goal
public java.util.Map getHeadVarsForTable(java.lang.String tableName)
Map
of head vars that are associated to a table. The returned
hash map maps a variable to the actual query field that it is mapped to
public Cell getASGRoot()
public ASG getASG()
public java.lang.String getQueryString()
public java.lang.String getInternalQuery(boolean rebuildIfExist) throws QueryIntegrityException
rebuildIfExist
- a boolean flag indicating whether to re-use the existing query string (if any)
QueryIntegrityException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |