A class to validate the contents of a {@link Gedcom} structure. It is used primarily for those users who wish tocreate and write GEDCOM files, and is of little importance or use to those who wish only to read/parse GEDCOM files and use their data. Validation is performed automatically prior to writing a GEDCOM file by default (although this can be disabled), and there is support for automatically repairing ("autorepair") issues found.
Note that the validation framework is a work in progress and as such, is incompletely implemented at this time.
General usage is as follows:
Note again that by default, validation is performed automatically by the {@link org.gedcom4j.writer.GedcomWriter}class when writing a GEDCOM file out.
The validation framework, by default and unless disabled, will attempt to automatically repair ("autorepair") problems it finds in the object graph, so that if written as a GEDCOM file, the file written will conform to the GEDCOM spec, as well as to help the developer avoid NullPointerExceptions due to certain items not being instantiated.
This section lists a number of the actions taken automatically when autorepair is enabled.
|
|