FeatureFilter (BioJava-1.5-beta API)
Keywords: org.biojava.bio.seq.FeatureFilter interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.seq
Interface FeatureFilter

All Superinterfaces:
  Serializable

All Known Subinterfaces:
  BioSQLFeatureFilter, OptimizableFilter

All Known Implementing Classes:
  BioSQLAcceptAllFilter, BioSQLAcceptNoneFilter, BioSQLFeatureFilter.And, BioSQLFeatureFilter.ByName, BioSQLFeatureFilter.ByNote, BioSQLFeatureFilter.ByNoteTermOnly, BioSQLFeatureFilter.ByRank, BioSQLFeatureFilter.BySequenceName, BioSQLFeatureFilter.BySourceTerm, BioSQLFeatureFilter.BySourceTermName, BioSQLFeatureFilter.ByStrand, BioSQLFeatureFilter.ByTypeTerm, BioSQLFeatureFilter.ByTypeTermName, BioSQLFeatureFilter.ContainedByRichLocation, BioSQLFeatureFilter.HibernateFeatureFilter, BioSQLFeatureFilter.Not, BioSQLFeatureFilter.Or, BioSQLFeatureFilter.OverlapsRichLocation, FeatureFilter.And, FeatureFilter.AnnotationContains, FeatureFilter.ByAncestor, FeatureFilter.ByAnnotation, FeatureFilter.ByAnnotationType, FeatureFilter.ByChild, FeatureFilter.ByClass, FeatureFilter.ByComponentName, FeatureFilter.ByDescendant, FeatureFilter.ByFeature, FeatureFilter.ByPairwiseScore, FeatureFilter.ByParent, FeatureFilter.BySequenceName, FeatureFilter.BySource, FeatureFilter.ByType, FeatureFilter.ContainedByLocation, FeatureFilter.FrameFilter, FeatureFilter.HasAnnotation, FeatureFilter.Not, FeatureFilter.OnlyChildren, FeatureFilter.OnlyDescendants, FeatureFilter.Or, FeatureFilter.OverlapsLocation, FeatureFilter.ShadowContainedByLocation, FeatureFilter.ShadowOverlapsLocation, FeatureFilter.StrandFilter

    public interface FeatureFilter

extends Serializable

A filter for accepting or rejecting a feature.

It is possible to write custom `FeatureFilter`s by implementing this interface. There are also a wide range of built-in features, and it is possible to build complex queries using `FeatureFilter.And`, `FeatureFilter.Or`, and `FeatureFilter.Not`. Where possible, use of the built-in filters is preferable to writing new filters, since the methods in the `FilterUtils` class have access to special knowledge about the built-in filter types and how they relate to one another.

If the filter is to be used in a remote process, it is recognized that it may be serialized and sent over to run remotely, rather than each feature being retrieved locally.

Since:
  1.0
Author:
  Matthew Pocock, Thomas Down

Nested Class Summary
`static class` | `FeatureFilter.And` A filter that returns all features accepted by both child filter.
`static class` | `FeatureFilter.AnnotationContains` Retrieve features that contain a given annotation, and that the set of values contains the value given.
`static class` | `FeatureFilter.ByAncestor` Filter by applying a nested `FeatureFilter` to all ancestor features.
`static class` | `FeatureFilter.ByAnnotation` Retrieve features that contain a given annotation with a given value.
`static class` | `FeatureFilter.ByAnnotationType` A filter that returns all features that have an annotation bundle that is of a given annotation type.
`static class` | `FeatureFilter.ByChild` Filter by applying a nested `FeatureFilter` to the child features.
`static class` | `FeatureFilter.ByClass` Filter which accepts only those filters which are an instance of a specific Java class
`static class` | `FeatureFilter.ByComponentName` Accepts features which are ComponentFeatures and have a `componentSequenceName` property of the specified value.
`static class` | `FeatureFilter.ByDescendant` Filter by applying a nested `FeatureFilter` to all descendant features.
`static class` | `FeatureFilter.ByFeature` Accept only features which are equal to the specified feature
`static class` | `FeatureFilter.ByPairwiseScore` `ByPairwiseScore` is used to filter `SimilarityPairFeature`s by their score.
`static class` | `FeatureFilter.ByParent` Filter by applying a nested `FeatureFilter` to the parent feature.
`static class` | `FeatureFilter.BySequenceName` Accept features that reside on a sequence with a particular name.
`static class` | `FeatureFilter.BySource` Construct one of these to filter features by source.
`static class` | `FeatureFilter.ByType` Construct one of these to filter features by type.
`static class` | `FeatureFilter.ContainedByLocation` A filter that returns all features contained within a location.
`static class` | `FeatureFilter.FrameFilter` Accept features with a given reading frame.
`static class` | `FeatureFilter.HasAnnotation` Retrieve features that contain a given annotation with any value.
`static class` | `FeatureFilter.Not` A filter that returns all features not accepted by a child filter.
`static class` | `FeatureFilter.OnlyChildren` Accepts features where all immediate children meet the supplied filter.
`static class` | `FeatureFilter.OnlyDescendants` Accepts features where all descendants meet the supplied filter.
`static class` | `FeatureFilter.Or` A filter that returns all features accepted by at least one child filter.
`static class` | `FeatureFilter.OverlapsLocation` A filter that returns all features overlapping a location.
`static class` | `FeatureFilter.ShadowContainedByLocation` A filter that accepts all features whose shadow is contained by a specified `Location`.
`static class` | `FeatureFilter.ShadowOverlapsLocation` A filter that accepts all features whose shadow overlaps a specified `Location`.
`static class` | `FeatureFilter.StrandFilter` Accept features with a given strandedness.

Field Summary
`static FeatureFilter` | `all` All features are selected by this filter.
`static FeatureFilter` | `leaf` A filter which accepts features with no children
`static FeatureFilter` | `none` No features are selected by this filter.
`static FeatureFilter` | `top_level` A filter which accepts only top-level Features.

Method Summary
`boolean` | `accept(Feature f)` This method determines whether a feature is to be accepted.

Field Detail

### all

    static final FeatureFilter all

  All features are selected by this filter.

### none

    static final FeatureFilter none

  No features are selected by this filter.

### top_level

    static final FeatureFilter top_level

  A filter which accepts only top-level Features. This is true is `getParent()` returns a `Sequence` instance.

  Since:
    1.3

### leaf

    static final FeatureFilter leaf

  A filter which accepts features with no children

  Since:
    1.3

Method Detail

### accept

    boolean accept(Feature f)

  This method determines whether a feature is to be accepted.

  Parameters:
    `f` - the Feature to evaluate
  Returns:
    true if this feature is to be selected in, or false if it is to be ignored

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD