org.aisb.bio.tools
Class SequenceFetcher

java.lang.Object
  extended byorg.aisb.bio.tools.SequenceFetcher

public class SequenceFetcher
extends java.lang.Object

Give this class the name of a sequence, and it will fetch it via the web. This class implements the "command bean" design pattern, which just means that it's a command implemented as a JavaBean. This makes it easier to use from a variety of environments, such as JSP pages using JSTL.

Author:
Doug DeJulio

Constructor Summary
SequenceFetcher()
           
 
Method Summary
 void execute()
          Perform the retreival.
 java.lang.String getName()
           
 Sequence getSequence()
           
 java.lang.Class getType()
           
 void setGenbankIdentifier(java.lang.String gi)
          This is a "magic" setter, that builds the name correctly from a given genbank id.
 void setName(java.lang.String name)
           
 void setType(java.lang.Class type)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceFetcher

public SequenceFetcher()
Method Detail

getName

public java.lang.String getName()
Returns:
Returns the name.

setName

public void setName(java.lang.String name)
Parameters:
name - The name to set.

setGenbankIdentifier

public void setGenbankIdentifier(java.lang.String gi)
This is a "magic" setter, that builds the name correctly from a given genbank id.

Parameters:
gi -

getType

public java.lang.Class getType()
Returns:
Returns the type.

setType

public void setType(java.lang.Class type)
Parameters:
type - The type to set.

getSequence

public Sequence getSequence()
Returns:
Returns the sequence.

execute

public void execute()
             throws java.lang.Exception
Perform the retreival. For the moment, this method is very sloppy; we'll tidy it up over the course of the semester. This should be good enough for the first project.

Throws:
java.lang.Exception