edu.vt.marian.WebGate
Class query_manager

java.lang.Object
  |
  +--edu.vt.marian.WebGate.query_manager

public class query_manager
extends java.lang.Object

Class name: query_manager Class description: this class manages a buntch of queries for a user, it can envolve to a database in the future, but that's hided to outside, same service will still be available after that. Author: Jianxin Zhao Finished time: ????, 1998 Known bugs: none Platform: jdk1.1.5 under UNIX


Constructor Summary
query_manager(java.io.DataInputStream dis, edu.vt.marian.common.Debug debug)
          this constructor will create a query manager object from a stream, this might be helpful for rmote manage in the future.
query_manager(edu.vt.marian.common.Debug debug)
          this constructor will create a query manager object, the onject is empty upon creation
query_manager(java.lang.String dir, edu.vt.marian.common.Debug debug)
          this constructor will create a query manager object from the specified directory, the directory probably contains all the query information about a user
 
Method Summary
 java.lang.String delete_queries(general_query_data gqd)
          this method will delete all the queries from this object which are matched with the specified query data.
 java.lang.String delete_query(java.lang.String query_number)
          this method will delete the query with the specified query number from this object.
 java.lang.String get_number_queries_after(java.lang.String time)
          this method will return the number of queries the submitted after the specified time.
 java.lang.String get_number_queries_before(java.lang.String time)
          this method will return the number of queries the submitted before the specified time.
 java.lang.String get_number_queries_between(java.lang.String start_time, java.lang.String end_time)
          this method will return the number of queries the submitted from the start time to the end time.
 java.lang.String get_number_queries()
          this method will return the total number of queries in this object
 java.lang.String get_number_queries(general_query_data gqd)
          this method will return the number of queries in this object which are matched with the specified query data.
 java.util.Vector get_queries_after(java.lang.String time)
          this method will return all the queries submitted from the specified time to now.
 java.util.Vector get_queries_before(java.lang.String time)
          this method will return all the queries the submitted before the specified time.
 java.util.Vector get_queries_between(java.lang.String start_time, java.lang.String end_time)
          this method will return all the queries submitted from the start time to the end time.
 java.util.Vector get_queries(general_query_data gqd)
          this method will return all the queries in this object which are matched with the specified query data.
 query get_query(java.lang.String query_number)
          this method will return a query of this object, the query is identified by the parameter query_number, we use string for it since this allow the queries performed by a user exceed the integer limit (more than 2 billion in java I believe), though this is unlikely.
 java.lang.String save(java.lang.String dir)
          this method will save this object to the specified directory
 java.lang.String submit_query(query_data qd)
          this method will add a new query with the specified query data to the query data base
 java.lang.String to_stream(java.io.DataOutputStream dos)
          this method will print the content of this object to a stream this might be useful for remote management in the future.
 java.lang.String unload(long time)
          this method will unload those queries which have not been accessed for the specified time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

query_manager

public query_manager(edu.vt.marian.common.Debug debug)
this constructor will create a query manager object, the onject is empty upon creation

query_manager

public query_manager(java.lang.String dir,
                     edu.vt.marian.common.Debug debug)
this constructor will create a query manager object from the specified directory, the directory probably contains all the query information about a user

query_manager

public query_manager(java.io.DataInputStream dis,
                     edu.vt.marian.common.Debug debug)
this constructor will create a query manager object from a stream, this might be helpful for rmote manage in the future. (not implemented yet)
Method Detail

submit_query

public java.lang.String submit_query(query_data qd)
this method will add a new query with the specified query data to the query data base

get_number_queries

public java.lang.String get_number_queries()
this method will return the total number of queries in this object

get_number_queries_before

public java.lang.String get_number_queries_before(java.lang.String time)
this method will return the number of queries the submitted before the specified time. (not implemented yet)

get_number_queries_after

public java.lang.String get_number_queries_after(java.lang.String time)
this method will return the number of queries the submitted after the specified time. (not implemented yet)

get_number_queries_between

public java.lang.String get_number_queries_between(java.lang.String start_time,
                                                   java.lang.String end_time)
this method will return the number of queries the submitted from the start time to the end time. (not implemented yet)

get_number_queries

public java.lang.String get_number_queries(general_query_data gqd)
this method will return the number of queries in this object which are matched with the specified query data. (not implemented yet)

get_query

public query get_query(java.lang.String query_number)
this method will return a query of this object, the query is identified by the parameter query_number, we use string for it since this allow the queries performed by a user exceed the integer limit (more than 2 billion in java I believe), though this is unlikely.

get_queries_before

public java.util.Vector get_queries_before(java.lang.String time)
this method will return all the queries the submitted before the specified time. (not implemented yet)

get_queries_after

public java.util.Vector get_queries_after(java.lang.String time)
this method will return all the queries submitted from the specified time to now. (not implemented yet)

get_queries_between

public java.util.Vector get_queries_between(java.lang.String start_time,
                                            java.lang.String end_time)
this method will return all the queries submitted from the start time to the end time. (not implemented yet)

get_queries

public java.util.Vector get_queries(general_query_data gqd)
this method will return all the queries in this object which are matched with the specified query data. (not implemented yet)

delete_query

public java.lang.String delete_query(java.lang.String query_number)
this method will delete the query with the specified query number from this object. (not implemented yet)

delete_queries

public java.lang.String delete_queries(general_query_data gqd)
this method will delete all the queries from this object which are matched with the specified query data. (not implemented yet)

unload

public java.lang.String unload(long time)
this method will unload those queries which have not been accessed for the specified time

to_stream

public java.lang.String to_stream(java.io.DataOutputStream dos)
this method will print the content of this object to a stream this might be useful for remote management in the future. (not implemented yet)

save

public java.lang.String save(java.lang.String dir)
this method will save this object to the specified directory