Class SequenceBuilderBase

    • Method Detail

      • startSequence

        public void startSequence()
        Description copied from interface: SeqIOListener
        Start the processing of a sequence. This method exists primarily to enforce the life-cycles of SeqIOListener objects.
        Specified by:
        startSequence in interface SeqIOListener
      • setName

        public void setName​(String name)
        Description copied from interface: SeqIOListener
        Notify the listener that the current sequence is generally known by a particular name.
        Specified by:
        setName in interface SeqIOListener
        Parameters:
        name - the String that should be returned by getName for the sequence being parsed
      • addSymbols

        public abstract void addSymbols​(Alphabet alpha,
                                        Symbol[] syms,
                                        int pos,
                                        int len)
                                 throws IllegalAlphabetException
        Description copied from interface: SeqIOListener
        Notify the listener of symbol data. All symbols passed to this method are guarenteed to be contained within the specified alphabet. Generally all calls to a given Listener should have the same alphabet -- if not, the listener implementation is likely to throw an exception
        Specified by:
        addSymbols in interface SeqIOListener
        Parameters:
        alpha - The alphabet of the symbol data
        syms - An array containing symbols
        pos - The start offset of valid data within the array
        len - The number of valid symbols in the array
        Throws:
        IllegalAlphabetException - if we can't cope with this alphabet.
      • addSequenceProperty

        public void addSequenceProperty​(Object key,
                                        Object value)
        Add an annotation-bundle entry to the sequence. If the annotation key isn't currently defined, the value is added directly. Otherwise:
        • If the current value implements the Collection interface, the new value is added to that collection.
        • Otherwise, the current value is replaced by a List object containing the old value then the new value in that order.
        Specified by:
        addSequenceProperty in interface SeqIOListener
      • startFeature

        public void startFeature​(Feature.Template templ)
        Description copied from interface: SeqIOListener
        Notify the listener that a new feature object is starting. Every call to startFeature should have a corresponding call to endFeature. If the listener is concerned with a hierarchy of features, it should maintain a stack of `open' features.
        Specified by:
        startFeature in interface SeqIOListener
      • addFeatureProperty

        public void addFeatureProperty​(Object key,
                                       Object value)
                                throws ParseException
        Add an annotation-bundle entry to the feature. If the annotation key isn't currently defined, the value is added directly. Otherwise:
        • If the current value implements the Collection interface, the new value is added to that collection.
        • Otherwise, the current value is replaced by a List object containing the old value then the new value in that order.
        Specified by:
        addFeatureProperty in interface SeqIOListener
        Throws:
        ParseException