graphServer.graph
Class QueryOutputs

java.lang.Object
  extended by graphServer.graph.QueryOutputs

public class QueryOutputs
extends java.lang.Object

Maps queryID Strings to a key index value. Provides methods for adding new queryIDs and getting queryIDs from a key value and vice versa.

Version:
Date: 18/07/2011
Author:
Matthew Smith

Constructor Summary
QueryOutputs()
           
 
Method Summary
 int getKey(java.lang.String queryID)
          Gets the key value for the passed queryID.
 java.lang.String getQueryID(int key)
          Gets the QueryID for the passed key
 int size()
          Returns the number of Query IDs in the list.
 java.lang.String toHTMLList()
          Returns the Query IDs formated as a list element for HTML display.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryOutputs

public QueryOutputs()
Method Detail

getKey

public int getKey(java.lang.String queryID)
Gets the key value for the passed queryID. If no such value exists, it is mapped and its key returned.

Parameters:
queryID - the query to get the key value of
Returns:
the key value for

getQueryID

public java.lang.String getQueryID(int key)
Gets the QueryID for the passed key

Parameters:
key - the key to get the query value of
Returns:
The query ID for the requested key value.

size

public int size()
Returns the number of Query IDs in the list.

Returns:
the number of Query IDs in the list.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toHTMLList

public java.lang.String toHTMLList()
Returns the Query IDs formated as a list element for HTML display.

Returns:
the list information with HTML list element tags.