org.biojava.bio.seq.homol
Class SimpleHomology

java.lang.Object
  extended byorg.biojava.utils.AbstractChangeable
      extended byorg.biojava.bio.seq.homol.SimpleHomology
All Implemented Interfaces:
Changeable, Homology

public class SimpleHomology
extends AbstractChangeable
implements Homology

A no-frills implementation of Homology.

Since:
1.2
Author:
Matthew Pocock, Keith James

Field Summary
 
Fields inherited from interface org.biojava.bio.seq.homol.Homology
ALIGNMENT
 
Constructor Summary
SimpleHomology()
          Creates a new empty SimpleHomology containing no Alignment and no FeatureHolder.
 
Method Summary
 Alignment getAlignment()
          getAlignment returns the alignment, which uses the HomologyFeatures as keys.
 FeatureHolder getFeatures()
          getFeatures returns the constituent HomologyFeatures which are also used as the keys in the alignment.
 void setAlignment(Alignment alignment)
          setAlignment sets the alignment which describes the homology.
 java.lang.String toString()
           
 
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleHomology

public SimpleHomology()
Creates a new empty SimpleHomology containing no Alignment and no FeatureHolder.

Method Detail

getFeatures

public FeatureHolder getFeatures()
getFeatures returns the constituent HomologyFeatures which are also used as the keys in the alignment.

Specified by:
getFeatures in interface Homology
Returns:
a FeatureHolder.

getAlignment

public Alignment getAlignment()
getAlignment returns the alignment, which uses the HomologyFeatures as keys.

Specified by:
getAlignment in interface Homology
Returns:
an Alignment.

setAlignment

public void setAlignment(Alignment alignment)
                  throws BioException,
                         ChangeVetoException
setAlignment sets the alignment which describes the homology. The alignment, should use the HomologyFeatures as keys. A suitable FeatureHolder is automatically created.

Parameters:
alignment - an Alignment.
Throws:
BioException - if an error occurs.
ChangeVetoException - if the SimpleHomology is locked.

toString

public java.lang.String toString()