|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.seq.SimpleFeatureRealizer
public class SimpleFeatureRealizer
FeatureRealizer which uses a lookup table to map template classes to implementations. Optionally, this implementation can fall back on another FeatureRealizer if it fails.
When searching for a Feature implementation to match a specific Feature.Template class, the following search order is used:
Constructor Summary | |
---|---|
SimpleFeatureRealizer()
|
|
SimpleFeatureRealizer(FeatureRealizer fallBack)
|
Method Summary | |
---|---|
void |
addImplementation(Class template,
Class impl)
Install a new mapping from a class of Feature.Template to a class of Feature implementations. |
Feature |
realizeFeature(Sequence seq,
FeatureHolder parent,
Feature.Template temp)
Install a feature on the specified sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleFeatureRealizer()
public SimpleFeatureRealizer(FeatureRealizer fallBack)
Method Detail |
---|
public void addImplementation(Class template, Class impl) throws BioException
A newly added implementation takes precendence over any existing implementations if a template can be realized by more than one implementation.
template
- The class of templates to implement.impl
- A class of Feature which can be used to implement these templates.
BioException
public Feature realizeFeature(Sequence seq, FeatureHolder parent, Feature.Template temp) throws BioException
FeatureRealizer
realizeFeature
in interface FeatureRealizer
seq
- The sequence to which the feature will be added.parent
- The FeatureHolder which is to be the Feature's
immediate parent.temp
- A description of the desired feature.
BioException
- If the feature could not be constructed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |