Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Parser Class Reference

#include <Parser.h>

List of all members.

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.
DataTablegetTable (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


Detailed Description

The Parser class is used to read files into a DataTables. The parser can read in 3 types of file: Local files, Network files, and Mysql files.

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.


Constructor & Destructor Documentation

Parser::Parser  ) 
 

Parser::~Parser  ) 
 


Member Function Documentation

void Parser::_countTables xmlNode *  node  )  [private]
 

int Parser::_determineNumberOfBlocks std::string  inString  )  [private]
 

void Parser::_readDelimited std::string  data  )  [private]
 

void Parser::_readMadeline std::string  data  )  [private]
 

void Parser::_readXML std::string  data  )  [private]
 

void Parser::_readXMLFormats  )  [private]
 

std::string Parser::_stringify std::string  name  )  [private]
 

void Parser::display  ) 
 

std::string Parser::getName void   )  const [inline]
 

const int Parser::getNumberOfTables void   )  const [inline]
 

returns a specific datatable

DataTable* Parser::getTable unsigned  i  )  [inline]
 

Read in a file over the internet, unzip it, parse it, and put the contents into a datatable.

std::string Parser::getURL void   )  const [inline]
 

bool Parser::isANetworkFile void   )  const [inline]
 

void Parser::readFile const std::string &  fileName  ) 
 

Prints out all datatables that have been read in.

readFile: Reads a local file on disk

void Parser::readNetworkFile const std::string &  url  ) 
 

Read in a file, unzip it, parse it, and put the contents into a datatable.

readNetworkFile(): Reads a file across the network


Member Data Documentation

std::string Parser::_fileName [private]
 

FileTypeClassifier::FILE_TYPE Parser::_fileType [private]
 

const char* Parser::_fileTypeName [private]
 

bool Parser::_isANetworkFile [private]
 

std::vector<DataTable *> Parser::_tables [private]
 

std::string Parser::_url [private]
 

std::vector<xmlNode*> Parser::_xmlTableTagPointers [private]
 

XMLTagManager Parser::_xmlTagManager [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 18 16:24:39 2011 for MADELINE by  doxygen 1.4.4