public abstract class DBExporter extends DBImporterExporter
Constructor and Description |
---|
DBExporter() |
Modifier and Type | Method and Description |
---|---|
abstract java.sql.Connection |
connectToDB(DBStrings dbstrings)
Given a DBStrings it connects to the DB and returns the
java.sql.Connection object
|
protected abstract void |
createTables(java.lang.Object out)
Generates DML code necessary to create all tables in a database, and
writes it to appropriate output.
|
void |
exportDatabaseAsFile(BibtexDatabase database,
MetaData metaData,
java.util.Set<java.lang.String> keySet,
java.lang.String file)
Accepts the BibtexDatabase and MetaData, generates the DML required to
create and populate SQL database tables, and writes this DML to the
specified output file.
|
void |
exportDatabaseToDBMS(BibtexDatabase database,
MetaData metaData,
java.util.Set<java.lang.String> keySet,
DBStrings dbStrings,
JabRefFrame frame)
Accepts the BibtexDatabase and MetaData, generates the DML required to
create and populate SQL database tables, and writes this DML to the
specified SQL database.
|
getDatabaseIDByName, removeAGivenDB, removeAllRecordsForAGivenDB, removeDB
public abstract java.sql.Connection connectToDB(DBStrings dbstrings) throws java.lang.Exception
dbstrings
- The DBStrings to use to make the connectionjava.lang.Exception
protected abstract void createTables(java.lang.Object out) throws java.sql.SQLException
out
- The output (PrintStream or Connection) object to which the DML
should be written.java.sql.SQLException
public void exportDatabaseAsFile(BibtexDatabase database, MetaData metaData, java.util.Set<java.lang.String> keySet, java.lang.String file) throws java.lang.Exception
database
- The BibtexDatabase to exportmetaData
- The MetaData object containing the groups informationkeySet
- The set of IDs of the entries to export.file
- The name of the file to which the DML should be writtenjava.lang.Exception
public void exportDatabaseToDBMS(BibtexDatabase database, MetaData metaData, java.util.Set<java.lang.String> keySet, DBStrings dbStrings, JabRefFrame frame) throws java.lang.Exception
database
- The BibtexDatabase to exportmetaData
- The MetaData object containing the groups informationkeySet
- The set of IDs of the entries to export.dbStrings
- The necessary database connection informationjava.lang.Exception