asdm::AntennaTable Class Reference

#include <AntennaTable.h>

Inheritance diagram for asdm::AntennaTable:

Inheritance graph
[legend]
Collaboration diagram for asdm::AntennaTable:

Collaboration graph
[legend]
List of all members.

Detailed Description

The AntennaTable class is an Alma table.

Generated from model's revision "1.46", branch "ALMA-5_1_1-B"

Attributes of Antenna
Name Type Comment

Key

antennaId Tag  

Value
(Mandarory)

stationId Tag  

name string  

antennaMake AntennaMakeMod::AntennaMake  

antennaType AntennaTypeMod::AntennaType  

xPosition Length  

yPosition Length  

zPosition Length  

time ArrayTime  

xOffset Length  

yOffset Length  

zOffset Length  

dishDiameter Length  

flagRow bool  

Value
(Optional)

assocAntennaId Tag  

Definition at line 261 of file AntennaTable.h.

Public Member Functions

virtual ~AntennaTable ()
ASDMgetContainer () const
 Return the container to which this table belongs.
unsigned int size ()
 Return the number of rows in the table.
string getName () const
 Return the name of this table.
Entity getEntity () const
 Return this table's Entity.
void setEntity (Entity e)
 Set this table's Entity.
AntennaRownewRow ()
 Create a new row with default values.
AntennaRownewRowEmpty ()
 Has the same definition than the newRow method with the same signature.
AntennaRownewRow (Tag stationId, string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length xPosition, Length yPosition, Length zPosition, ArrayTime time, Length xOffset, Length yOffset, Length zOffset, Length dishDiameter, bool flagRow)
 Create a new row initialized to the specified values.
AntennaRownewRowFull (Tag stationId, string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length xPosition, Length yPosition, Length zPosition, ArrayTime time, Length xOffset, Length yOffset, Length zOffset, Length dishDiameter, bool flagRow)
 Has the same definition than the newRow method with the same signature.
AntennaRownewRow (AntennaRow *row)
 Create a new row using a copy constructor mechanism.
AntennaRownewRowCopy (AntennaRow *row)
 Has the same definition than the newRow method with the same signature.
AntennaRowadd (AntennaRow *x)
 Add a row.
vector< AntennaRow * > get ()
 Get all rows.
AntennaRowgetRowByKey (Tag antennaId)
 Returns a AntennaRow* given a key.
AntennaRowlookup (Tag stationId, string name, AntennaMakeMod::AntennaMake antennaMake, AntennaTypeMod::AntennaType antennaType, Length xPosition, Length yPosition, Length zPosition, ArrayTime time, Length xOffset, Length yOffset, Length zOffset, Length dishDiameter, bool flagRow)
 Look up the table for a row whose all attributes except the autoincrementable one are equal to the corresponding parameters of the method.
AntennaTableIDL * toIDL ()
 Convert this table into a AntennaTableIDL CORBA structure.
void fromIDL (AntennaTableIDL x) throw (DuplicateKey,ConversionException)
 Populate this table from the content of a AntennaTableIDL Corba structure.
char * toFITS () const throw (ConversionException)
 To be implemented.
void fromFITS (char *fits) throw (ConversionException)
 To be implemented.
string toVOTable () const throw (ConversionException)
 To be implemented.
void fromVOTable (string vo) throw (ConversionException)
 To be implemented.
string toXML () throw (ConversionException)
 Translate this table to an XML representation conform to the schema defined for Antenna (AntennaTable.xsd).
void fromXML (string xmlDoc) throw (ConversionException)
 Populate this table from the content of a XML document that is required to be conform to the XML schema defined for a Antenna (AntennaTable.xsd).
string toMIME ()
 Serialize this into a stream of bytes and encapsulates that stream into a MIME message.
void setFromMIME (const string &mimeMsg)
 Extracts the binary part of a MIME message and deserialize its content to fill this with the result of the deserialization.
void toFile (string directory)
 Stores a representation (binary or XML) of this table into a file.
void setFromFile (const string &directory)
 Reads and parses a file containing a representation of a AntennaTable as those produced by the toFile method.

Static Public Member Functions

static vector< string > getKeyName ()
 Return the list of field names that make up key key as an array of strings.

Private Member Functions

 AntennaTable (ASDM &container)
 Create a AntennaTable.
void autoIncrement (string key, AntennaRow *x)
AntennaRowcheckAndAdd (AntennaRow *x) throw (DuplicateKey, UniquenessViolationException)
 If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and throw exception if not.
void error () throw (ConversionException)

Private Attributes

ASDMcontainer
bool archiveAsBin
bool fileAsBin
Entity entity
map< string, int > noAutoIncIds
 A map for the autoincrementation algorithm.
vector< AntennaRow * > privateRows
 A data structure to store the pointers on the table's rows.
vector< AntennaRow * > row

Static Private Attributes

static string tableName
 The name of this table.
static vector< string > key
 The list of field names that make up key key.

Friends

class asdm::ASDM


Constructor & Destructor Documentation

