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).AbstractChangeable
,
SeqSimilaritySearchResult
,
Annotatable
Annotatable.AnnotationForwarder
Modifier and Type | Field and Description |
---|---|
protected ChangeForwarder |
annotationForwarder |
ANNOTATION
Constructor and Description |
---|
SimpleSeqSimilaritySearchResult(Sequence querySequence,
SequenceDB sequenceDB,
Map searchParameters,
List hits,
Annotation annotation)
Creates a new
SimpleSeqSimilaritySearchResult . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
Annotation |
getAnnotation()
getAnnotation returns the Annotation associated
with this hit. |
protected ChangeSupport |
getChangeSupport(ChangeType ct)
Called to retrieve the ChangeSupport for this object.
|
List |
getHits()
Return all hits in this sequence similarity search result.
|
Sequence |
getQuerySequence()
Returns the query sequence which was used to perform the search.
|
Map |
getSearchParameters()
Returns the search parameters used in the search that produced
this search result.
|
SequenceDB |
getSequenceDB()
Returns the sequence database against which the search was
performed.
|
int |
hashCode() |
String |
toString() |
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
protected transient ChangeForwarder annotationForwarder
public SimpleSeqSimilaritySearchResult(Sequence querySequence, SequenceDB sequenceDB, Map searchParameters, List hits, Annotation annotation)
SimpleSeqSimilaritySearchResult
.querySequence
- a Sequence
.sequenceDB
- a SequenceDB
.searchParameters
- a Map
.annotation
- an Annotation
.hits
- a List
.public Sequence getQuerySequence()
SeqSimilaritySearchResult
getQuerySequence
in interface SeqSimilaritySearchResult
Sequence
object used to search the
SequenceDB
. Never returns null.public SequenceDB getSequenceDB()
SeqSimilaritySearchResult
getSequenceDB
in interface SeqSimilaritySearchResult
SequenceDB object
against which the
search was carried out. Never returns null.public Map getSearchParameters()
SeqSimilaritySearchResult
getSearchParameters
in interface SeqSimilaritySearchResult
Map
object
. May return null.public List getHits()
SeqSimilaritySearchResult
getHits
in interface SeqSimilaritySearchResult
List
of
SeqSimilaritySearchHit
objects containing all hits
in the search result. Never returns null but may return an
empty list.public Annotation getAnnotation()
getAnnotation
returns the Annotation associated
with this hit.getAnnotation
in interface Annotatable
Annotation
.protected ChangeSupport getChangeSupport(ChangeType ct)
AbstractChangeable
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;
getChangeSupport
in class AbstractChangeable
Copyright © 2014 BioJava. All rights reserved.