public class Import extends Object implements AutoCloseable
Use the methods in the following order:
constructor Import(Map), setOntology(Ontology), processOntology(), close()
| Constructor and Description |
|---|
Import(Connection dbMeta,
Connection dbData,
Map<String,String> props) |
Import(Map<String,String> props)
Connect to the i2b2 database.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
getDeleteAccessCount() |
int |
getDeleteConceptCount() |
int |
getDeleteMetaCount() |
int |
getInsertAccessCount() |
int |
getInsertConceptCount() |
int |
getInsertMetaCount() |
void |
processOntology() |
String |
readableConceptPath(String path)
Build a readable representation of a concept path.
|
void |
setOntology(Ontology ontology) |
void |
setWarningHandler(Consumer<String> warningHandler) |
public Import(Map<String,String> props) throws ClassNotFoundException, SQLException
Two connections are established: One for access to the metadata schema, the second for access to concept_dimension in the data schema.
Connection arguments start with meta.jdbc. or data.jdbc..
props - connection parameters.
Use meta.sourcesystem_cd for the source system.
jdbc.host, jdbc.port, jdbc.database are used to construct the connect string.
Any other parameters starting with jdbc. are also passed to DriverManager.getConnection(String, Properties).
More parameters: ont.language and ont.scheme.
ClassNotFoundException - if database driver not foundSQLException - for SQL errorspublic Import(Connection dbMeta, Connection dbData, Map<String,String> props) throws SQLException
SQLExceptionpublic int getInsertMetaCount()
public int getDeleteMetaCount()
public int getInsertConceptCount()
public int getDeleteConceptCount()
public int getInsertAccessCount()
public int getDeleteAccessCount()
public void processOntology()
throws SQLException,
OntologyException
SQLExceptionOntologyExceptionpublic String readableConceptPath(String path)
path - ontology pathpublic void setOntology(Ontology ontology)
public void close()
close in interface AutoCloseableCopyright © 2013–2017 R.W.Majeed. All rights reserved.