1 | ===== DBDriver =====
|
---|
2 |
|
---|
3 | Note that there are a couple of Drivers that could be further separated to
|
---|
4 | have even better OO, but I started to get bogged down in multiple inheritence
|
---|
5 | problems so I left them as is for now. For instance, separating PipedExecutable
|
---|
6 | support from the 70HyphenFormat driver would increase flexibility, but then it
|
---|
7 | becomes tricky to say which should inherit from which (in a single inheritence)
|
---|
8 | or what order methods should be resolved (in multiple inheritence).
|
---|
9 |
|
---|
10 | Notes:
|
---|
11 | * Didn't finish refactoring SQL based drivers
|
---|
12 | * ServerDrivers refactoring not done.
|
---|
13 | * Since TDBCluster was the only cluster, didn't do MergableDriver
|
---|
14 |
|
---|
15 | ==== Inheritence Overview ====
|
---|
16 |
|
---|
17 | * BaseDBDriver - superclass of all drivers. Some shared utility methods
|
---|
18 | including support for persistent connections (ala TDB).
|
---|
19 | Thus this is a candidate for separating out the the
|
---|
20 | PersistentConnectionsDriver.
|
---|
21 | * 70HyphenFormat - drivers that write and read their data via pipes to
|
---|
22 | external executables. Data is in simple Greenstone
|
---|
23 | archive form (i.e. key/value pairs and separated by
|
---|
24 | seventy hyphens) - this is a candidate for further
|
---|
25 | separating out a PipedExecutableDriver.
|
---|
26 | * GDBM - makes use of GDBM utils (txt2db, db2txt etc)
|
---|
27 | * GDBMTXTGZ - makes use of gzip (for later use with GDBM)
|
---|
28 | * JDBM - makes use of jdbm.jar and JDBMWrapper.jar
|
---|
29 | * TDB - makes use of TDB utils (txt2tdb, tdb2txt etc)
|
---|
30 | * SQLDrivers - drivers that read/write their data using SQL commands
|
---|
31 | * SQLITE - uses calls to SQLite3 via the command line
|
---|
32 | * MSSQL
|
---|
33 | * ServerDrivers - drivers that act as clients to externally running servers
|
---|
34 | * GDBMS - makes use of a custom GDBM server
|
---|
35 | * TDBS - makes use of a custom TDB server
|
---|
36 | * MergableDrivers - ???
|
---|
37 | * TDBC - ??? Knows how to merge several TDB files into one.
|
---|