edu.iastate.jtm.jmed
Class UmlsQueryClient

java.lang.Object
  extended by edu.iastate.jtm.jmed.UmlsQueryClient

public class UmlsQueryClient
extends java.lang.Object

A client utilizing UMLS server's xml query facility. This client is preferred over the UmlsSocketClient for more flexible and powerful queries. The server has an upper limit on the size of the response, so it is not suitable for queries with huge return size. The limit is estimated at ~50,000 records. This class should be used as composition, instead of inheritance.


Constructor Summary
UmlsQueryClient(java.lang.String template)
          Create a new UmlsQueryClient with a template query.
 
Method Summary
static void main(java.lang.String[] args)
          For test.
 char[] query(java.lang.String[] args)
          Send a query to the UMLS server.
 void setTiming(boolean t)
          Time the query if true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UmlsQueryClient

public UmlsQueryClient(java.lang.String template)
Create a new UmlsQueryClient with a template query.

Parameters:
template - template query file.
Method Detail

setTiming

public void setTiming(boolean t)
Time the query if true.

Parameters:
t - time the query if true.

query

public char[] query(java.lang.String[] args)
             throws gov.nih.nlm.kss.util.XMLException,
                    gov.nih.nlm.kss.util.DatabaseException
Send a query to the UMLS server.

Parameters:
args - Query arguments to be filled in the template.
Returns:
Server's response in xml format.
Throws:
gov.nih.nlm.kss.util.DatabaseException
gov.nih.nlm.kss.util.XMLException

main

public static void main(java.lang.String[] args)
For test.

Parameters:
args - template query file and argument file.