Class GAMEFormat

  • All Implemented Interfaces:
    SequenceFormat

    public class GAMEFormat
    extends java.lang.Object
    implements SequenceFormat
    A rudimentary read-only GAME 1.2 Format object.
    Author:
    David Huen
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT  
    • Constructor Summary

      Constructors 
      Constructor Description
      GAMEFormat()  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String getDefaultFormat()
      Deprecated. 
      boolean readSequence​(java.io.BufferedReader reader, SymbolTokenization symParser, SeqIOListener listener)
      this version only reads annotations (no symbols)
      void writeSequence​(Sequence seq, java.io.PrintStream os)
      writeSequence writes a sequence to the specified PrintStream, using the default format.
      void writeSequence​(Sequence seq, java.lang.String format, java.io.PrintStream os)
      writeSequence writes a sequence to the specified PrintStream, using the specified format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GAMEFormat

        public GAMEFormat()
    • Method Detail

      • readSequence

        public boolean readSequence​(java.io.BufferedReader reader,
                                    SymbolTokenization symParser,
                                    SeqIOListener listener)
                             throws java.io.IOException
        this version only reads annotations (no symbols)
        Specified by:
        readSequence in interface SequenceFormat
        Parameters:
        reader - The stream of data to parse.
        symParser - A SymbolParser defining a mapping from character data to Symbols.
        listener - A listener to notify when data is extracted from the stream.
        Returns:
        a boolean indicating whether or not the stream contains any more sequences.
        Throws:
        java.io.IOException - if an error occurs while reading from the stream.
      • writeSequence

        public void writeSequence​(Sequence seq,
                                  java.io.PrintStream os)
        Description copied from interface: SequenceFormat
        writeSequence writes a sequence to the specified PrintStream, using the default format.
        Specified by:
        writeSequence in interface SequenceFormat
        Parameters:
        seq - the sequence to write out.
        os - the printstream to write to.
      • writeSequence

        public void writeSequence​(Sequence seq,
                                  java.lang.String format,
                                  java.io.PrintStream os)
        Description copied from interface: SequenceFormat
        writeSequence writes a sequence to the specified PrintStream, using the specified format.
        Specified by:
        writeSequence in interface SequenceFormat
        Parameters:
        seq - a Sequence to write out.
        format - a String indicating which sub-format of those available from a particular SequenceFormat implemention to use when writing.
        os - a PrintStream object.
      • getDefaultFormat

        public java.lang.String getDefaultFormat()
        Deprecated.
        getDefaultFormat returns the String identifier for the default format.
        Specified by:
        getDefaultFormat in interface SequenceFormat
        Returns:
        a String.