A class for writing the gedcom structure out as a GEDCOM 5.5 compliant file.
General usage is as follows:
GedcomWriter
, passing the {@link Gedcom} to be written as a parameter to the constructor.write
method to write the data By default, this class automatically validates your data prior to writing it by using a {@link org.gedcom4j.validate.GedcomValidator}. This is to prevent writing data that does not conform to the spec.
If validation finds any errors that are of severity ERROR, the writer will throw an Exception (usually {@link GedcomWriterVersionDataMismatchException} or {@link GedcomWriterException}). If this occurs, check the {@link #validationFindings} collection to determine what the problem was.
Although validation is automatically performed, autorepair is turned off by default (see {@link org.gedcom4j.validate.GedcomValidator#autorepair})...this way your data is not altered. Validation can be suppressed if you want by setting {@link #validationSuppressed} to true, but this is not recommended. You can alsoforce autorepair on if you want.
@author frizbog1
|
|