The SourceParameterTable class is an Alma table. More...
#include <SourceParameterTable.h>
Public Member Functions | |
virtual | ~SourceParameterTable () |
ASDM & | getContainer () 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. | |
SourceParameterRow * | newRow () |
====> Row creation. | |
SourceParameterRow * | newRowEmpty () |
Has the same definition than the newRow method with the same signature. | |
SourceParameterRow * | newRow (int sourceId, ArrayTimeInterval timeInterval, int numFreq, int numStokes, int numDep, vector< StokesParameterMod::StokesParameter > stokesParameter, vector< vector< Flux > > flux, vector< Frequency > frequency, vector< Frequency > frequencyInterval, vector< vector< Flux > > fluxErr) |
Create a new row initialized to the specified values. | |
SourceParameterRow * | newRowFull (int sourceId, ArrayTimeInterval timeInterval, int numFreq, int numStokes, int numDep, vector< StokesParameterMod::StokesParameter > stokesParameter, vector< vector< Flux > > flux, vector< Frequency > frequency, vector< Frequency > frequencyInterval, vector< vector< Flux > > fluxErr) |
Has the same definition than the newRow method with the same signature. | |
SourceParameterRow * | newRow (SourceParameterRow *row) |
Create a new row using a copy constructor mechanism. | |
SourceParameterRow * | newRowCopy (SourceParameterRow *row) |
Has the same definition than the newRow method with the same signature. | |
SourceParameterRow * | add (SourceParameterRow *x) |
====> Append a row to its table. | |
vector< SourceParameterRow * > | get () |
====> Methods returning rows. | |
SourceParameterRow * | getRowByKey (int sourceParameterId, int sourceId, ArrayTimeInterval timeInterval) |
Returns a SourceParameterRow* given a key. | |
vector< SourceParameterRow * > | getRowBySourceParameterId (int) |
Returns a vector of pointers on rows whose key element <<AutoIncrementableAttribute>> sourceParameterId is equal to the parameter <<AutoIncrementableAttribute>> sourceParameterId. | |
SourceParameterRow * | lookup (int sourceId, ArrayTimeInterval timeInterval, int numFreq, int numStokes, int numDep, vector< StokesParameterMod::StokesParameter > stokesParameter, vector< vector< Flux > > flux, vector< Frequency > frequency, vector< Frequency > frequencyInterval, vector< vector< Flux > > fluxErr) |
Look up the table for a row whose all attributes except the autoincrementable one are equal to the corresponding parameters of the method. | |
SourceParameterTableIDL * | toIDL () |
Conversion Methods. | |
void | fromIDL (SourceParameterTableIDL x) throw (DuplicateKey,ConversionException) |
Populate this table from the content of a SourceParameterTableIDL 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 SourceParameter (SourceParameterTable.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 SourceParameter (SourceParameterTable.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 SourceParameterTable 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 Types | |
typedef vector< vector < SourceParameterRow * > > | ID_TIME_ROWS |
Private Member Functions | |
SourceParameterTable (ASDM &container) | |
Create a SourceParameterTable. | |
SourceParameterRow * | checkAndAdd (SourceParameterRow *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. | |
SourceParameterRow * | insertByStartTime (SourceParameterRow *x, vector< SourceParameterRow * > &row) |
Insert a SourceParameterRow* in a vector of SourceParameterRow* so that it's ordered by ascending time. | |
string | Key (int sourceId) |
Returns a string built by concatenating the ascii representation of the parameters values suffixed with a "_" character. | |
void | getByKeyNoAutoIncNoTime (vector< SourceParameterRow * > &vin, vector< SourceParameterRow * > &vout, int sourceId) |
Fills the vector vout (passed by reference) with pointers on elements of vin whose attributes are equal to the corresponding parameters of the method. | |
void | error () throw (ConversionException) |
Private Attributes | |
ASDM & | container |
bool | archiveAsBin |
bool | fileAsBin |
Entity | entity |
vector< SourceParameterRow * > | privateRows |
A data structure to store the pointers on the table's rows. | |
map< string, ID_TIME_ROWS > | context |
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 |
The SourceParameterTable class is an Alma table.
Generated from model's revision "1.46", branch "HEAD"
Name | Type | Comment |
---|---|---|
Key | ||
sourceParameterId | int |
|
sourceId | int |
|
timeInterval | ArrayTimeInterval |
|
Value | ||
numFreq | int |
|
numStokes | int |
|
numDep | int |
|
stokesParameter | vector<StokesParameterMod::StokesParameter > | numStokes |
flux | vector<vector<Flux > > | numFreq, numStokes |
frequency | vector<Frequency > | numFreq |
frequencyInterval | vector<Frequency > | numFreq |
fluxErr | vector<vector<Flux > > | numFreq, numStokes |
Value | ||
size | vector<vector<Angle > > | numFreq, 2 |
positionAngle | vector<Angle > | numFreq |
sizeErr | vector<vector<Angle > > | numFreq, 2 |
positionAngleErr | vector<Angle > | numFreq |
depSourceParameterId | vector<int > | numDep |
Definition at line 272 of file SourceParameterTable.h.
typedef vector<vector <SourceParameterRow* > > asdm::SourceParameterTable::ID_TIME_ROWS [private] |
Definition at line 642 of file SourceParameterTable.h.
virtual asdm::SourceParameterTable::~SourceParameterTable | ( | ) | [virtual] |
asdm::SourceParameterTable::SourceParameterTable | ( | ASDM & | container | ) | [private] |
Create a SourceParameterTable.
This constructor is private because only the container can create tables. All tables must know the container to which they belong.
container | The container to which this table belongs. |
SourceParameterRow* asdm::SourceParameterTable::add | ( | SourceParameterRow * | x | ) |
====> Append a row to its table.
Add a row. If there table contains a row whose key's fields except² sourceParameterId 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.
x. | A pointer on the row to be added. |
SourceParameterRow* asdm::SourceParameterTable::checkAndAdd | ( | SourceParameterRow * | 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::SourceParameterTable::error | ( | ) | throw (ConversionException) [private] |
void asdm::SourceParameterTable::fromFITS | ( | char * | fits | ) | throw (ConversionException) [virtual] |
To be implemented.
Implements asdm::Representable.
void asdm::SourceParameterTable::fromIDL | ( | SourceParameterTableIDL | x | ) | throw (DuplicateKey,ConversionException) |
Populate this table from the content of a SourceParameterTableIDL Corba structure.
DuplicateKey | Thrown if the method tries to add a row having a key that is already in the table. | |
ConversionException |
void asdm::SourceParameterTable::fromVOTable | ( | string | vo | ) | throw (ConversionException) [virtual] |
To be implemented.
Implements asdm::Representable.
void asdm::SourceParameterTable::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 SourceParameter (SourceParameterTable.xsd).
Implements asdm::Representable.
vector<SourceParameterRow *> asdm::SourceParameterTable::get | ( | ) |
====> Methods returning rows.
Get all rows.
void asdm::SourceParameterTable::getByKeyNoAutoIncNoTime | ( | vector< SourceParameterRow * > & | vin, | |
vector< SourceParameterRow * > & | vout, | |||
int | sourceId | |||
) | [private] |
Fills the vector vout (passed by reference) with pointers on elements of vin whose attributes are equal to the corresponding parameters of the method.
ASDM& asdm::SourceParameterTable::getContainer | ( | ) | const |
Return the container to which this table belongs.
Entity asdm::SourceParameterTable::getEntity | ( | ) | const [virtual] |
Return this table's Entity.
Implements asdm::Representable.
static vector<string> asdm::SourceParameterTable::getKeyName | ( | ) | [static] |
Return the list of field names that make up key key as an array of strings.
string asdm::SourceParameterTable::getName | ( | ) | const [virtual] |
Return the name of this table.
Implements asdm::Representable.
SourceParameterRow* asdm::SourceParameterTable::getRowByKey | ( | int | sourceParameterId, | |
int | sourceId, | |||
ArrayTimeInterval | timeInterval | |||
) |
Returns a SourceParameterRow* given a key.
sourceParameterId. | ||
sourceId. | ||
timeInterval. |
vector<SourceParameterRow *> asdm::SourceParameterTable::getRowBySourceParameterId | ( | int | ) |
Returns a vector of pointers on rows whose key element <<AutoIncrementableAttribute>> sourceParameterId is equal to the parameter <<AutoIncrementableAttribute>> sourceParameterId.
sourceParameterId | int contains the value of the autoincrementable attribute that is looked up in the table. |
SourceParameterRow* asdm::SourceParameterTable::insertByStartTime | ( | SourceParameterRow * | x, | |
vector< SourceParameterRow * > & | row | |||
) | [private] |
Insert a SourceParameterRow* in a vector of SourceParameterRow* so that it's ordered by ascending time.
SourceParameterRow* | x . The pointer to be inserted. | |
vector | <SourceParameterRow*>& row. A reference to the vector where to insert x. |
string asdm::SourceParameterTable::Key | ( | int | sourceId | ) | [private] |
Returns a string built by concatenating the ascii representation of the parameters values suffixed with a "_" character.
SourceParameterRow* asdm::SourceParameterTable::lookup | ( | int | sourceId, | |
ArrayTimeInterval | timeInterval, | |||
int | numFreq, | |||
int | numStokes, | |||
int | numDep, | |||
vector< StokesParameterMod::StokesParameter > | stokesParameter, | |||
vector< vector< Flux > > | flux, | |||
vector< Frequency > | frequency, | |||
vector< Frequency > | frequencyInterval, | |||
vector< vector< Flux > > | fluxErr | |||
) |
Look up the table for a row whose all attributes except the autoincrementable one are equal to the corresponding parameters of the method.
sourceId. | ||
timeInterval. | ||
numFreq. | ||
numStokes. | ||
numDep. | ||
stokesParameter. | ||
flux. | ||
frequency. | ||
frequencyInterval. | ||
fluxErr. |
SourceParameterRow* asdm::SourceParameterTable::newRow | ( | int | sourceId, | |
ArrayTimeInterval | timeInterval, | |||
int | numFreq, | |||
int | numStokes, | |||
int | numDep, | |||
vector< StokesParameterMod::StokesParameter > | stokesParameter, | |||
vector< vector< Flux > > | flux, | |||
vector< Frequency > | frequency, | |||
vector< Frequency > | frequencyInterval, | |||
vector< vector< Flux > > | fluxErr | |||
) |
Create a new row initialized to the specified values.
sourceId. | ||
timeInterval. | ||
numFreq. | ||
numStokes. | ||
numDep. | ||
stokesParameter. | ||
flux. | ||
frequency. | ||
frequencyInterval. | ||
fluxErr. |
SourceParameterRow* asdm::SourceParameterTable::newRow | ( | SourceParameterRow * | row | ) |
Create a new row using a copy constructor mechanism.
The method creates a new SourceParameterRow 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 SourceParameterRow with default values for its attributes.
row | the row which is to be copied. |
SourceParameterRow* asdm::SourceParameterTable::newRow | ( | ) |
SourceParameterRow* asdm::SourceParameterTable::newRowCopy | ( | SourceParameterRow * | 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.
SourceParameterRow* asdm::SourceParameterTable::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.
SourceParameterRow* asdm::SourceParameterTable::newRowFull | ( | int | sourceId, | |
ArrayTimeInterval | timeInterval, | |||
int | numFreq, | |||
int | numStokes, | |||
int | numDep, | |||
vector< StokesParameterMod::StokesParameter > | stokesParameter, | |||
vector< vector< Flux > > | flux, | |||
vector< Frequency > | frequency, | |||
vector< Frequency > | frequencyInterval, | |||
vector< vector< Flux > > | fluxErr | |||
) |
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.
void asdm::SourceParameterTable::setEntity | ( | Entity | e | ) | [virtual] |
void asdm::SourceParameterTable::setFromFile | ( | const string & | directory | ) |
Reads and parses a file containing a representation of a SourceParameterTable as those produced by the toFile method.
This table is populated with the result of the parsing.
directory | The name of the directory containing the file te be read and parsed. |
ConversionException | If any error occurs while reading the files in the directory or parsing them. |
void asdm::SourceParameterTable::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.
mimeMsg | the string containing the MIME message. |
ConversionException |
unsigned int asdm::SourceParameterTable::size | ( | ) | [virtual] |
Return the number of rows in the table.
Implements asdm::Representable.
void asdm::SourceParameterTable::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 "SourceParameter.bin" or an XML representation (fileAsBin==false) will be saved in a file "SourceParameter.xml". The file is always written in a directory whose name is passed as a parameter.
directory | The name of directory where the file containing the table's representation will be saved. |
char* asdm::SourceParameterTable::toFITS | ( | ) | const throw (ConversionException) [virtual] |
To be implemented.
Implements asdm::Representable.
SourceParameterTableIDL* asdm::SourceParameterTable::toIDL | ( | ) |
Conversion Methods.
Convert this table into a SourceParameterTableIDL CORBA structure.
string asdm::SourceParameterTable::toMIME | ( | ) |
Serialize this into a stream of bytes and encapsulates that stream into a MIME message.
string asdm::SourceParameterTable::toVOTable | ( | ) | const throw (ConversionException) [virtual] |
To be implemented.
Implements asdm::Representable.
string asdm::SourceParameterTable::toXML | ( | ) | throw (ConversionException) [virtual] |
Translate this table to an XML representation conform to the schema defined for SourceParameter (SourceParameterTable.xsd).
Implements asdm::Representable.
friend class asdm::ASDM [friend] |
Definition at line 273 of file SourceParameterTable.h.
bool asdm::SourceParameterTable::archiveAsBin [private] |
Definition at line 590 of file SourceParameterTable.h.
ASDM& asdm::SourceParameterTable::container [private] |
Definition at line 588 of file SourceParameterTable.h.
map<string, ID_TIME_ROWS > asdm::SourceParameterTable::context [private] |
Definition at line 643 of file SourceParameterTable.h.
Entity asdm::SourceParameterTable::entity [private] |
Definition at line 593 of file SourceParameterTable.h.
bool asdm::SourceParameterTable::fileAsBin [private] |
Definition at line 591 of file SourceParameterTable.h.
vector<string> asdm::SourceParameterTable::key [static, private] |
The list of field names that make up key key.
Definition at line 606 of file SourceParameterTable.h.
vector<SourceParameterRow * > asdm::SourceParameterTable::privateRows [private] |
A data structure to store the pointers on the table's rows.
In all cases we maintain a private ArrayList of SourceParameterRow s.
Definition at line 633 of file SourceParameterTable.h.
string asdm::SourceParameterTable::tableName [static, private] |
The name of this table.
Definition at line 600 of file SourceParameterTable.h.