net.sf.ciccgrid.pws
Class Synonyms

java.lang.Object
  extended by net.sf.ciccgrid.pws.Synonyms

public class Synonyms
extends java.lang.Object

Methods to get synonyms from ID's and SMILES and vice versa.

Author:
rguha

Constructor Summary
Synonyms()
           
 
Method Summary
 java.lang.String[] getCompoundSynonyms(java.lang.String identifier, boolean isCID)
          Get the synonyms for a compound.
 java.lang.String[] getSmilesBySynonym(java.lang.String synonym)
          Returns the SMILES corresponding to a given synonym.
 java.lang.String[] getSubstanceSynonyms(java.lang.String identifier)
          Get the synonyms for a substance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Synonyms

public Synonyms()
         throws java.sql.SQLException,
                java.lang.ClassNotFoundException
Throws:
java.sql.SQLException
java.lang.ClassNotFoundException
Method Detail

getCompoundSynonyms

public java.lang.String[] getCompoundSynonyms(java.lang.String identifier,
                                              boolean isCID)
                                       throws java.sql.SQLException,
                                              java.lang.ClassNotFoundException
Get the synonyms for a compound.

The compound can be specified via its CID or as a SMILES string

Parameters:
identifier - The CID or SMILES string
isCID - true if the identifier is a CID, false if it is a SMILES string
Returns:
An array of synonyms if any are found, or else an array with the single element None
Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

getSubstanceSynonyms

public java.lang.String[] getSubstanceSynonyms(java.lang.String identifier)
                                        throws java.sql.SQLException,
                                               java.lang.ClassNotFoundException
Get the synonyms for a substance.

Parameters:
identifier - The substance identifier
Returns:
An array of synonyms if found, else an array with the single element None
Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

getSmilesBySynonym

public java.lang.String[] getSmilesBySynonym(java.lang.String synonym)
                                      throws java.lang.Exception
Returns the SMILES corresponding to a given synonym.

Parameters:
synonym - The synonym of interest
Returns:
An array of SMILES if found, else an array with the single string equal to None
Throws:
java.lang.Exception