Base class for serializing models into the MOJO format.
The function of a MOJO writer is simply to write the model into a Zip archive consisting of several
text/binary files. This base class handles serialization of some parameters that are common to all `Model`s, but
anything specific to a particular Model should be implemented in that Model's corresponding ModelMojoWriter subclass.
When implementing a subclass, you have to override the single functions
AbstractMojoWriter.writeModelData()
. Within
this function you can use any of the following:
AbstractMojoWriter.writekv(String, Object)
to serialize any "simple" values (those that can be represented as a
single-line string).
AbstractMojoWriter.writeblob(String, byte[])
to add arbitrary blobs of data to the archive.
AbstractMojoWriter.startWritingTextFile(String)
/ AbstractMojoWriter.writeln(String)
/ AbstractMojoWriter.finishWritingTextFile()
to
add text files to the archive.
After subclassing this class, you should also override the
Model.getMojo()
method in your model's class to
return an instance of your new child class.