virtual asdm::AntennaTable::~AntennaTable (  )  [virtual]

asdm::AntennaTable::AntennaTable ( ASDM container  )  [private]

Create a AntennaTable.

This constructor is private because only the container can create tables. All tables must know the container to which they belong.

Parameters:
container The container to which this table belongs.


Member Function Documentation

static vector<string> asdm::AntennaTable::getKeyName (  )  [static]

Return the list of field names that make up key key as an array of strings.

Returns:
a vector of string.

ASDM& asdm::AntennaTable::getContainer (  )  const

Return the container to which this table belongs.

Returns:
the ASDM containing this table.

unsigned int asdm::AntennaTable::size (  )  [virtual]

Return the number of rows in the table.

Returns:
the number of rows in an unsigned int.

Implements asdm::Representable.

string asdm::AntennaTable::getName (  )  const [virtual]

Return the name of this table.

Returns:
the name of this table in a string.

Implements asdm::Representable.

Entity asdm::AntennaTable::getEntity (  )  const [virtual]

Return this table's Entity.

Implements asdm::Representable.

void asdm::AntennaTable::setEntity ( Entity  e  )  [virtual]

Set this table's Entity.

Parameters:
e An entity.

Implements asdm::Representable.

AntennaRow* asdm::AntennaTable::newRow (  ) 

Create a new row with default values.

Returns:
a pointer on a AntennaRow

AntennaRow* asdm::AntennaTable::newRowEmpty (  ) 

Has the same definition than the newRow method with the same signature.

Provided to facilitate the call from Python, otherwise the newRow method will be preferred.

AntennaRow* asdm::AntennaTable::newRow ( Tag  stationId,
string  name,
AntennaMakeMod::AntennaMake  antennaMake,
AntennaTypeMod::AntennaType  antennaType,
Length  xPosition,
Length  yPosition,
Length  zPosition,
ArrayTime  time,
Length  xOffset,
Length  yOffset,
Length  zOffset,
Length  dishDiameter,
bool  flagRow 
)

Create a new row initialized to the specified values.

Returns:
a pointer on the created and initialized row.
Parameters:
stationId. 
name. 
antennaMake. 
antennaType. 
xPosition. 
yPosition. 
zPosition. 
time. 
xOffset. 
yOffset. 
zOffset. 
dishDiameter. 
flagRow. 

AntennaRow* asdm::AntennaTable::newRowFull ( Tag  stationId,
string  name,
AntennaMakeMod::AntennaMake  antennaMake,
AntennaTypeMod::AntennaType  antennaType,
Length  xPosition,
Length  yPosition,
Length  zPosition,
ArrayTime  time,
Length  xOffset,
Length  yOffset,
Length  zOffset,
Length  dishDiameter,
bool  flagRow 
)

Has the same definition than the newRow method with the same signature.

Provided to facilitate the call from Python, otherwise the newRow method will be preferred.

AntennaRow* asdm::AntennaTable::newRow ( AntennaRow row  ) 

Create a new row using a copy constructor mechanism.

The method creates a new AntennaRow owned by this. Each attribute of the created row is a (deep) copy of the corresponding attribute of row. The method does not add the created row to this, its simply parents it to this, a call to the add method has to be done in order to get the row added (very likely after having modified some of its attributes). If row is null then the method returns a new AntennaRow with default values for its attributes.

Parameters:
row the row which is to be copied.

AntennaRow* asdm::AntennaTable::newRowCopy ( AntennaRow row  ) 

Has the same definition than the newRow method with the same signature.

Provided to facilitate the call from Python, otherwise the newRow method will be preferred.

AntennaRow* asdm::AntennaTable::add ( AntennaRow x  ) 

Add a row.

If there table contains a row whose key's fields are equal to x's ones then return a pointer on this row (i.e. no actual insertion is performed) otherwise add x to the table and return x.

Parameters:
x. A pointer on the row to be added.
Returns:
a AntennaRow pointer.

vector<AntennaRow *> asdm::AntennaTable::get (  ) 

Get all rows.

Returns:
Alls rows as a vector of pointers of AntennaRow. The elements of this vector are stored in the order in which they have been added to the AntennaTable.

AntennaRow* asdm::AntennaTable::getRowByKey ( Tag  antennaId  ) 

Returns a AntennaRow* given a key.

Returns:
a pointer to the row having the key whose values are passed as parameters, or 0 if no row exists for that key.
Parameters:
antennaId. 

AntennaRow* asdm::AntennaTable::lookup ( Tag  stationId,
string  name,
AntennaMakeMod::AntennaMake  antennaMake,
AntennaTypeMod::AntennaType  antennaType,
Length  xPosition,
Length  yPosition,
Length  zPosition,
ArrayTime  time,
Length  xOffset,
Length  yOffset,
Length  zOffset,
Length  dishDiameter,
bool  flagRow 
)

Look up the table for a row whose all attributes except the autoincrementable one are equal to the corresponding parameters of the method.

