Exporting
The Exporter is
a tool for exporting
the election data from the database into CSV, XML and a binary format
used by the Viewer.
Configuration
The following
configuration variables are defined
in <gswing_home>/etc/properties.cfg:
- serPath=<gswing_home>/data # the directory storing the serialised files
- serFileName=overall.txt # the file containing overall results
Note: the file
extension
.txt for files that are not text files is a current work around for
file name extensions restriction on the web server gswing Scotland
resides, this will change in the future.
Using the
Exporter
The export is
invoked from Tools -> Exporter,
and the options are:
- Export
database to XML
- Select
this option to export the election data to an XML file.
- You will
be presented with a list of elections in the database. Select one
or more you wish to create an XML file for.
- The XML
file will be named after the election name and inserted into
<gswing>/data/xml
- Export
database to CSV (comma seperated file)
- Select
this option to export the election data to a CSV file.
- You will
be presented with a list of elections in the database. Select one or more you wish
to create a CSV file for.
- Extract to
serialised files.
- The
Extractor exports the election data into compressed serialised files
that are read by the Viewer. It
creates a file for each region in the database (named
<region_name.txt>), a single file containing all regional results
and a single file containing the overall results.