public class ProjectionEngine extends Object
ProjectionContext
object, and returns the resulting projected feature.
New feature-projection wrapper classes are generated
automatically as they are required.
Don't use this class directly. This class contains deep voodoo code. Run
away while you still can.
You may find that for some bizaare reason you need to manually project a feature
through a ProjectionContext. You should be using @link
ProjectionContext.projectFeature(). If this is not practical for some reason,
use this class. However, this probably indicates that you are doing something
mad.
Projected feature classes will be named as
org.biojava.bio.seq.projection.{$ctxt}.{$feat} where $ctxt and $feat are the
full class names of the context and feature respectively with each "."
character replaced with "_".
Delegate into this from your ProjectionContext to do the dirty work of
actually projecting features from the underlying data. This factory
generate a new class that is unique to the combination of your
projection context and the Feature interface that the projected feature
implements. Then, it will instantiate that class with your context and the
underlying feature. The returned feature will currently be an implementation
of the package-private class org.biojava.bio.seq.projection.ProjectedFeature,
but this is implementation detail and should not be relied upon.Modifier and Type | Class and Description |
---|---|
static interface |
ProjectionEngine.Instantiator
Internal helper class.
|
static interface |
ProjectionEngine.TemplateProjector
This is an interface for things that project feature templates.
|
Modifier and Type | Field and Description |
---|---|
static ProjectionEngine |
DEFAULT
The standard projection engine object.
|
Modifier and Type | Method and Description |
---|---|
Feature |
projectFeature(Feature f,
ProjectionContext ctx)
Return a projection of Feature
f into the system
defined by a given ProjectionContext. |
Feature.Template |
revertTemplate(Feature.Template templ,
ProjectionContext ctxt)
Revert a template so that it can be used on the original feature-space.
|
public static final ProjectionEngine DEFAULT
public Feature projectFeature(Feature f, ProjectionContext ctx)
f
into the system
defined by a given ProjectionContext. The returned object
will implement the same Feature interface (sub-interface of
Feature
as the underlying feature, and will also
implement the Projection
interface.public Feature.Template revertTemplate(Feature.Template templ, ProjectionContext ctxt)
This will use the revertFoo methods defined in the context to revert all of the transformed properties.
templ
- the template to revertctxt
- the context defining the reversionCopyright © 2014 BioJava. All rights reserved.