[Biojava-l] FeatureHolder.containsFeature()

David Huen smh1008@cus.cam.ac.uk
Wed, 3 Apr 2002 22:17:11 +0100 (BST)


Hi,
I'm going thru' the process of doing a Gadfly-to-BioJava bridge.

What are the semantics of containsFeature() should have?  In
SimpleFeatureHolder.java, it goes for the objects being identical which
makes sense for an in-memory implementation but much more problematic
with a database-backed object.

If containsFeature() should work on "equality" of object, when should
objects be equal?  When all fields are identical?  Or when Location type
(and strand if relevant) match?  How do we deal with the annotation
bundle?  If it is required for equality how do we deem equality?  

Or do we attempt to circumvent all this by requiring that the feature has
the same row id in its respective table as the feature being compared?

Thanks,
David Huen