## org.biojavax.bio.db.biosql
Class BioSQLFeatureFilter.BySourceTerm

    java.lang.Object
      org.biojavax.bio.db.biosql.BioSQLFeatureFilter.HibernateFeatureFilter
          org.biojavax.bio.db.biosql.BioSQLFeatureFilter.BySourceTerm

All Implemented Interfaces:
  Serializable, FeatureFilter, BioSQLFeatureFilter

Enclosing interface:
  BioSQLFeatureFilter

    public static final class BioSQLFeatureFilter.BySourceTerm

extends BioSQLFeatureFilter.HibernateFeatureFilter

Construct one of these to filter features by source.

Since:
  1.5
Author:
  Matthew Pocock, Richard Holland
See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface org.biojavax.bio.db.biosql.BioSQLFeatureFilter

`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, BioSQLFeatureFilter.Tools`

Nested classes/interfaces inherited from interface org.biojava.bio.seq.FeatureFilter

`FeatureFilter.AnnotationContains, FeatureFilter.ByAncestor, FeatureFilter.ByAnnotation, FeatureFilter.ByAnnotationType, FeatureFilter.ByChild, FeatureFilter.ByClass, FeatureFilter.ByComponentName, FeatureFilter.ByDescendant, FeatureFilter.ByFeature, FeatureFilter.ByPairwiseScore, FeatureFilter.ByParent, FeatureFilter.BySource, FeatureFilter.ByType, FeatureFilter.ContainedByLocation, FeatureFilter.FrameFilter, FeatureFilter.HasAnnotation, FeatureFilter.OnlyChildren, FeatureFilter.OnlyDescendants, FeatureFilter.OverlapsLocation, FeatureFilter.ShadowContainedByLocation, FeatureFilter.ShadowOverlapsLocation, FeatureFilter.StrandFilter`

Field Summary

Fields inherited from class org.biojavax.bio.db.biosql.BioSQLFeatureFilter.HibernateFeatureFilter
`and, conjunctAdd, conjunction, disjunctAdd, disjunction, eq, ge, le, not, or`

Fields inherited from interface org.biojavax.bio.db.biosql.BioSQLFeatureFilter
`all, none`

Fields inherited from interface org.biojava.bio.seq.FeatureFilter
`leaf, top_level`

Constructor Summary
`BioSQLFeatureFilter.BySourceTerm(ComparableTerm sourceTerm)` Create a BySourceTerm filter that filters in all features with sourceTerm fields equal to source.

Method Summary
`boolean` `accept(Feature f)` Returns true if the feature has a matching source property.
`Object` `asCriterion()` This method returns a Hibernate Criterion object that can be used to query the database.
`boolean` `equals(Object o)`
`ComparableTerm` `getSourceTerm()`
`int` `hashCode()`
`String` `toString()`

Methods inherited from class org.biojavax.bio.db.biosql.BioSQLFeatureFilter.HibernateFeatureFilter
`criterionAliasMap`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BioSQLFeatureFilter.BySourceTerm

    public BioSQLFeatureFilter.BySourceTerm(ComparableTerm sourceTerm)

  Create a BySourceTerm filter that filters in all features with sourceTerm fields equal to source.

  Parameters:
    `sourceTerm` - the Term to match sourceTerm fields against

Method Detail

### getSourceTerm

    public ComparableTerm getSourceTerm()

### accept

    public boolean accept(Feature f)

  Returns true if the feature has a matching source property.

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

### asCriterion

    public Object asCriterion()

  Description copied from interface: `BioSQLFeatureFilter`
  This method returns a Hibernate Criterion object that can be used to query the database.

  Returns:
    a Hibernate Criterion object representing this filter.

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`