|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdb.DataManager
This class is used to upload data into the database tables.
from the files downloaded from the web using a web robot.
| Field Summary | |
(package private) java.lang.String |
sqlQuery
|
| Constructor Summary | |
DataManager()
|
|
| Method Summary | |
void |
dataUpload()
Uploads data downloaded by web robot to DB. |
private static java.lang.String |
getTickerName(java.lang.String fileName)
Extracts the ticker name from the file name. |
void |
processFile()
Extracts data from file and inserts to database. |
static java.util.ArrayList |
returnStockDataFromFile(java.lang.String filename)
Returns data for a specific Stock ticker in a form suitable for insertion into a database by simply extracting each tuple from the returned ArrayList. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.lang.String sqlQuery
| Constructor Detail |
public DataManager()
| Method Detail |
public void dataUpload()
Forms SQL query for insert
public void processFile()
public static java.util.ArrayList returnStockDataFromFile(java.lang.String filename)
Every file must have the Yahoo format of "Date | Open | High | Low | Close | Volume | Adj. Close" and the last line of the file begins with "
private static java.lang.String getTickerName(java.lang.String fileName)
fileName - The file name that contains the ticker name
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||