Package org.biojava.bio.seq.projection
Feature Projection is the BioJava system whereby a feature hierarchy can be transformed into a similar hierarchy with feature properties systematically modified. For example, projection may translate all features by 120 residues, or add an annotation property to all features.
This package contains the underlying `engine' code for feature
projection. ProjectedFeatureHolder
uses a
ProjectionContext
to project a set of features.
ProjectionEngine
does the actual magic of gluing the projected
features through a ProjectionContext
to the underlying features.
There are several implementations of ProjectionContext provided here for your convenience. They do standard things like translate or flip features, and graft them into another feature hierarchy.
To develop your own projections, implement ProjectionContext
and
provide the necessary projection methods. ReparentContext
is a really
good base-class to use for deriving your custom projections (belive me, getting
the basics of an implementation right are not simple) and will handle both the
re-rooting of the feature hierarchy and also any event wiring needed.
ProjectionContext
does deep voodoo involving introspeciton and class
generation. If you don't really want to know the gory details, we
strongly suggest that you don't take a peek inside.
-
Interface Summary Interface Description Projection Interface implemented by all projected feature objects.ProjectionContext Interface that defines the projection between original features and projected features.ProjectionEngine.Instantiator Internal helper class.ProjectionEngine.TemplateProjector This is an interface for things that project feature templates. -
Class Summary Class Description ProjectedFeature Internal class used by ProjectionEngine to wrap Feature objects.ProjectedFeatureHolder Helper class for projecting Feature objects into an alternative coordinate system.ProjectionEngine Factory for proxy objects which project BioJava features into alternate coordinate systems.ProjectionUtils Some common things you want to do while projecting features.ReparentContext A good base class to implement ProjectionContext from.TranslateFlipContext A ProjectionContext that translates and optionaly flips features.