spo.src.Test
Class QueryGenerator

java.lang.Object
  |
  +--spo.src.Test.QueryGenerator

public class QueryGenerator
extends java.lang.Object

A class that generates queries for testing the SPO data management system Overall Constraints: # of random variables: 200 # of elements in context: <= 6 # of elements in conditional: <= 3 random variables: CS100 ~ CS299 context elements: year, semester, major, college, instructor, comments


Field Summary
(package private)  char CHAR_START
           
(package private)  int CONTEXT_LEN
           
(package private)  int DOMAIN_SIZE
           
(package private) static java.lang.String RELATION_NAME
           
(package private) static java.lang.String RelName_L
           
(package private) static java.lang.String RelName_R
           
(package private)  int VAR_LEN
           
(package private)  int VAR_RATIO
           
(package private)  int VAR_START
           
(package private)  int YEAR_START
           
 
Constructor Summary
QueryGenerator(java.lang.String lname, java.lang.String rname)
          Initialize an instance for the class
 
Method Summary
 java.lang.String[] getConditional()
          Generate the conditional element for the SPOs in XML format random variables: CS100 ~ CS149
 java.lang.String[] getContext()
          Generate the context element for the SPO in XML format context elements: year, semester, major, college, instructor, comments year: 1976 ~ 2001 semester: "AA" ~ "ZZ" major: "AA" ~ "ZZ" college: "AA" ~ "ZZ" instructor: "AA" ~ "ZZ" comments: "AA" ~ "ZZ"
 float getProbability()
          Generate the probability for each row in the table element of the SPO
 java.lang.String getQuery(java.lang.String type)
          Generate query for testing based on the type
 java.lang.String getValue()
          Generate a value of the participating random variable
 java.lang.String getVariable()
          Generate a participating random variable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

YEAR_START

final int YEAR_START
See Also:
Constant Field Values

CHAR_START

final char CHAR_START
See Also:
Constant Field Values

CONTEXT_LEN

final int CONTEXT_LEN
See Also:
Constant Field Values

VAR_START

final int VAR_START
See Also:
Constant Field Values

VAR_LEN

final int VAR_LEN
See Also:
Constant Field Values

VAR_RATIO

final int VAR_RATIO
See Also:
Constant Field Values

DOMAIN_SIZE

final int DOMAIN_SIZE
See Also:
Constant Field Values

RELATION_NAME

static java.lang.String RELATION_NAME

RelName_L

static java.lang.String RelName_L

RelName_R

static java.lang.String RelName_R
Constructor Detail

QueryGenerator

public QueryGenerator(java.lang.String lname,
                      java.lang.String rname)
Initialize an instance for the class

Parameters:
lname - the default relation of left relation
rname - the right relation of cartesian product and join
Method Detail

getQuery

public java.lang.String getQuery(java.lang.String type)
Generate query for testing based on the type

Parameters:
type - the type of query to be generated

getContext

public java.lang.String[] getContext()
Generate the context element for the SPO in XML format context elements: year, semester, major, college, instructor, comments year: 1976 ~ 2001 semester: "AA" ~ "ZZ" major: "AA" ~ "ZZ" college: "AA" ~ "ZZ" instructor: "AA" ~ "ZZ" comments: "AA" ~ "ZZ"


getConditional

public java.lang.String[] getConditional()
Generate the conditional element for the SPOs in XML format random variables: CS100 ~ CS149


getVariable

public java.lang.String getVariable()
Generate a participating random variable


getValue

public java.lang.String getValue()
Generate a value of the participating random variable


getProbability

public float getProbability()
Generate the probability for each row in the table element of the SPO



Copyright © 2003 UKCS. All Rights Reserved.