public class AbstractBagOfWordsExporter extends Object
Modifier and Type | Field and Description |
---|---|
protected org.springframework.jdbc.core.JdbcTemplate |
jdbcTemplate |
protected org.springframework.jdbc.core.simple.SimpleJdbcTemplate |
simpleJdbcTemplate |
protected org.springframework.transaction.PlatformTransactionManager |
transactionManager |
protected org.springframework.transaction.support.TransactionTemplate |
txNew |
Constructor and Description |
---|
AbstractBagOfWordsExporter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addNominalWordToInstance(BagOfWordsData bagOfWordsData,
int instanceId,
String word,
String wordValue) |
protected void |
addNumericWordToInstance(BagOfWordsData bagOfWordsData,
int instanceId,
String word,
double wordValue) |
DataSource |
getDataSource(DataSource ds) |
protected void |
getNominalInstanceWords(String sql,
BagOfWordsData bagOfWordsData) |
protected void |
getNumericInstanceWords(String sql,
BagOfWordsData bagOfWordsData) |
org.springframework.transaction.PlatformTransactionManager |
getTransactionManager() |
protected void |
loadData(BagOfWordsData bagOfWordsData,
String instanceNumericWordQuery,
String instanceNominalWordQuery,
BagOfWordsDecorator bDecorator) |
protected void |
loadProperties(String propertyFile,
Properties props) |
void |
setDataSource(DataSource ds) |
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager) |
protected org.springframework.jdbc.core.simple.SimpleJdbcTemplate simpleJdbcTemplate
protected org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
protected org.springframework.transaction.PlatformTransactionManager transactionManager
protected org.springframework.transaction.support.TransactionTemplate txNew
public org.springframework.transaction.PlatformTransactionManager getTransactionManager()
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
public void setDataSource(DataSource ds)
public DataSource getDataSource(DataSource ds)
protected void getNumericInstanceWords(String sql, BagOfWordsData bagOfWordsData)
sql
- result 1st column: instance id, 2nd column: word, 3rd column:
numeric word valueinstanceNumericWords
- map of instance id - [map word - word value] to be populatedprotected void addNumericWordToInstance(BagOfWordsData bagOfWordsData, int instanceId, String word, double wordValue)
protected void addNominalWordToInstance(BagOfWordsData bagOfWordsData, int instanceId, String word, String wordValue)
protected void getNominalInstanceWords(String sql, BagOfWordsData bagOfWordsData)
sql
- result set has 3 columns. 1st column - integer - instance id.
2nd column - word. 3rd column - word value.instanceWordMap
- map of instance id to word-word value.wordValueMap
- map of word to valid values for the word.protected void loadProperties(String propertyFile, Properties props) throws FileNotFoundException, IOException, InvalidPropertiesFormatException
protected void loadData(BagOfWordsData bagOfWordsData, String instanceNumericWordQuery, String instanceNominalWordQuery, BagOfWordsDecorator bDecorator)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.