edu.upenn.gloDB.io
Class GloDBTrack

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

public class GloDBTrack
extends java.lang.Object
implements TrackFile

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

Version:
$Id: GloDBTrack.java,v 1.1.2.6 2007/02/16 17:14:47 fisher Exp $

Nested Class Summary
private  class GloDBTrack.GloDBFilter
          GloDB 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
GloDBTrack()
           
 
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 GloDB file into a single Track and return the resulting Track object.
 Track load(java.lang.String filename, java.lang.String sourceID)
          Load all Features in the GloDB 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

GloDBTrack

public GloDBTrack()
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 GloDB 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 sourceID)
Load all Features in the GloDB file into a single Track and return the resulting Track object. If a source isn't provided, then if appropriate, this will attempt to load source data from the file.

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 ".glo" 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. If the file already exists, then overwrite it if 'overwrite' is true.

Specified by:
save in interface TrackFile
Notes:
need to throw FileIO exceptions, rather than just print errors., Should probably throw an exception if the file exists and not supposed to overwrite the file., Should offer option to include Sequence data.



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