Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.seq.db
Class NCBISequenceDB

    java.lang.Object
      org.biojava.utils.AbstractChangeable
          org.biojava.bio.seq.db.WebSequenceDB
              org.biojava.bio.seq.db.NCBISequenceDB

All Implemented Interfaces:
  SequenceDBLite, Changeable

    public class NCBISequenceDB

extends WebSequenceDB

Author:
  Matthew Pocock, Mark Schreiber

Field Summary
`static String` | `DB_NUCLEOTIDE`
`static String` | `DB_PROTEIN`

Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite
`SEQUENCES`

Constructor Summary
`NCBISequenceDB()` Default constructor, querys the Genbank nucleotide database on "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi" and retrieves sequences in FastaFormat.
`NCBISequenceDB(String database, SequenceFormat format)` Parameterized constructor
`NCBISequenceDB(String server, String CGI, String database, SequenceFormat format)` Parameterized constructor

Method Summary
`protected URL` | `getAddress(String uid)`
`protected Alphabet` | `getAlphabet()`
`String` | `getDataBase()`
`String` | `getName()` Get the name of this sequence database.
`SequenceFormat` | `getSequenceFormat()`
`void` | `setDatabase(String dataBase)`
`void` | `setSequenceFormat(SequenceFormat format)`

Methods inherited from class org.biojava.bio.seq.db.WebSequenceDB
`addSequence, getSequence, removeSequence`

Methods inherited from class org.biojava.utils.AbstractChangeable
`addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.biojava.utils.Changeable
`addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener`

Field Detail

### DB_NUCLEOTIDE

    public static final String DB_NUCLEOTIDE

See Also:
  Constant Field Values

### DB_PROTEIN

    public static final String DB_PROTEIN

See Also:
  Constant Field Values

Constructor Detail

### NCBISequenceDB

    public NCBISequenceDB()

  Default constructor, querys the Genbank nucleotide database on "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi" and retrieves sequences in FastaFormat.

### NCBISequenceDB

    public NCBISequenceDB(String database,
                          SequenceFormat format)

  Parameterized constructor

  Parameters:
    `database` - must be one of "nucleotide" or "protein" (use the static DB fields)
    `format` - must be one of `GenbankFormat` or `FastaFormat`
  Throws:
    `BioRuntimeException` - if the database or format is invalid

### NCBISequenceDB

    public NCBISequenceDB(String server,
                          String CGI,
                          String database,
                          SequenceFormat format)
                   throws BioRuntimeException

  Parameterized constructor

  Parameters:
    `server` - eg "http://www.ncbi.nlm.nih.gov/"
    `CGI` - eg "entrez/query.fcgi"
    `database` - must be one of "nucleotide" or "protein" (use the static DB fields)
    `format` - must be one of `GenbankFormat` or `FastaFormat`
  Throws:
    `BioRuntimeException` - if the database or format is invalid

Method Detail

### getDataBase

    public String getDataBase()

### setDatabase

    public void setDatabase(String dataBase)
                     throws BioException

  Parameters:
    `dataBase` - must be one of "nucleotide" or "protein" (use the static DB fields)
  Throws:
    `BioException` - if an unknown database name is used.

### getSequenceFormat

    public SequenceFormat getSequenceFormat()

  Specified by:
    `getSequenceFormat` in class `WebSequenceDB`

### setSequenceFormat

    public void setSequenceFormat(SequenceFormat format)
                           throws BioException

  Parameters:
    `format` - must be one of `FastaFormat` or `GenbankFormat`
  Throws:
    `BioException` - if an unknown `SequenceFormat` is used

### getAlphabet

    protected Alphabet getAlphabet()

  Specified by:
    `getAlphabet` in class `WebSequenceDB`

### getAddress

    protected URL getAddress(String uid)
                      throws MalformedURLException

  Specified by:
    `getAddress` in class `WebSequenceDB`
  Throws:
    `MalformedURLException`

### getName

    public String getName()

  Description copied from interface: `SequenceDBLite`
  Get the name of this sequence database.

  Returns:
    the name of the sequence database, which may be null.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD