org.geworkbench.components.parsers.sequences
Class SequenceFileFormat

java.lang.Object
  extended by org.geworkbench.components.parsers.FileFormat
      extended by org.geworkbench.components.parsers.microarray.DataSetFileFormat
          extended by org.geworkbench.components.parsers.sequences.SequenceFileFormat

public class SequenceFileFormat
extends DataSetFileFormat

Title: SequenceFileFormat

Description: SequenceFileFormat

Copyright: Copyright (c) 2003

Company: Califano Lab

Version:
1.0
Author:
Saroja Hanasoge

Nested Class Summary
 class SequenceFileFormat.FASTAFilter
          Defines a FileFilter to be used when the user is prompted to select Affymetrix input files.
 
Field Summary
 
Fields inherited from class org.geworkbench.components.parsers.FileFormat
formatName
 
Constructor Summary
SequenceFileFormat()
           
 
Method Summary
 boolean checkFormat(java.io.File file)
          Checks if the contents of the designated file conform to the format.
 DSDataSet getDataFile(java.io.File file)
           
 DSDataSet getDataFile(java.io.File[] files)
           
 java.lang.String[] getFileExtensions()
          Return the list of extensions (if any) for the files following this format.
 javax.swing.filechooser.FileFilter getFileFilter()
           
 DSMicroarraySet getMArraySet(java.io.File file)
          Generates and returns a MicrorarrauSet from the designated argument.
 java.util.List getOptions()
           
 Resource getResource(java.io.File file)
          Return a Resource object for the designated file.
 
Methods inherited from class org.geworkbench.components.parsers.microarray.DataSetFileFormat
getDataFile
 
Methods inherited from class org.geworkbench.components.parsers.FileFormat
getFormatName, getMArraySet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceFileFormat

public SequenceFileFormat()
Method Detail

getResource

public Resource getResource(java.io.File file)
Description copied from class: FileFormat
Return a Resource object for the designated file.

Specified by:
getResource in class FileFormat
Returns:

getFileExtensions

public java.lang.String[] getFileExtensions()
Description copied from class: FileFormat
Return the list of extensions (if any) for the files following this format.

Specified by:
getFileExtensions in class FileFormat
Returns:

checkFormat

public boolean checkFormat(java.io.File file)
Description copied from class: FileFormat
Checks if the contents of the designated file conform to the format.

Specified by:
checkFormat in class FileFormat
Parameters:
file - File to check.
Returns:
True or false, depending on if the argument is well formed according to the format or not.

getDataFile

public DSDataSet getDataFile(java.io.File file)
                      throws InputFileFormatException
Specified by:
getDataFile in class DataSetFileFormat
Throws:
InputFileFormatException

getDataFile

public DSDataSet getDataFile(java.io.File[] files)
Specified by:
getDataFile in class DataSetFileFormat

getMArraySet

public DSMicroarraySet getMArraySet(java.io.File file)
Description copied from class: FileFormat
Generates and returns a MicrorarrauSet from the designated argument. In file does not conform to the format, returns null.

Specified by:
getMArraySet in class FileFormat
Parameters:
file - The file containing the input data.
Returns:
The corresponding MicroarraySet object.

getOptions

public java.util.List getOptions()

getFileFilter

public javax.swing.filechooser.FileFilter getFileFilter()
Overrides:
getFileFilter in class FileFormat
Returns:
An (optional) FileFilter to be used in gating the files offered to the user for selection. Useful, e.g., when the files of the format at hand have predefined extensions.