uk.ac.cam.ch.wwmm.opsin
Class OpsinResult

java.lang.Object
  extended by uk.ac.cam.ch.wwmm.opsin.OpsinResult

public class OpsinResult
extends java.lang.Object

Holds the structure OPSIN has generated from a name Additionally holds a status code for whether name interpretation was successful


Nested Class Summary
static class OpsinResult.OPSIN_RESULT_STATUS
          Whether parsing the chemical name was successful, encountered problems or was unsuccessful.
 
Method Summary
 java.lang.String getChemicalName()
          Returns the chemical name that this OpsinResult was generated frm
 nu.xom.Element getCml()
          Lazily evaluates and returns the CML corresponding to the molecule described by the name If name generation failed i.e.
 java.lang.String getMessage()
          Returns a message explaining why generation of a molecule from the name failed This string will be blank when no problems were encountered
 java.lang.String getSmiles()
          Lazily evaluates and returns the SMILES corresponding to the molecule described by the name If name generation failed i.e.
 OpsinResult.OPSIN_RESULT_STATUS getStatus()
          Returns an enum with values SUCCESS, WARNING and FAILURE Currently warning is never used
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStatus

public OpsinResult.OPSIN_RESULT_STATUS getStatus()
Returns an enum with values SUCCESS, WARNING and FAILURE Currently warning is never used

Returns:
OPSIN_RESULT_STATUS status

getMessage

public java.lang.String getMessage()
Returns a message explaining why generation of a molecule from the name failed This string will be blank when no problems were encountered

Returns:
String message

getChemicalName

public java.lang.String getChemicalName()
Returns the chemical name that this OpsinResult was generated frm

Returns:
String chemicalName

getCml

public nu.xom.Element getCml()
Lazily evaluates and returns the CML corresponding to the molecule described by the name If name generation failed i.e. the OPSIN_RESULT_STATUS is FAILURE then null is returned

Returns:
Element cml

getSmiles

public java.lang.String getSmiles()
Lazily evaluates and returns the SMILES corresponding to the molecule described by the name If name generation failed i.e. the OPSIN_RESULT_STATUS is FAILURE then null is returned

Returns:
String smiles