@PipeBitInfo(name="Database Reader", description="Read documents from a database.", role=READER) public class DBCollectionReader extends org.apache.uima.collection.CollectionReader_ImplBase
Modifier and Type | Field and Description |
---|---|
protected DataSource |
dataSource |
protected boolean |
keyNameToLowerCase |
protected String |
keyTypeName
the key type.
|
protected org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate |
namedJdbcTemplate |
protected String |
queryGetDocument
the queyr to get a document given a key.
|
protected String |
queryGetDocumentKeys
the query to get the document keys set in config file
|
protected org.springframework.jdbc.core.simple.SimpleJdbcTemplate |
simpleJdbcTemplate |
protected org.springframework.transaction.support.TransactionTemplate |
txTemplate |
Constructor and Description |
---|
DBCollectionReader() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
getDocumentById(org.apache.uima.jcas.JCas aCAS,
Map<String,Object> id) |
void |
getNext(org.apache.uima.cas.CAS aCAS) |
void |
getNext(org.apache.uima.jcas.JCas aCAS) |
org.apache.uima.util.Progress[] |
getProgress() |
boolean |
hasNext() |
protected void |
initDB(String dbDriver,
String dbURL) |
void |
initialize() |
protected void |
initializePreLoad() |
boolean |
isKeyNameToLowerCase() |
protected void |
loadDocumentIds() |
void |
setKeyNameToLowerCase(boolean keyNameToLowerCase) |
destroy, getCasInitializer, getProcessingResourceMetaData, initialize, isConsuming, reconfigure, setCasInitializer, typeSystemInit
getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue
getCasManager, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger, setMetaData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected String queryGetDocumentKeys
protected String queryGetDocument
protected String keyTypeName
protected DataSource dataSource
protected org.springframework.jdbc.core.simple.SimpleJdbcTemplate simpleJdbcTemplate
protected org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedJdbcTemplate
protected org.springframework.transaction.support.TransactionTemplate txTemplate
protected boolean keyNameToLowerCase
public boolean isKeyNameToLowerCase()
public void setKeyNameToLowerCase(boolean keyNameToLowerCase)
public void initialize() throws org.apache.uima.resource.ResourceInitializationException
initialize
in class org.apache.uima.collection.CollectionReader_ImplBase
org.apache.uima.resource.ResourceInitializationException
protected void initializePreLoad() throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
protected void initDB(String dbDriver, String dbURL) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
protected void loadDocumentIds()
public void getNext(org.apache.uima.cas.CAS aCAS) throws IOException, org.apache.uima.collection.CollectionException
IOException
org.apache.uima.collection.CollectionException
public void getNext(org.apache.uima.jcas.JCas aCAS) throws IOException, org.apache.uima.collection.CollectionException
IOException
org.apache.uima.collection.CollectionException
protected void getDocumentById(org.apache.uima.jcas.JCas aCAS, Map<String,Object> id)
public org.apache.uima.util.Progress[] getProgress()
public boolean hasNext() throws IOException, org.apache.uima.collection.CollectionException
IOException
org.apache.uima.collection.CollectionException
public void close() throws IOException
IOException
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.