Package org.biojava.bio.search
Class SimpleSeqSimilaritySearchResult
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.search.SimpleSeqSimilaritySearchResult
- All Implemented Interfaces:
Annotatable,SeqSimilaritySearchResult,Changeable
public class SimpleSeqSimilaritySearchResult
extends AbstractChangeable
implements SeqSimilaritySearchResult
SimpleSeqSimilaritySearchResult 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, Gerald Loeffler
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable
Annotatable.AnnotationForwarder -
Field Summary
FieldsFields inherited from interface org.biojava.bio.Annotatable
ANNOTATION -
Constructor Summary
ConstructorsConstructorDescriptionSimpleSeqSimilaritySearchResult(Sequence querySequence, SequenceDB sequenceDB, Map searchParameters, List hits, Annotation annotation) Creates a newSimpleSeqSimilaritySearchResult. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAnnotationreturns the Annotation associated with this hit.protected ChangeSupportCalled to retrieve the ChangeSupport for this object.getHits()Return all hits in this sequence similarity search result.Returns the query sequence which was used to perform the search.Returns the search parameters used in the search that produced this search result.Returns the sequence database against which the search was performed.inthashCode()toString()Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Field Details
-
annotationForwarder
-
-
Constructor Details
-
SimpleSeqSimilaritySearchResult
public SimpleSeqSimilaritySearchResult(Sequence querySequence, SequenceDB sequenceDB, Map searchParameters, List hits, Annotation annotation) Creates a newSimpleSeqSimilaritySearchResult.- Parameters:
querySequence- aSequence.sequenceDB- aSequenceDB.searchParameters- aMap.annotation- anAnnotation.hits- aList.
-
-
Method Details
-
getQuerySequence
Description copied from interface:SeqSimilaritySearchResultReturns the query sequence which was used to perform the search.- Specified by:
getQuerySequencein interfaceSeqSimilaritySearchResult- Returns:
- the
Sequenceobject used to search theSequenceDB. Never returns null.
-
getSequenceDB
Description copied from interface:SeqSimilaritySearchResultReturns the sequence database against which the search was performed.- Specified by:
getSequenceDBin interfaceSeqSimilaritySearchResult- Returns:
- the
SequenceDB objectagainst which the search was carried out. Never returns null.
-
getSearchParameters
Description copied from interface:SeqSimilaritySearchResultReturns the search parameters used in the search that produced this search result.- Specified by:
getSearchParametersin interfaceSeqSimilaritySearchResult- Returns:
- the (immutable) search parameter
Map object. May return null.
-
getHits
Description copied from interface:SeqSimilaritySearchResultReturn all hits in this sequence similarity search result. The hits are sorted from best to worst.- Specified by:
getHitsin interfaceSeqSimilaritySearchResult- Returns:
- an (immutable)
ListofSeqSimilaritySearchHitobjects containing all hits in the search result. Never returns null but may return an empty list.
-
getAnnotation
getAnnotationreturns the Annotation associated with this hit.- Specified by:
getAnnotationin interfaceAnnotatable- Returns:
- an
Annotation.
-
equals
-
hashCode
-
toString
-
getChangeSupport
Description copied from class:AbstractChangeableCalled to retrieve the ChangeSupport for this object.Your implementation of this method should have the following structure:
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.ChangeSupport cs = super.getChangeSupport(ct); if(someForwarder == null && ct.isMatching(SomeInterface.SomeChangeType)) { someForwarder = new ChangeForwarder(... this.stateVariable.addChangeListener(someForwarder, VariableInterface.AChange); } return cs;- Overrides:
getChangeSupportin classAbstractChangeable
-