edu.upenn.gloDB.io
Class GenBankTrack

java.lang.Object
  extended by edu.upenn.gloDB.io.GenBankTrack
All Implemented Interfaces:
DataFile, TrackFile

public class GenBankTrack
extends java.lang.Object
implements TrackFile

Import/Export Track data from/to GenBank files. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX THIS FILE IS A PLACE HOLDER xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Version:
$Id: GenBankTrack.java,v 1.1.2.13 2007/03/01 21:17:33 fisher Exp $

Nested Class Summary
private  class GenBankTrack.GenBankFilter
          GenBank specific FileFilter.
 
Field Summary
private  java.lang.String DESC
           
private  java.lang.String[] EXT
           
private  javax.swing.filechooser.FileFilter fileFilter
           
private  int ID
           
 
Constructor Summary
GenBankTrack()
           
 
Method Summary
 java.lang.String getDesc()
          Get a description of the file type.
 java.lang.String[] getExt()
          Get an array of file extensions.
 javax.swing.filechooser.FileFilter getFileFilter()
          Get a FileFilter for use in the GUI.
 int getID()
          Get the file ID.
 Track load(java.lang.String filename)
          Load all Features in the GenBank file into a single Track and return the resulting Track object.
 Track load(java.lang.String filename, java.lang.String seqID)
          Load all Features in the GenBank file into a single Track and return the resulting Track object.
 void save(java.lang.String id)
          Save the Track to a file based on it's ID.
 void save(java.lang.String id, java.lang.String filename, boolean overwrite)
          Save all Features in a GloDB file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

private final int ID
See Also:
Constant Field Values

DESC

private final java.lang.String DESC
See Also:
Constant Field Values

EXT

private final java.lang.String[] EXT

fileFilter

private final javax.swing.filechooser.FileFilter fileFilter
Constructor Detail

GenBankTrack

public GenBankTrack()
Method Detail

getID

public int getID()
Description copied from interface: DataFile
Get the file ID. FileIO contains constant values and string equivalents for built-in DataFiles.

Specified by:
getID in interface DataFile

getDesc

public java.lang.String getDesc()
Description copied from interface: DataFile
Get a description of the file type. This description will be used in the file chooser.

Specified by:
getDesc in interface DataFile

getExt

public java.lang.String[] getExt()
Description copied from interface: DataFile
Get an array of file extensions. These extensions will be used by the file chooser.

Specified by:
getExt in interface DataFile

getFileFilter

public javax.swing.filechooser.FileFilter getFileFilter()
Description copied from interface: DataFile
Get a FileFilter for use in the GUI.

Specified by:
getFileFilter in interface DataFile

load

public Track load(java.lang.String filename)
Load all Features in the GenBank file into a single Track and return the resulting Track object.

Specified by:
load in interface TrackFile

load

public Track load(java.lang.String filename,
                  java.lang.String seqID)
Load all Features in the GenBank file into a single Track and return the resulting Track object.

Specified by:
load in interface TrackFile
Notes:
need to throw FileIO exceptions, rather than just print errors.

save

public void save(java.lang.String id)
Save the Track to a file based on it's ID. This will overwrite any existing file and append ".gb" to the filename, if necessary.

Specified by:
save in interface TrackFile

save

public void save(java.lang.String id,
                 java.lang.String filename,
                 boolean overwrite)
Save all Features in a GloDB file.

Specified by:
save in interface TrackFile
Notes:
need to throw FileIO exceptions, rather than just print errors., Should offer option to include Sequence data.



Copyright 2012 Stephen Fisher and Junhyong Kim, University of Pennsylvania. All Rights Reserved.