Package net.bioclipse.managers
Class InChIManager
java.lang.Object
net.bioclipse.managers.InChIManager
- All Implemented Interfaces:
IBactingManager
,net.bioclipse.managers.business.IBioclipseManager
Bioclipse manager that provides functionality to create and
validate InChI and InChIKeys.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.openscience.cdk.inchi.InChIGeneratorFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks the validity of the InChI.boolean
Checks the validity of the InChIkey.boolean
checkStrict
(String inchi) 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 givenIMolecule
.net.bioclipse.inchi.InChI
Generates an InChI for the givenIMolecule
, using the given options.boolean
Returns true if the InChI library can be used.boolean
isLoaded()
Returns true if the InChI library was properly loaded.load()
Loads the InChI library.options()
-
Field Details
-
factory
protected org.openscience.cdk.inchi.InChIGeneratorFactory factory
-
-
Constructor Details
-
InChIManager
Creates a newInChIManager
.- Parameters:
workspaceRoot
- location of the workspace, e.g. "."
-
-
Method Details
-
load
Loads the InChI library.- Returns:
- a
String
that reflects the success of loading
-
options
-
generate
public net.bioclipse.inchi.InChI generate(net.bioclipse.core.domain.IMolecule molecule, String options) throws Exception Generates an InChI for the givenIMolecule
, using the given options. This options String consists of one or more, space-delimited options, such as FixedH.- Parameters:
molecule
- theIMolecule
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 givenIMolecule
.- Parameters:
molecule
- theIMolecule
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
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
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
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
- Specified by:
getManagerName
in interfacenet.bioclipse.managers.business.IBioclipseManager
-
doi
Description copied from interface:IBactingManager
Lists the DOIs of the articles associated to this manager.- Specified by:
doi
in interfaceIBactingManager
- Returns:
- a
List
of String with DOIs
-