edu.vt.marian.WebGate
Class query_data

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

public class query_data
extends java.lang.Object

Class name: query_data Class description: this class represent the data of a query, it's usually filled by a client, the design of this class make the fields it contains very flexible, a big improvement over the previous system I believe Author: Jianxin Zhao Finished time: ????, 1998 Known bugs: none Platform: jdk1.1.5 under UNIX


Constructor Summary
query_data(java.io.DataInputStream dis)
          this constructor will create a query_data object from a stream, this might be helpful for remote management in the future.
query_data(java.lang.String dir, edu.vt.marian.common.Debug debug)
          this constructor will create a query data object from the specified directory
query_data(java.lang.String title, java.util.Vector server_list, edu.vt.marian.common.Debug debug)
          this constructor will create a query data object, this object is empty upon creation
 
Method Summary
 java.lang.String add_field(java.util.Vector servers, java.lang.String name, java.lang.String value)
          this method will add the field with the specified value to the specified uip servers
 java.lang.String add_preference(java.lang.String name, java.lang.String value)
          this method will add the specified preference with the specified value to this object
 java.lang.String delete_field(java.util.Vector servers, java.lang.String name)
          this method will delete the specified field corresponds to the specified uip servers
 java.lang.String delete_prefernece(java.lang.String name)
          this method will delete the specified preference from this object
 java.util.Vector get_field_names(edu.vt.marian.uip.uip_server us)
          this method will return all the field names performed to the specified uip server, so different uip servers may have different field names
 java.util.Vector get_preference_names()
          this method will return all the preference names of this object
 java.lang.String get_preference_value(java.lang.String name)
          this method will return the value of the specified preference of this object
 java.lang.String get_relation(edu.vt.marian.uip.uip_server us)
          this method will return the relationship between fields performed to the specified uip server, so we support different relationships (such as "and", "or", ...) to different uip servers in the same query data object.
 java.util.Vector get_server_list()
          this method will return the server list to which this query data object is effective, note one query can be performed to multiple servers, we even support different queries to different servers in one query data object, see other methods of this object
 java.lang.String get_title()
          this method will return the title of this query data
 java.lang.String get_value(edu.vt.marian.uip.uip_server us, java.lang.String field_name)
          this method will return the value of the specified field to the specified uip server
 java.lang.String save(java.lang.String dir)
          this method will save this object to the specified file
 java.lang.String set_field(java.util.Vector servers, java.lang.String name, java.lang.String value)
          this method will set the specified fields to the specified value for the specified uip servers
 java.lang.String set_preference(java.lang.String name, java.lang.String value)
          this method will set the specified preference with the specified value
 java.lang.String set_relation(java.util.Vector servers, java.lang.String relation)
          this method will set the relation to the specified uip servers
 java.lang.String set_title(java.lang.String title)
          this method will set the title for this query data
 java.lang.String to_stream(java.io.DataOutputStream dos)
          this method will print the content of this object to a stream, might be helpful for remote management in the future
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

query_data

public query_data(java.lang.String title,
                  java.util.Vector server_list,
                  edu.vt.marian.common.Debug debug)
this constructor will create a query data object, this object is empty upon creation

query_data

public query_data(java.io.DataInputStream dis)
this constructor will create a query_data object from a stream, this might be helpful for remote management in the future. (not implemented yet)

query_data

public query_data(java.lang.String dir,
                  edu.vt.marian.common.Debug debug)
this constructor will create a query data object from the specified directory
Method Detail

set_title

public java.lang.String set_title(java.lang.String title)
this method will set the title for this query data

get_title

public java.lang.String get_title()
this method will return the title of this query data

get_server_list

public java.util.Vector get_server_list()
this method will return the server list to which this query data object is effective, note one query can be performed to multiple servers, we even support different queries to different servers in one query data object, see other methods of this object

get_field_names

public java.util.Vector get_field_names(edu.vt.marian.uip.uip_server us)
this method will return all the field names performed to the specified uip server, so different uip servers may have different field names

add_field

public java.lang.String add_field(java.util.Vector servers,
                                  java.lang.String name,
                                  java.lang.String value)
this method will add the field with the specified value to the specified uip servers

set_field

public java.lang.String set_field(java.util.Vector servers,
                                  java.lang.String name,
                                  java.lang.String value)
this method will set the specified fields to the specified value for the specified uip servers

delete_field

public java.lang.String delete_field(java.util.Vector servers,
                                     java.lang.String name)
this method will delete the specified field corresponds to the specified uip servers

get_value

public java.lang.String get_value(edu.vt.marian.uip.uip_server us,
                                  java.lang.String field_name)
this method will return the value of the specified field to the specified uip server

set_relation

public java.lang.String set_relation(java.util.Vector servers,
                                     java.lang.String relation)
this method will set the relation to the specified uip servers

get_relation

public java.lang.String get_relation(edu.vt.marian.uip.uip_server us)
this method will return the relationship between fields performed to the specified uip server, so we support different relationships (such as "and", "or", ...) to different uip servers in the same query data object. the ability to specify multiple different relationship to one uip server is not implemented due to complexity of doing so.

get_preference_names

public java.util.Vector get_preference_names()
this method will return all the preference names of this object

get_preference_value

public java.lang.String get_preference_value(java.lang.String name)
this method will return the value of the specified preference of this object

add_preference

public java.lang.String add_preference(java.lang.String name,
                                       java.lang.String value)
this method will add the specified preference with the specified value to this object

set_preference

public java.lang.String set_preference(java.lang.String name,
                                       java.lang.String value)
this method will set the specified preference with the specified value

delete_prefernece

public java.lang.String delete_prefernece(java.lang.String name)
this method will delete the specified preference from this object

to_stream

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

save

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