[Biojava-l] Revised Parser

Thomas Down td2@sanger.ac.uk
Thu, 8 Feb 2001 11:35:47 +0000


On Wed, Feb 07, 2001 at 02:46:51PM -0500, Cox, Greg wrote:
> I'm revising the parsers to log a message when they come across a location
> they don't understand, and continue processing the file; instead of throwing
> an exception and bombing out.  This will let us push off issues like the
> remote location problem.  I have a question for the list:
> 
> 	Should these revised parsers supplement or replace the current
> parsers?  I.e., is anyone's program going to break if bad files are
> partially processed instead of crashing the program?  A log message is
> written to System.err so it's not a silent failure.
> 
> 	If you'd like this to be a second parser instead of replacing the
> original, I'd appriciate a name for it; I can't come up with a good one.


Can I just suggest a third option: merge the two and add a boolean
property (`acceptRemoteFeatures'?)( to control behaviour.  Since
this is in GenbankProcessor (I presume...) you'll also need to add 
this property to GenbankProcessor.Factory and propogate it when
you construct processors.

This seems easier to me that having two separate classes, but
users really ought to be able to choose the behaviour they want.

Does this make sense?

    Thomas.