de.mpi_bremen.mgg.FastaValidator
Class FastaValidator

java.lang.Object
  extended by de.mpi_bremen.mgg.FastaValidator.FastaValidator

public class FastaValidator
extends java.lang.Object

The FastaValidator itself - main class of the package. Here everything is glued together.

Author:
Jost Waldmann

Nested Class Summary
static class FastaValidator.Sequencetype
          Represents parsable sequencetypes.
 
Constructor Summary
FastaValidator(FastaValidatorCallback callback)
          Constructs a FastaValidator and binds event methods.
 
Method Summary
 FastaValidator.Sequencetype getSequencetype()
          Returns current selected sequencetype.
 void setSequencetype(FastaValidator.Sequencetype seqtype)
          Sets the sequencetype to parse.
protected  void validate(FastaValidatorLexer lexer)
           
 void validate(java.io.Reader reader)
          Validates/Parses a fasta-formatted source.
 void validate(java.lang.String filename)
          Validates/Parses a fasta-formatted file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastaValidator

public FastaValidator(FastaValidatorCallback callback)
Constructs a FastaValidator and binds event methods.

Parameters:
callback - event method implementation
Method Detail

setSequencetype

public void setSequencetype(FastaValidator.Sequencetype seqtype)
Sets the sequencetype to parse.

Parameters:
seqtype - selected sequencetype

getSequencetype

public FastaValidator.Sequencetype getSequencetype()
Returns current selected sequencetype.


validate

public void validate(java.lang.String filename)
              throws java.io.FileNotFoundException,
                     java.io.IOException,
                     FastaValidatorException,
                     FastaHandlingException
Validates/Parses a fasta-formatted file.

Parameters:
filename - the file to be parsed
Throws:
java.io.FileNotFoundException
java.io.IOException
FastaValidatorException
FastaHandlingException

validate

public void validate(java.io.Reader reader)
              throws java.io.IOException,
                     FastaValidatorException,
                     FastaHandlingException
Validates/Parses a fasta-formatted source.

Parameters:
reader - the source to be parsed
Throws:
java.io.IOException
FastaValidatorException
FastaHandlingException

validate

protected void validate(FastaValidatorLexer lexer)
                 throws java.io.IOException,
                        FastaValidatorException,
                        FastaHandlingException
Throws:
java.io.IOException
FastaValidatorException
FastaHandlingException