public class DataBaseImporter
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DataBaseImporter.DataBaseImporterError |
| Constructor and Description |
|---|
DataBaseImporter(int id,
Project project,
Concept concept,
java.lang.String dbmapping)
Constructor for DataBaseImporter
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMissingValues()
method to add values from the table to an attributes allowed values
Only for used
|
void |
checkData()
method to check if the read data is valid
|
boolean |
connectToDatabase(int id)
Establish a connection to a given postgreSQL Database
|
void |
doImport()
maps the read data to cases
|
int |
getCurrentNumberOfCases() |
java.lang.String |
getSeperatorMultiple() |
java.lang.String |
getTableName()
Returns the TableName which should be used for import
|
int |
getTotalNumberOfCases() |
boolean |
isImporting() |
boolean |
readData(java.lang.String table,
java.lang.String[] filtercolumns,
java.lang.String[] filtervalues)
Reads the Data from the table of a given database
|
void |
readMetaDataFromDatabase(java.lang.String table)
Method to get the columnNames of the table from which the data is read
|
void |
readMetaDataFromXML()
Method to get the mapping for columns and attributes from an xml file
|
void |
setSeperatorMultiple(java.lang.String seperator) |
void |
setTableName(java.lang.String tablename)
Sets the tablename which should be used for import
|
public boolean connectToDatabase(int id)
public boolean readData(java.lang.String table,
java.lang.String[] filtercolumns,
java.lang.String[] filtervalues)
table - the name of the table to read the data fromfiltercolumns - an array with the names of the columns for a where clausefiltervalues - an array with the values of the columns for a where clausepublic void readMetaDataFromDatabase(java.lang.String table)
public void readMetaDataFromXML()
public void addMissingValues()
public void checkData()
public void doImport()
public java.lang.String getTableName()
public void setTableName(java.lang.String tablename)
tablename - public int getTotalNumberOfCases()
public int getCurrentNumberOfCases()
public java.lang.String getSeperatorMultiple()
public void setSeperatorMultiple(java.lang.String seperator)
public boolean isImporting()