|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gswing.components.output.exporter.AbstractDbToFile
public abstract class AbstractDbToFile
Purpose: Abstract class for writing election data to file.
| Field Summary | |
|---|---|
protected int |
constituencyNo
|
static String |
CSV
|
static String |
DATA
|
protected IDbReadAccess |
dbAccess
|
protected Election |
election
|
protected Hashtable<Constituency,Result> |
results
|
protected static char |
SPACE
|
protected String |
targetDir
|
protected static char |
UNDERSCORE
|
static String |
XML
|
| Constructor Summary | |
|---|---|
AbstractDbToFile(IFramework framework,
String gswingHome,
String type,
boolean uploadFiles)
Constructor. |
|
| Method Summary | |
|---|---|
void |
doExport()
Kick off the export process. |
void |
export(Vector<Election> elections)
Kick off the export process. |
protected String |
getFileName(String extension)
Build generic file name with the given extension. |
IMessageHandling |
getLogger()
|
protected abstract void |
writeFile()
Write the election data to file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IDbReadAccess dbAccess
protected Election election
protected int constituencyNo
protected Hashtable<Constituency,Result> results
public static final String DATA
public static final String XML
public static final String CSV
protected static final char SPACE
protected static final char UNDERSCORE
protected String targetDir
| Constructor Detail |
|---|
public AbstractDbToFile(IFramework framework,
String gswingHome,
String type,
boolean uploadFiles)
framework - The framework object.gswingHome - The path where gswing is installed.type - export type string - csv or xml.uploadFiles - Should files be uploaded to server?| Method Detail |
|---|
public void doExport()
doExport in interface IExporterpublic void export(Vector<Election> elections)
elections - Elections to be exported.protected abstract void writeFile()
protected String getFileName(String extension)
extension - The file extension.
public IMessageHandling getLogger()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||