import Zql.*; import java.util.*; /* * QueryGraph is the complete representaion of a query * It consists of uniquer ID, a vector of nodes, egdes and globla predicates */ public class QueryGraph { private int QGID; private Vector nodeList; // a vector of type "QueryNode" private Vector edgeList; // a vector of type "Edge" private Vector globalPredicates; // a vector of type ZExpression private ZQuery query; /* we create a temporary hashtable of relation name and its QueryNode */ /* we use this hashtable to fill in the values in the QueryNode*/ /* finally we iterate over the hashtable and store the QueryNodes in the nodeList Vector */ Hashtable temporary; public Vector getNodeList() { return nodeList; } public Vector getEdgeList() { return edgeList; } public Vector getGlobalPredicates() { return globalPredicates; } public ZQuery getZQuery() { return query; } public Vector getLocalPredicates() // local predicates are stored in the QueryNode { Vector localPredicates = new Vector(); Vector temp; for(int i=0;i