#include <Parser.h>
Public Member Functions | |
Parser () | |
~Parser () | |
void | display () |
void | readFile (const std::string &filename) |
Prints out all datatables that have been read in. | |
void | readNetworkFile (const std::string &url) |
Read in a file, unzip it, parse it, and put the contents into a datatable. | |
DataTable * | getTable (unsigned i) |
Read in a file over the internet, unzip it, parse it, and put the contents into a datatable. | |
const int | getNumberOfTables (void) const |
returns a specific datatable | |
std::string | getName (void) const |
std::string | getURL (void) const |
bool | isANetworkFile (void) const |
Private Member Functions | |
void | _readXMLFormats () |
void | _readXML (std::string data) |
void | _readDelimited (std::string data) |
void | _readMadeline (std::string data) |
int | _determineNumberOfBlocks (std::string inString) |
void | _countTables (xmlNode *node) |
std::string | _stringify (std::string name) |
Private Attributes | |
std::string | _url |
std::string | _fileName |
bool | _isANetworkFile |
std::vector< DataTable * > | _tables |
std::vector< xmlNode * > | _xmlTableTagPointers |
FileTypeClassifier::FILE_TYPE | _fileType |
const char * | _fileTypeName |
XMLTagManager | _xmlTagManager |
When the Parser class reads in a file, it first attempts to uncompress it. Compression types that are supported are GZIP, PKZIP, and BZIP2. Then, it attempts to parse the file. Parsable formats are:
1. Madeline flat file format 2. Delimited format 3. OASIS XML 4. XHTML XML 5. Madeline XML 5. Microsoft's Excel XML format
After parsing the file, table data in the file are put into a DataTables. Multiple tables in one file are supported for some formats, such as OASIS and XHTML XML files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
returns a specific datatable
|
|
Read in a file over the internet, unzip it, parse it, and put the contents into a datatable.
|
|
|
|
|
|
Prints out all datatables that have been read in. readFile: Reads a local file on disk |
|
Read in a file, unzip it, parse it, and put the contents into a datatable. readNetworkFile(): Reads a file across the network |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|