frizbog / gedcom4j

Java library for reading/writing genealogy files in GEDCOM format
http://gedcom4j.org
54 stars 36 forks source link

Fine-grained control over auto-repair during validation #133

Closed frizbog closed 8 years ago

frizbog commented 8 years ago

Currently auto-repair is an all-or-nothing prospect during validation. It would be good for users to be able to enable/disable auto-repair on specific classes, and to possibly have the validation framework "ask" the caller whether to auto-repair each item. Default behavior would be to auto-repair everything.

frizbog commented 8 years ago

Need to decide whether to provide control over auto-repairs of a specific type, on a specific class, or both.

frizbog commented 8 years ago

Better yet - let callers register a class for answering whether or not each repair should occur. When gedcom4j invokes the callback, the finding and proposed repair should be passed. The client code can return a true or false value for whether to proceed with each repair. Simple implementations of "allow none" and "allow all" can be provided, with allow-none as the default behavior.