org.geworkbench.parsers
Class FileFormat

java.lang.Object
  extended by org.geworkbench.parsers.FileFormat
Direct Known Subclasses:
DataSetFileFormat

public abstract class FileFormat
extends java.lang.Object

Copyright: Copyright (c) 2003

Company: First Genetic Trust Inc.

Version:
$Id: FileFormat.java 8326 2011-09-26 15:54:29Z zji $ Base class for reading input data files complying to a desired format. Support for any given microarray data format (e.g., Affymetrix MAS 5, GenePix, etc), can be provide as follows:
Author:
First Genetic Trust, Inc., my2248

Field Summary
protected  java.lang.String formatName
          The display name of the format.
 
Constructor Summary
FileFormat()
           
 
Method Summary
abstract  boolean checkFormat(java.io.File file)
          Checks if the contents of the designated file conform to the format.
abstract  java.lang.String[] getFileExtensions()
          Return the list of extensions (if any) for the files following this format.
 javax.swing.filechooser.FileFilter getFileFilter()
           
 java.lang.String getFormatName()
           
 boolean isMergeSupported()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

formatName

protected java.lang.String formatName
The display name of the format.

Constructor Detail

FileFormat

public FileFormat()
Method Detail

getFormatName

public java.lang.String getFormatName()
Returns:
The format name.

checkFormat

public abstract boolean checkFormat(java.io.File file)
                             throws java.io.InterruptedIOException
Checks if the contents of the designated file conform to the format.

Parameters:
file - File to check.
Returns:
True or false, depending on if the argument is well formed according to the format or not.
Throws:
java.io.InterruptedIOException

getFileExtensions

public abstract java.lang.String[] getFileExtensions()
Return the list of extensions (if any) for the files following this format.

Returns:

getFileFilter

public javax.swing.filechooser.FileFilter getFileFilter()
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.

isMergeSupported

public boolean isMergeSupported()