convert
public static BioSQLFeatureFilter convert(FeatureFilter ff)
Convert a non-BioSQL FeatureFilter into a BioSQL one. We do this
by walking through it, converting any ones we recognise into their
BioSQLFeatureFilter equivalents. If we don't recognise them, we take
special action. For the child of an And, we can just ignore the missing
side and replace the And itself with the remaining side. For everything else,
the entire FeatureFilter is replaced by BioSQLFeatureFilter.all else we
run the risk of missing out potential candidates.
The end result is a filter that can be applied to the
database to filter out potential candidates for more rigorous selection
in-memory by the default filter() method in AbstractRichSequenceDB. Whether or
not the filter picks out everything correctly depends entirely on whether it
is made up of BioSQLFeatureFilter elements, or can be converted into them.