@PipeBitInfo(name="JDBC Writer (Template)", description="Stores extracted information and document metadata in a database.", role=WRITER, dependencies={DOCUMENT_ID,IDENTIFIED_ANNOTATION}) public class JdbcWriterTemplate extends AbstractJdbcWriter
Modifier and Type | Class and Description |
---|---|
static class |
JdbcWriterTemplate.I2b2FieldInfo |
AbstractJdbcWriter.FieldInfo, AbstractJdbcWriter.TableInfo, AbstractJdbcWriter.TableSqlInfo
Modifier and Type | Field and Description |
---|---|
static String |
PARAM_VECTOR_TABLE |
protected static String |
SPAN_END_LABEL |
protected static String |
SPAN_START_LABEL |
_tableSqlInfoMap, PARAM_DB_CONN_RESRC
Constructor and Description |
---|
JdbcWriterTemplate() |
Modifier and Type | Method and Description |
---|---|
protected String |
createBlob(org.apache.uima.jcas.JCas jcas,
IdentifiedAnnotation annotation)
I2b2 wants annotation begin and end offsets plus the covered text
|
protected Collection<AbstractJdbcWriter.TableInfo> |
getTableInfos()
Called from initialize()
|
void |
initialize() |
protected void |
saveAnnotations(org.apache.uima.jcas.JCas jcas,
Map<JdbcWriterTemplate.I2b2FieldInfo,Object> fieldInfoValues,
String cui,
String preferredText,
Iterable<IdentifiedAnnotation> annotations,
boolean saveAffirmed) |
protected void |
writeJCasInformation(org.apache.uima.jcas.JCas jcas,
int encounterNum,
long patientNum,
String providerId,
Timestamp startDate)
The main "process" method, called from processCas
|
collectionProcessComplete, createRowInsertSql, getTableSqlInfoMap, processCas, setFieldInfoValue, writeTableRow
batchProcessComplete, destroy, getProcessingResourceMetaData, initialize, isReadOnly, isStateless, processCas, reconfigure, typeSystemInit
getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue
getCasManager, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger, setMetaData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final String PARAM_VECTOR_TABLE
protected static final String SPAN_START_LABEL
protected static final String SPAN_END_LABEL
public void initialize() throws org.apache.uima.resource.ResourceInitializationException
initialize
in class AbstractJdbcWriter
org.apache.uima.resource.ResourceInitializationException
protected Collection<AbstractJdbcWriter.TableInfo> getTableInfos()
getTableInfos
in class AbstractJdbcWriter
protected void writeJCasInformation(org.apache.uima.jcas.JCas jcas, int encounterNum, long patientNum, String providerId, Timestamp startDate) throws SQLException
writeJCasInformation
in class AbstractJdbcWriter
jcas
- -encounterNum
- -patientNum
- -providerId
- -startDate
- -SQLException
- if implementations throw SQLExceptionprotected void saveAnnotations(org.apache.uima.jcas.JCas jcas, Map<JdbcWriterTemplate.I2b2FieldInfo,Object> fieldInfoValues, String cui, String preferredText, Iterable<IdentifiedAnnotation> annotations, boolean saveAffirmed) throws SQLException
jcas
- -fieldInfoValues
- -cui
- -preferredText
- -annotations
- -saveAffirmed
- -SQLException
protected String createBlob(org.apache.uima.jcas.JCas jcas, IdentifiedAnnotation annotation)
jcas
- in case the blob needs to obtain annotation information from the jcasannotation
- -Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.