Package org.biojava.bio.seq.homol
Class SimpleHomology
- java.lang.Object
-
- org.biojava.utils.AbstractChangeable
-
- org.biojava.bio.seq.homol.SimpleHomology
-
- All Implemented Interfaces:
Homology,Changeable
public class SimpleHomology extends AbstractChangeable implements Homology
A no-frills implementation of Homology.- Since:
- 1.2
- Author:
- Matthew Pocock, Keith James
-
-
Constructor Summary
Constructors Constructor Description SimpleHomology()Creates a new emptySimpleHomologycontaining noAlignmentand noFeatureHolder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlignmentgetAlignment()getAlignmentreturns the alignment, which uses theHomologyFeatures as keys.FeatureHoldergetFeatures()getFeaturesreturns the constituentHomologyFeatures which are also used as the keys in the alignment.voidsetAlignment(Alignment alignment)setAlignmentsets the alignment which describes the homology.StringtoString()-
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
-
-
-
-
Constructor Detail
-
SimpleHomology
public SimpleHomology()
Creates a new emptySimpleHomologycontaining noAlignmentand noFeatureHolder.
-
-
Method Detail
-
getFeatures
public FeatureHolder getFeatures()
getFeaturesreturns the constituentHomologyFeatures which are also used as the keys in the alignment.- Specified by:
getFeaturesin interfaceHomology- Returns:
- a
FeatureHolder.
-
getAlignment
public Alignment getAlignment()
getAlignmentreturns the alignment, which uses theHomologyFeatures as keys.- Specified by:
getAlignmentin interfaceHomology- Returns:
- an
Alignment.
-
setAlignment
public void setAlignment(Alignment alignment) throws BioException, ChangeVetoException
setAlignmentsets the alignment which describes the homology. The alignment, should use theHomologyFeatures as keys. A suitableFeatureHolderis automatically created.- Parameters:
alignment- anAlignment.- Throws:
BioException- if an error occurs.ChangeVetoException- if theSimpleHomologyis locked.
-
-