Returns:
a pointer on this row if any, null otherwise.
Parameters:
stationId. 
name. 
antennaMake. 
antennaType. 
xPosition. 
yPosition. 
zPosition. 
time. 
xOffset. 
yOffset. 
zOffset. 
dishDiameter. 
flagRow. 

AntennaTableIDL* asdm::AntennaTable::toIDL (  ) 

Convert this table into a AntennaTableIDL CORBA structure.

Returns:
a pointer to a AntennaTableIDL

void asdm::AntennaTable::fromIDL ( AntennaTableIDL  x  )  throw (DuplicateKey,ConversionException)

Populate this table from the content of a AntennaTableIDL Corba structure.

Exceptions:
DuplicateKey Thrown if the method tries to add a row having a key that is already in the table.
ConversionException 

char* asdm::AntennaTable::toFITS (  )  const throw (ConversionException) [virtual]

To be implemented.

Implements asdm::Representable.

void asdm::AntennaTable::fromFITS ( char *  fits  )  throw (ConversionException) [virtual]

To be implemented.

Implements asdm::Representable.

string asdm::AntennaTable::toVOTable (  )  const throw (ConversionException) [virtual]

To be implemented.

Implements asdm::Representable.

void asdm::AntennaTable::fromVOTable ( string  vo  )  throw (ConversionException) [virtual]

To be implemented.

Implements asdm::Representable.

string asdm::AntennaTable::toXML (  )  throw (ConversionException) [virtual]

Translate this table to an XML representation conform to the schema defined for Antenna (AntennaTable.xsd).

Returns:
a string containing the XML representation.

Implements asdm::Representable.

void asdm::AntennaTable::fromXML ( string  xmlDoc  )  throw (ConversionException) [virtual]

Populate this table from the content of a XML document that is required to be conform to the XML schema defined for a Antenna (AntennaTable.xsd).

Implements asdm::Representable.

string asdm::AntennaTable::toMIME (  ) 

Serialize this into a stream of bytes and encapsulates that stream into a MIME message.

Returns:
a string containing the MIME message.

void asdm::AntennaTable::setFromMIME ( const string &  mimeMsg  ) 

Extracts the binary part of a MIME message and deserialize its content to fill this with the result of the deserialization.

Parameters:
mimeMsg the string containing the MIME message.
Exceptions:
ConversionException 

void asdm::AntennaTable::toFile ( string  directory  ) 

Stores a representation (binary or XML) of this table into a file.

Depending on the boolean value of its private field fileAsBin a binary serialization of this (fileAsBin==true) will be saved in a file "Antenna.bin" or an XML representation (fileAsBin==false) will be saved in a file "Antenna.xml". The file is always written in a directory whose name is passed as a parameter.

Parameters:
directory The name of directory where the file containing the table's representation will be saved.

void asdm::AntennaTable::setFromFile ( const string &  directory  ) 

Reads and parses a file containing a representation of a AntennaTable as those produced by the toFile method.

This table is populated with the result of the parsing.

Parameters:
directory The name of the directory containing the file te be read and parsed.
Exceptions:
ConversionException If any error occurs while reading the files in the directory or parsing them.

void asdm::AntennaTable::autoIncrement ( string  key,
AntennaRow x 
) [private]

AntennaRow* asdm::AntennaTable::checkAndAdd ( AntennaRow x  )  throw (DuplicateKey, UniquenessViolationException) [private]

If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and throw exception if not.

Check if *x verifies the key uniqueness rule and throw an exception if not. Append x to its table.

void asdm::AntennaTable::error (  )  throw (ConversionException) [private]


Friends And Related Function Documentation

friend class asdm::ASDM [friend]

Definition at line 262 of file AntennaTable.h.


Member Data Documentation

ASDM& asdm::AntennaTable::container [private]

Definition at line 575 of file AntennaTable.h.

bool asdm::AntennaTable::archiveAsBin [private]

Definition at line 577 of file AntennaTable.h.

bool asdm::AntennaTable::fileAsBin [private]

Definition at line 578 of file AntennaTable.h.

Entity asdm::AntennaTable::entity [private]

Definition at line 580 of file AntennaTable.h.

map<string,int> asdm::AntennaTable::noAutoIncIds [private]

A map for the autoincrementation algorithm.

Definition at line 584 of file AntennaTable.h.

string asdm::AntennaTable::tableName [static, private]

The name of this table.

Definition at line 591 of file AntennaTable.h.

vector<string> asdm::AntennaTable::key [static, private]

The list of field names that make up key key.

Definition at line 597 of file AntennaTable.h.

vector<AntennaRow * > asdm::AntennaTable::privateRows [private]

A data structure to store the pointers on the table's rows.

In all cases we maintain a private ArrayList of AntennaRow s.

Definition at line 612 of file AntennaTable.h.

vector<AntennaRow *> asdm::AntennaTable::row [private]

Definition at line 616 of file AntennaTable.h.


The documentation for this class was generated from the following file:
Generated on Mon Sep 1 22:42:32 2008 for NRAOCASA by  doxygen 1.5.1