Main Page   Class Hierarchy   Compound List   Compound Members  

VOTParser Class Reference

This class contains methods for retriving data from VOTable. More...

List of all members.

Public Member Functions

 VOTParser ()
 ~VOTParser ()
int getNextResourceOrTable (int &elementType)
int nextResource (void)
int nextTable (void)
int nextRow (void)
int getTable (VOTTable &table)
int getResource (VOTResource &resource)
int getVOTableMetaData (VOTVOTable &votableMetaData)
int getRow (VOTRow &row)
int init (const char *filename)
int init (void)
int close (void)

Static Public Attributes

const int VOTABLE_TABLE = 1
const int VOTABLE_RESOURCE = 2


Detailed Description

This is the main class to be used to retrieve all data from the VOTable. It contains all the getXXX() and nextXXX() methods and methods to start and terminate parsing.


Constructor & Destructor Documentation

VOTParser::VOTParser  ) 
 

Default Constructor

VOTParser::~VOTParser  ) 
 

Destructor


Member Function Documentation

int VOTParser::close void   ) 
 

Close parser. This should be called for cleanup.

Returns:
VOT_SUCCESS to indicate success, else VOT_ERROR.

int VOTParser::getNextResourceOrTable int &  elementType  ) 
 

Get next element that is either a TABLE or a RESOURCE. Set elementType to 1 to indicate RESOURCE, 2 to indicate TABLE, if either RESOURCE or TABLE are found.

Parameters:
elementType The type of element found 1=RESOURCE, 2=TABLE
Returns:
VOT_SUCCESS to indicate TABLE or RESOURCE, VOT_ERROR to indicate error, VOT_EOF to indicate end of file.

int VOTParser::getResource VOTResource resource  ) 
 

Get RESOURCE data if the parser currently points to a RESOURCE. Calling getResource() without calling nextResource() will result in a VOT_ERROR.

Parameters:
resource VOTResource object to get the RESOURCE data
Returns:
VOT_SUCCESS to indicate valid data in resource, else VOT_ERROR

int VOTParser::getRow VOTRow row  ) 
 

Get Row data if the parser currently points to a Row. Calling getRow() without calling nextRow() will result in a VOT_ERROR.

Parameters:
row VOTRow object to get the ROW data
Returns:
VOT_SUCCESS to indicate valid data in row, else VOT_ERROR.

int VOTParser::getTable VOTTable table  ) 
 

Get TABLE meta-data if the parser currently points to a TABLE. Calling getTable() without calling nextTable() will result in a VOT_ERROR. Note that the table does not contain data, it only contains meta-data. To get actual table data nextRow() and getRow() should be called.

Parameters:
table VOTTable object to get the TABLE meta data
Returns:
VOT_SUCCESS to indicate valid data in table, else VOT_ERROR

int VOTParser::getVOTableMetaData VOTVOTable votableMetaData  ) 
 

Get VOTable meta-data if the parser currently points to a VOTABLE element. There is no nextXXX() corresponding to getVOTableMetaData(). You can directly call getVOTableMetaData() to get the VOTable meta-data. But you need to call this method before you call any nextXXX() function.

Parameters:
votableMetaData VOTVOTable object to get the VOTABLE meta data
Returns:
VOT_SUCCESS to indicate valid data in votableMetaData, else VOT_ERROR

int VOTParser::init void   ) 
 

Initialize parser when the input is from standard input stream. Must be called before parsing is initiated.

Returns:
VOT_SUCCESS to indicate success, else VOT_ERROR.

int VOTParser::init const char *  filename  ) 
 

Initialize parser when the input is from a given file or URL. Must be called before parsing is initiated.

Parameters:
filename URL where VOTable is loacted or name of the file to be parsed.
Returns:
VOT_SUCCESS to indicate success, else VOT_ERROR.

int VOTParser::nextResource void   ) 
 

Go to next RESOURCE in the VOTable. Calling this method will cause the parser to go to the next RESOURCE. This RESOURCE may be nested within or may be at the same nested depth as the previous RESOURCE.

Returns:
VOT_SUCCESS to indicate RESOURCE, VOT_ERROR to indicate ERROR, VOT_EOF to indicate EOF.

int VOTParser::nextRow void   ) 
 

Go to next ROW in the TABLE. Calling this method will cause the parser to go to the next ROW within the TABLE. It will not cross the TABLE boundary.

Returns:
VOT_SUCCESS to indicate ROW, VOT_ERROR to indicate EOF or end of TABLE.

int VOTParser::nextTable void   ) 
 

Go to next TABLE in the VOTable. Calling this method will cause the parser to go to the next TABLE without stopping at any RESOURCE boundaries.

Returns:
VOT_SUCCESS to indicate TABLE, VOT_ERROR to indicate ERROR, VOT_EOF to indicate end of file.


Member Data Documentation

const int VOTParser::VOTABLE_RESOURCE = 2 [static]
 

Indicates type - RESOURCE element in the VOTABLE.

const int VOTParser::VOTABLE_TABLE = 1 [static]
 

Indicates type - TABLE element in the VOTABLE.


The documentation for this class was generated from the following files:
Generated on Fri May 9 19:13:18 2003 for C++ Streaming Parser by doxygen1.3