public class JdbcReader
extends org.apache.uima.fit.component.CasCollectionReader_ImplBase
DocumentMetaData
annotation.
The field names are available as constants and begin with CAS_
. Please specify the
mapping of the columns and the field names in the query. For example,
SELECT text AS cas_text, title AS cas_metadata_title FROM test_table
will create a CAS for each record, write the content of "text" column into CAS documen text and
that of "title" column into the document title field of the DocumentMetaData
annotation.
Modifier and Type | Field and Description |
---|---|
static String |
CAS_METADATA_COLLECTION_ID |
static String |
CAS_METADATA_DOCUMENT_BASE_URI |
static String |
CAS_METADATA_DOCUMENT_ID |
static String |
CAS_METADATA_DOCUMENT_URI |
static String |
CAS_METADATA_LANGUAGE |
static String |
CAS_METADATA_TITLE |
static String |
CAS_TEXT |
static String |
PARAM_CONNECTION
Specifies the URL to the database.
|
static String |
PARAM_DATABASE
Specifies name of the database to be accessed.
|
static String |
PARAM_DRIVER
Specify the class name of the JDBC driver.
|
static String |
PARAM_LANGUAGE
Specifies the language.
|
static String |
PARAM_PASSWORD
Specifies the password for database access.
|
static String |
PARAM_QUERY
Specifies the query.
|
static String |
PARAM_USER
Specifies the user name for database access.
|
Constructor and Description |
---|
JdbcReader() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
getNext(org.apache.uima.cas.CAS cas) |
org.apache.uima.util.Progress[] |
getProgress() |
boolean |
hasNext() |
void |
initialize(org.apache.uima.UimaContext context) |
getLogger, initialize
destroy, getCasInitializer, getProcessingResourceMetaData, initialize, isConsuming, reconfigure, setCasInitializer, typeSystemInit
getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue
getCasManager, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger, setMetaData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final String CAS_TEXT
public static final String CAS_METADATA_TITLE
public static final String CAS_METADATA_LANGUAGE
public static final String CAS_METADATA_DOCUMENT_ID
public static final String CAS_METADATA_COLLECTION_ID
public static final String CAS_METADATA_DOCUMENT_URI
public static final String CAS_METADATA_DOCUMENT_BASE_URI
public static final String PARAM_DRIVER
If used with uimaFIT and the value is not given, com.mysql.jdbc.Driver
will be
taken.
public static final String PARAM_CONNECTION
If used with uimaFIT and the value is not given, jdbc:mysql://127.0.0.1/
will be
taken.
public static final String PARAM_DATABASE
public static final String PARAM_USER
public static final String PARAM_PASSWORD
public static final String PARAM_QUERY
public static final String PARAM_LANGUAGE
public void initialize(org.apache.uima.UimaContext context) throws org.apache.uima.resource.ResourceInitializationException
initialize
in class org.apache.uima.fit.component.CasCollectionReader_ImplBase
org.apache.uima.resource.ResourceInitializationException
public void getNext(org.apache.uima.cas.CAS cas) throws IOException, org.apache.uima.collection.CollectionException
IOException
org.apache.uima.collection.CollectionException
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
close
in interface org.apache.uima.collection.base_cpm.BaseCollectionReader
close
in class org.apache.uima.fit.component.CasCollectionReader_ImplBase
IOException
Copyright © 2007–2016 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.