Interface GFF3DocumentHandler


  • public interface GFF3DocumentHandler
    The interface for things that listen to GFF event streams.

    This allows the GFF push model to run over large collections of GFF, filter them and access other resources without requiring vast numbers of GFF records to be in memory at any one time.

    The stream includes both GFF records and comment lines. A particular handeler may choose to discard either of these.

    It is assumed that a particular handler will only be used to listen to a single stream of events in a single thread. Particular implementations may not impose this restriction.

    Author:
    Matthew Pocock, Thomas Down, Keith James (docs)
    • Method Detail

      • startDocument

        void startDocument​(String locator)
        Indicates that a new GFF document has been started. This gives you a hook to set up per-document resources.
        Parameters:
        locator - A URI for the stream being parsed.
      • endDocument

        void endDocument()
        Indicates that the current GFF document has now ended.

        This gives you the chance to flush results, or do calculations if you wish.

      • commentLine

        void commentLine​(String comment)
        A comment line has been encountered.

        comment has already had the leading '#' removed, and may have had leading-and-trailing whitespace trimmed.

        Parameters:
        comment - the comment String
      • recordLine

        void recordLine​(GFF3Record record)
        A record line has been encountered.

        It is already preseneted to you into a GFFRecord object.

        Parameters:
        record - the GFFRecord containing all the info