34 #ifndef ObservationTable_CLASS
35 #define ObservationTable_CLASS
117 static const std::vector<std::string>&
getKeyName();
134 unsigned int size()
const;
152 static std::string
name() ;
192 std::string
toXML() ;
201 asdmIDL::ObservationTableIDL *
toIDL() ;
210 void toIDL(asdmIDL::ObservationTableIDL& x)
const;
221 void fromIDL(asdmIDL::ObservationTableIDL x) ;
279 std::vector<ObservationRow *>
get() ;
287 const std::vector<ObservationRow *>&
get()
const ;
378 std::vector<ObservationRow *>
row;
436 void toFile(std::string directory);
ObservationTable(ASDM &container)
Create a ObservationTable.
void setEntity(Entity e)
Set this table's Entity.
static const ByteOrder * Machine_Endianity
void checkPresenceInMemory()
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
ASDM & getContainer() const
Return the container to which this table belongs.
ObservationRow * checkAndAdd(ObservationRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a ObservationTable as those produced by the to...
A class to represent byte order information.
void addWithoutCheckingUnique(ObservationRow *x)
Brutally append an ObservationRow x to the collection of rows already stored in this table...
ObservationRow * add(ObservationRow *x)
====> Append a row to its table.
The ASDM class is the container for all tables.
std::string MIMEXMLPart(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Private methods involved during the export of this table into disk file(s).
void autoIncrement(std::string key, ObservationRow *x)
std::string toMIME(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Serialize this into a stream of bytes and encapsulates that stream into a MIME message.
asdmIDL::ObservationTableIDL * toIDL()
Conversion Methods.
void fromIDL(asdmIDL::ObservationTableIDL x)
Populate this table from the content of a ObservationTableIDL Corba structure.
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
The ObservationTable class is an Alma table.
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
std::vector< ObservationRow * > privateRows
A data structure to store the pointers on the table's rows.
std::map< std::string, int > noAutoIncIds
A map for the autoincrementation algorithm.
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
std::string toXML()
Produces an XML representation conform to the schema defined for Observation (ObservationTable.xsd).
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
std::string getName() const
Return the name of this table.
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
bool loadInProgress
Load the table in memory if necessary.
A pure virtual class whose derived classes are expected to be functors whose behaviours will be to re...
The Representable interface is implemented by all tables and by the container.
void setFromMIMEFile(const std::string &directory)
Private methods involved during the build of this table out of the content of file(s) containing an e...
const Double e
e and functions thereof:
std::vector< ObservationRow * > row
void setFromMIME(const std::string &mimeMsg)
Extracts the binary part of a MIME message and deserialize its content to fill this with the result o...
void fromXML(std::string &xmlDoc)
Populate this table from the content of a XML document that is required to be conform to the XML sche...
void append(ObservationRow *x)
Brutally append an ObservationRow x to the collection of rows already stored in this table...
void setFromXMLFile(const std::string &directory)
ObservationRow * newRow()
====> Row creation.
The ObservationRow class is a row of a ObservationTable.
ObservationRow * getRowByKey(Tag observationId)
Returns a ObservationRow* given a key.
static std::string name()
Return the name of this table.
Entity getEntity() const
Return this table's Entity.
unsigned int size() const
Return the number of rows in the table.
virtual ~ObservationTable()
std::string getVersion() const
Return the version information about this table.
The Entity class is an identification of a persistant entity in the ALMA archive. ...