uk.ac.bbk.dcs.automed.dataWarehousing.util
Class Tools4DW

java.lang.Object
  extended by uk.ac.bbk.dcs.automed.dataWarehousing.util.Tools4DW

public class Tools4DW
extends java.lang.Object

Author:
hao To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Constructor Summary
Tools4DW()
           
 
Method Summary
static ASG evaluateMaxUnion(ASG s1, ASG s2)
           
static Cell get1stItems(ASG data)
           
static java.util.ArrayList getAllVarablesFromCell(Cell root)
           
static java.util.ArrayList getArray4List(ASG asg)
           
static java.util.ArrayList getArray4List(java.lang.String list)
           
static java.util.ArrayList getArrayList(Cell n)
           
static java.util.HashMap getHashMapFromAConstraint(Cell constraint)
           
static java.util.HashMap getHashMapFromTwoTuples(Cell keyCell, Cell valueCell)
           
static java.lang.String getQueryType(java.lang.String tq)
           
static java.lang.String getSourceType(java.lang.String theQ, java.lang.String sCon)
           
static Cell getSubQual(java.lang.String theQ, java.lang.String sCon)
           
static Cell getThe1stComp(Cell compRoot)
           
static Cell getThe1stComp(java.lang.String theQ)
           
static java.util.ArrayList getVarAndSchemaInsideList(Cell root)
           
static java.util.ArrayList getVarAndSchemaInsideTuple(Cell root)
           
static boolean hasUnequalConstantsInTwoTupes(Cell tup1, Cell tup2)
           
static ASG iqlEvaluate(Cell query)
           
static ASG iqlEvaluate(java.lang.String query)
           
static boolean isAEndCell(Cell n)
           
static boolean isANotMemberASG(Cell root)
           
static boolean isComplexTuple(Cell n)
           
static boolean isCompWithOnlyGen(Cell root)
           
static boolean isCompWithOnlyGen(java.lang.String comp)
           
static boolean isContainConstant(Cell root)
           
static boolean isContainVarable(Cell root)
           
static boolean isIdentical(Cell c1, Cell c2)
           
static void main(java.lang.String[] args)
           
static void printList(java.util.ArrayList ls)
           
static ASG recoverTracingData(Lineage lp, ASG v)
           
static java.lang.String replaceString(java.lang.String theString, java.lang.String s1, java.lang.String s2)
           
static Cell replaceVarWithHashMap(Cell root, java.util.HashMap theMap)
           
static Cell replaceVarWithHashMap(Cell root, java.util.HashMap theMap, boolean mapValueIsCell)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tools4DW

public Tools4DW()
Method Detail

iqlEvaluate

public static ASG iqlEvaluate(java.lang.String query)
                       throws java.lang.Exception
Throws:
java.lang.Exception

iqlEvaluate

public static ASG iqlEvaluate(Cell query)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getQueryType

public static java.lang.String getQueryType(java.lang.String tq)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

isAEndCell

public static boolean isAEndCell(Cell n)

isCompWithOnlyGen

public static boolean isCompWithOnlyGen(java.lang.String comp)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

isCompWithOnlyGen

public static boolean isCompWithOnlyGen(Cell root)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getThe1stComp

public static Cell getThe1stComp(java.lang.String theQ)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getThe1stComp

public static Cell getThe1stComp(Cell compRoot)
                          throws java.lang.Exception
Throws:
java.lang.Exception

get1stItems

public static Cell get1stItems(ASG data)
                        throws java.lang.Exception
Throws:
java.lang.Exception

evaluateMaxUnion

public static ASG evaluateMaxUnion(ASG s1,
                                   ASG s2)
                            throws java.lang.Exception
Throws:
java.lang.Exception

replaceString

public static java.lang.String replaceString(java.lang.String theString,
                                             java.lang.String s1,
                                             java.lang.String s2)

getArray4List

public static java.util.ArrayList getArray4List(java.lang.String list)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getArray4List

public static java.util.ArrayList getArray4List(ASG asg)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getArrayList

public static java.util.ArrayList getArrayList(Cell n)

isANotMemberASG

public static boolean isANotMemberASG(Cell root)

isContainVarable

public static boolean isContainVarable(Cell root)

isContainConstant

public static boolean isContainConstant(Cell root)

hasUnequalConstantsInTwoTupes

public static boolean hasUnequalConstantsInTwoTupes(Cell tup1,
                                                    Cell tup2)
Parameters:
tup1 - is a tuple
tup2 - is a tuple
Returns:
if tup1 wihout constant, return false else, if a constant in tup2 is different with the constant at the same palce in tup1, return true if all constants in tup2 is same as the constants at the same palce in tup1, return true

isIdentical

public static boolean isIdentical(Cell c1,
                                  Cell c2)

isComplexTuple

public static boolean isComplexTuple(Cell n)

getHashMapFromAConstraint

public static java.util.HashMap getHashMapFromAConstraint(Cell constraint)
                                                   throws java.lang.Exception
Throws:
java.lang.Exception

getAllVarablesFromCell

public static java.util.ArrayList getAllVarablesFromCell(Cell root)

getHashMapFromTwoTuples

public static java.util.HashMap getHashMapFromTwoTuples(Cell keyCell,
                                                        Cell valueCell)

replaceVarWithHashMap

public static Cell replaceVarWithHashMap(Cell root,
                                         java.util.HashMap theMap)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

replaceVarWithHashMap

public static Cell replaceVarWithHashMap(Cell root,
                                         java.util.HashMap theMap,
                                         boolean mapValueIsCell)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

printList

public static void printList(java.util.ArrayList ls)

getSourceType

public static java.lang.String getSourceType(java.lang.String theQ,
                                             java.lang.String sCon)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

getSubQual

public static Cell getSubQual(java.lang.String theQ,
                              java.lang.String sCon)
                       throws java.lang.Exception
Throws:
java.lang.Exception

recoverTracingData

public static ASG recoverTracingData(Lineage lp,
                                     ASG v)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getVarAndSchemaInsideTuple

public static java.util.ArrayList getVarAndSchemaInsideTuple(Cell root)

getVarAndSchemaInsideList

public static java.util.ArrayList getVarAndSchemaInsideList(Cell root)

main

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