Class SequenceDBSearchResult

  • All Implemented Interfaces:
    Annotatable, SeqSimilaritySearchResult, Changeable

    public class SequenceDBSearchResult
    extends AbstractChangeable
    implements SeqSimilaritySearchResult, Annotatable
    Deprecated.
    SimpleSeqSimilaritySearchResult has been made Annotatable and is now functionally identical.
    SequenceDBSearchResult objects represent a result of a search of a SymbolList against the sequences within a SequenceDB object. The core data (query sequence, database, search parameters, hits) have accessors, while supplementary data are stored in the Annotation object. Supplementary data are typically the more loosely formatted details which vary from one search program to another (and between versions of those programs).
    Since:
    1.1
    Author:
    Keith James, Matthew Pocock
    See Also:
    AbstractChangeable, SeqSimilaritySearchResult, Annotatable
    • Field Detail

      • annotationForwarder

        protected transient ChangeForwarder annotationForwarder
        Deprecated.
    • Constructor Detail

      • SequenceDBSearchResult

        public SequenceDBSearchResult​(Sequence querySequence,
                                      SequenceDB sequenceDB,
                                      java.util.Map searchParameters,
                                      java.util.List hits,
                                      Annotation annotation)
        Deprecated.
        Creates a new SequenceDBSearchResult.
        Parameters:
        querySequence - a Sequence.
        sequenceDB - a SequenceDB.
        searchParameters - a Map.
        annotation - an Annotation.
        hits - a List.
    • Method Detail

      • getSearchParameters

        public java.util.Map getSearchParameters()
        Deprecated.
        Description copied from interface: SeqSimilaritySearchResult
        Returns the search parameters used in the search that produced this search result.
        Specified by:
        getSearchParameters in interface SeqSimilaritySearchResult
        Returns:
        the (immutable) search parameter Map object. May return null.
      • getHits

        public java.util.List getHits()
        Deprecated.
        Description copied from interface: SeqSimilaritySearchResult
        Return all hits in this sequence similarity search result. The hits are sorted from best to worst.
        Specified by:
        getHits in interface SeqSimilaritySearchResult
        Returns:
        an (immutable) List of SeqSimilaritySearchHit objects containing all hits in the search result. Never returns null but may return an empty list.
      • getAnnotation

        public Annotation getAnnotation()
        Deprecated.
        getAnnotation returns the Annotation associated with this hit.
        Specified by:
        getAnnotation in interface Annotatable
        Returns:
        an Annotation.
      • equals

        public boolean equals​(java.lang.Object other)
        Deprecated.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object
      • getChangeSupport

        protected ChangeSupport getChangeSupport​(ChangeType ct)
        Deprecated.
        Description copied from class: AbstractChangeable
        Called to retrieve the ChangeSupport for this object.

        Your implementation of this method should have the following structure:

         ChangeSupport cs = super.getChangeSupport(ct);
        
         if(someForwarder == null && ct.isMatching(SomeInterface.SomeChangeType)) {
           someForwarder = new ChangeForwarder(...
        
           this.stateVariable.addChangeListener(someForwarder, VariableInterface.AChange);
         }
        
         return cs;
         
        It is usual for the forwarding listeners (someForwarder in this example) to be transient and lazily instantiated. Be sure to register & unregister the forwarder in the code that does the ChangeEvent handling in setter methods.
        Overrides:
        getChangeSupport in class AbstractChangeable