CARMA C++
carma::sdp::XMLHandler Class Reference

Content and error handler for the astronomical hdr SAX XML parser. More...

#include <carma/sdp/XMLHandler.h>

Inherits DefaultHandler.

Public Member Functions

void addScript (std::string miriadFile)
 
void closeMiriad ()
 Close a MIRIAD output file. More...
 
void configure (const std::string &visBrickDir, const std::string &corrType)
 Pass SDP configuration parameters to the XML handler. More...
 
carma::util::frameType getLastFrame ()
 Return last integration start frame processed. More...
 
void openMiriad (const std::string &inputAstroHdrFile, const char *filename, const std::string &mode, const bool writeFloats, const bool justGatherPdb)
 Open a MIRIAD output file. More...
 
void resetProjectData ()
 Reset the accumulated project data. More...
 
void selectFrameRange (const carma::util::frameType &startFrame, const carma::util::frameType &endFrame)
 Set frame selection range. More...
 
void setCurrentFile (std::string fileName)
 
void updateProjectDatabase ()
 Update the project database. More...
 
void writeKeyword (const Attributes &a)
 Extract keyword info from the attributes lists and call the appropriate handler. More...
 
 XMLHandler ()
 Constructor. More...
 
 ~XMLHandler ()
 Destrcutor. More...
 
SAX ContentHandlers.
void startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs)
 Start of an XML element. More...
 
void endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
 End of an XML element. More...
 
void startCDATA ()
 Start and end CDATA. More...
 
void endCDATA ()
 
void resetDocument ()
 Reset document. More...
 
SAX ErrorHandlers.
void warning (const SAXParseException &exc)
 
void error (const SAXParseException &exc)
 
void fatalError (const SAXParseException &exc)
 
void resetErrors ()
 

Static Public Member Functions

static int frameOffset (const double &frame)
 Return frame offset between visbrick and monitor stream. More...
 
static void printVisBrickWarnings (bool isIncremental)
 

Callbacks for the XML keyword table.

enum  PREAMBLE {
  COORD =0x1, TIME =0x2, BASELINE =0x4, DATA =0x8,
  FLAGS =0x10, PREAMBLEBITS =0x1f, WBBITS =DATA|FLAGS
}
 
enum  { WCORRINDEX =0, CORRINDEX =1 }
 
static void putUnknown (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 If a keyword isn't in the table, this tries to write it anyway. More...
 
static void putNothing (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 Just ignore. More...
 
static void putA (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 String value. More...
 
static void putCv (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 Complex. More...
 
static void putD (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 Double. More...
 
static void putDv (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void putI (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void putIv (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void putR (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void putRv (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void putCoord (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void putBaseline (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 Special handling for some keywords. More...
 
static void putTime (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void putDTime (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void putCorr (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void putFlags (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeCorrelatorData (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeCorrInp (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeNewCorrInp (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeCorbit (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeCoreff (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeUVW (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeJyperka (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeBandFreq (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeRestFreq (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeTsys (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeNewTsys (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storePsys (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeNewPsys (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storePsysAttn (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeNewPsysAttn (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeAmbPsys (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeNewAmbPsys (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeAntennas (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeBandGood (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storePolState (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeVersion (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void storeCorrtype (XMLHandler *h, const XMLCh *name, const Keyword *kw, const XMLCh *type, int length, const XMLCh *value)
 
static void putIntTime (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 
static void putPntRaDec (XMLHandler *h, const XMLCh *, const Keyword *, const XMLCh *, int length, const XMLCh *)
 

Detailed Description

Content and error handler for the astronomical hdr SAX XML parser.

Definition at line 146 of file XMLHandler.h.

Constructor & Destructor Documentation

carma::sdp::XMLHandler::XMLHandler ( )

Constructor.

carma::sdp::XMLHandler::~XMLHandler ( )

Destrcutor.

Member Function Documentation

void carma::sdp::XMLHandler::closeMiriad ( )

Close a MIRIAD output file.

void carma::sdp::XMLHandler::configure ( const std::string &  visBrickDir,
const std::string &  corrType 
)

Pass SDP configuration parameters to the XML handler.

void carma::sdp::XMLHandler::endElement ( const XMLCh *const  uri,
const XMLCh *const  localname,
const XMLCh *const  qname 
)

End of an XML element.

static int carma::sdp::XMLHandler::frameOffset ( const double &  frame)
static

Return frame offset between visbrick and monitor stream.

carma::util::frameType carma::sdp::XMLHandler::getLastFrame ( )

Return last integration start frame processed.

void carma::sdp::XMLHandler::openMiriad ( const std::string &  inputAstroHdrFile,
const char *  filename,
const std::string &  mode,
const bool  writeFloats,
const bool  justGatherPdb 
)

Open a MIRIAD output file.

static void carma::sdp::XMLHandler::putA ( XMLHandler h,
const XMLCh *  ,
const Keyword ,
const XMLCh *  ,
int  length,
const XMLCh *   
)
static

String value.

static void carma::sdp::XMLHandler::putBaseline ( XMLHandler h,
const XMLCh *  ,
const Keyword ,
const XMLCh *  ,
int  length,
const XMLCh *   
)
static

Special handling for some keywords.

static void carma::sdp::XMLHandler::putCv ( XMLHandler h,
const XMLCh *  ,
const Keyword ,
const XMLCh *  ,
int  length,
const XMLCh *   
)
static

Complex.

static void carma::sdp::XMLHandler::putD ( XMLHandler h,
const XMLCh *  ,
const Keyword ,
const XMLCh *  ,
int  length,
const XMLCh *   
)
static

Double.

static void carma::sdp::XMLHandler::putNothing ( XMLHandler h,
const XMLCh *  ,
const Keyword ,
const XMLCh *  ,
int  length,
const XMLCh *   
)
static

Just ignore.

static void carma::sdp::XMLHandler::putUnknown ( XMLHandler h,
const XMLCh *  ,
const Keyword ,
const XMLCh *  ,
int  length,
const XMLCh *   
)
static

If a keyword isn't in the table, this tries to write it anyway.

void carma::sdp::XMLHandler::resetDocument ( )

Reset document.

void carma::sdp::XMLHandler::resetProjectData ( )

Reset the accumulated project data.

void carma::sdp::XMLHandler::selectFrameRange ( const carma::util::frameType startFrame,
const carma::util::frameType endFrame 
)

Set frame selection range.

void carma::sdp::XMLHandler::startCDATA ( )

Start and end CDATA.

void carma::sdp::XMLHandler::startElement ( const XMLCh *const  uri,
const XMLCh *const  localname,
const XMLCh *const  qname,
const Attributes &  attrs 
)

Start of an XML element.

void carma::sdp::XMLHandler::updateProjectDatabase ( )

Update the project database.

void carma::sdp::XMLHandler::writeKeyword ( const Attributes &  a)

Extract keyword info from the attributes lists and call the appropriate handler.


The documentation for this class was generated from the following file: