Class InChIManager

java.lang.Object
net.bioclipse.managers.InChIManager
All Implemented Interfaces:
IBactingManager, net.bioclipse.managers.business.IBioclipseManager

public class InChIManager extends Object implements IBactingManager
Bioclipse manager that provides functionality to create and validate InChI and InChIKeys.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.openscience.cdk.inchi.InChIGeneratorFactory
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    InChIManager(String workspaceRoot)
    Creates a new InChIManager.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    check(String inchi)
    Checks the validity of the InChI.
    boolean
    checkKey(String inchikey)
    Checks the validity of the InChIkey.
    boolean
    Checks the validity of the InChI using more strict rules.
    doi()
    Lists the DOIs of the articles associated to this manager.
    net.bioclipse.inchi.InChI
    generate(net.bioclipse.core.domain.IMolecule molecule)
    Generates an InChI for the given IMolecule.
    net.bioclipse.inchi.InChI
    generate(net.bioclipse.core.domain.IMolecule molecule, String options)
    Generates an InChI for the given IMolecule, using the given options.
     
    boolean
    Returns true if the InChI library can be used.
    boolean
    Returns true if the InChI library was properly loaded.
    Loads the InChI library.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • factory

      protected org.openscience.cdk.inchi.InChIGeneratorFactory factory
  • Constructor Details

    • InChIManager

      public InChIManager(String workspaceRoot)
      Creates a new InChIManager.
      Parameters:
      workspaceRoot - location of the workspace, e.g. "."
  • Method Details

    • load

      public String load()
      Loads the InChI library.
      Returns:
      a String that reflects the success of loading
    • options

      public List<String> options()
    • generate

      public net.bioclipse.inchi.InChI generate(net.bioclipse.core.domain.IMolecule molecule, String options) throws Exception
      Generates an InChI for the given IMolecule, using the given options. This options String consists of one or more, space-delimited options, such as FixedH.
      Parameters:
      molecule - the IMolecule to create the InChI for
      Returns:
      an InChI object
      Throws:
      Exception
    • generate

      public net.bioclipse.inchi.InChI generate(net.bioclipse.core.domain.IMolecule molecule) throws Exception
      Generates an InChI for the given IMolecule.
      Parameters:
      molecule - the IMolecule to create the InChI for
      Returns:
      an InChI object
      Throws:
      Exception
    • isLoaded

      public boolean isLoaded()
      Returns true if the InChI library was properly loaded.
      Returns:
      true if the InChI library was properly loaded.
    • checkKey

      public boolean checkKey(String inchikey) throws net.bioclipse.core.business.BioclipseException
      Checks the validity of the InChIkey.
      Parameters:
      inchikey - the InChIKey to test
      Returns:
      true if the key is valid
      Throws:
      net.bioclipse.core.business.BioclipseException
    • check

      public boolean check(String inchi) throws net.bioclipse.core.business.BioclipseException
      Checks the validity of the InChI.
      Parameters:
      inchi - the InChI to test
      Returns:
      true if the InChI is valid
      Throws:
      net.bioclipse.core.business.BioclipseException
    • checkStrict

      public boolean checkStrict(String inchi) throws net.bioclipse.core.business.BioclipseException
      Checks the validity of the InChI using more strict rules.
      Parameters:
      inchi - the InChI to test
      Returns:
      true if the InChI is valid
      Throws:
      net.bioclipse.core.business.BioclipseException
    • isAvailable

      public boolean isAvailable()
      Returns true if the InChI library can be used.
      Returns:
      true if the InChI library can be used.
    • getManagerName

      public String getManagerName()
      Specified by:
      getManagerName in interface net.bioclipse.managers.business.IBioclipseManager
    • doi

      public List<String> doi()
      Description copied from interface: IBactingManager
      Lists the DOIs of the articles associated to this manager.
      Specified by:
      doi in interface IBactingManager
      Returns:
      a List of String with DOIs