com.compomics.util.experiment.biology
Class EnzymeFactory

java.lang.Object
  extended by com.compomics.util.experiment.biology.EnzymeFactory

public class EnzymeFactory
extends Object

This factory will provide the implemented enzymes.

Author:
Marc Vaudel

Method Summary
 void addEnzyme(Enzyme enzyme)
          Adds an enzyme in the factory.
 boolean enzymeLoaded(String enzyme)
          Indicates whether an enzyme is loaded in the factory.
 Enzyme getEnzyme(String enzymeName)
          Returns the enzyme corresponding to the given name.
 ArrayList<Enzyme> getEnzymes()
          Get the imported enzymes.
static EnzymeFactory getInstance()
          Static method to get an instance of the factory.
 void importEnzymes(File enzymeFile)
          Import enzymes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static EnzymeFactory getInstance()
Static method to get an instance of the factory.

Returns:
the factory instance

getEnzymes

public ArrayList<Enzyme> getEnzymes()
Get the imported enzymes.

Returns:
The enzymes as ArrayList

getEnzyme

public Enzyme getEnzyme(String enzymeName)
Returns the enzyme corresponding to the given name. Null if not found.

Parameters:
enzymeName - the name of the desired enzyme
Returns:
the corresponding enzyme

addEnzyme

public void addEnzyme(Enzyme enzyme)
Adds an enzyme in the factory.

Parameters:
enzyme - the new enzyme to add

enzymeLoaded

public boolean enzymeLoaded(String enzyme)
Indicates whether an enzyme is loaded in the factory.

Parameters:
enzyme - the name of the enzyme
Returns:
a boolean indicating whether an enzyme is loaded in the factory

importEnzymes

public void importEnzymes(File enzymeFile)
                   throws org.xmlpull.v1.XmlPullParserException,
                          IOException
Import enzymes.

Parameters:
enzymeFile - xml file containing the enzymes
Throws:
org.xmlpull.v1.XmlPullParserException - when the parser failed
IOException - when reading the corresponding file failed


Copyright © 2012. All Rights Reserved.