|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.ObjectstockDataRetrieval.DownloadManager
stockDataRetrieval.DownloadManagerNASDAQ
Controls the behavior and variables for the NASDAQ information - inherits from the DownloadManager
| Nested Class Summary |
| Nested classes inherited from class stockDataRetrieval.DownloadManager |
|
| Field Summary | |
private static java.lang.String |
tickerFile
the file name where to save this list of tickers once they are parsed from the page |
private static java.lang.String |
tickerSymbolPage
the URL where the list of NASDAQ stocks resides |
| Fields inherited from class stockDataRetrieval.DownloadManager |
|
| Constructor Summary | |
DownloadManagerNASDAQ(int maxConnections)
Constructor takes the user defined max concurrent connections to be made with Yahoo and calls the super class's constructor with necessary data |
|
| Method Summary | |
void |
getStockTickers()
Compiles a list of all stock ticker symbols from the given market. |
void |
getTickerAndCompany(java.lang.String targetURL,
java.lang.String embeddedTickerCode,
boolean nasdaqRound)
Series of commands to download the web page specified, parse it for relevant information, and write the extracted data to a file (dependant on the market it is being harvested from). |
private void |
writeDataToFile(java.util.ArrayList data,
boolean nasdaqState)
Write all data gathered from the web page containing ticker/company information to the file "./Data/tickers.txt". |
| Methods inherited from class stockDataRetrieval.DownloadManager |
createDirectory, createDirectoryStructure, getNewsStories, getStockHistoryFiles, getTickerAndCompany, main, writeDataToFile |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static java.lang.String tickerSymbolPage
private static java.lang.String tickerFile
| Constructor Detail |
public DownloadManagerNASDAQ(int maxConnections)
maxConnections - the max concurent connections the user allows = a value of 0
will default to 5 concurrent connections at a time| Method Detail |
public void getStockTickers()
Delegates responsibility to functions to go to a specific website and repeatedly hit and parse pages containing company name and ticker symbols.
getStockTickers in class DownloadManager
public void getTickerAndCompany(java.lang.String targetURL,
java.lang.String embeddedTickerCode,
boolean nasdaqRound)
targetURL - the target URL for which to download all ticker/company names fromembeddedTickerCode - the pattern of the HTML that contains an individual ticker name
private void writeDataToFile(java.util.ArrayList data,
boolean nasdaqState)
data - an containing entries of Ticker/CompanyName
information in a String array of size [2]nasdaqState - used only for the NASDAQ downloads. If true, the data is
appended to the growing file. This is because all the NASDAQ
stickers are found on 26 individual files - one for every letter.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||