34 #ifndef EphemerisTable_CLASS
35 #define EphemerisTable_CLASS
250 static const std::vector<std::string>&
getKeyName();
267 unsigned int size()
const;
285 static std::string
name() ;
325 std::string
toXML() ;
334 asdmIDL::EphemerisTableIDL *
toIDL() ;
343 void toIDL(asdmIDL::EphemerisTableIDL& x)
const;
354 void fromIDL(asdmIDL::EphemerisTableIDL x) ;
393 EphemerisRow *
newRow(
ArrayTimeInterval timeInterval,
int ephemerisId, std::vector<double > observerLocation,
double equinoxEquator,
int numPolyDir, std::vector<std::vector<double > > dir,
int numPolyDist, std::vector<double > distance,
ArrayTime timeOrigin, std::string
origin);
447 std::vector<EphemerisRow *>
get() ;
455 const std::vector<EphemerisRow *>&
get()
const ;
468 std::vector <EphemerisRow*> *
getByContext(
int ephemerisId);
518 EphemerisRow*
lookup(
ArrayTimeInterval timeInterval,
int ephemerisId, std::vector<double > observerLocation,
double equinoxEquator,
int numPolyDir, std::vector<std::vector<double > > dir,
int numPolyDist, std::vector<double > distance,
ArrayTime timeOrigin, std::string
origin);
608 std::string
Key(
int ephemerisId) ;
618 void getByKeyNoAutoIncNoTime(std::vector <EphemerisRow*>& vin, std::vector <EphemerisRow*>& vout,
int ephemerisId);
677 void toFile(std::string directory);
EphemerisRow * getRowByKey(ArrayTimeInterval timeInterval, int ephemerisId)
Returns a EphemerisRow* given a key.
std::string toXML()
Produces an XML representation conform to the schema defined for Ephemeris (EphemerisTable.xsd).
static const ByteOrder * Machine_Endianity
unsigned int size() const
Return the number of rows in the table.
void setFromXMLFile(const std::string &directory)
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...
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...
The EphemerisTable class is an Alma table.
void getByKeyNoAutoIncNoTime(std::vector< EphemerisRow * > &vin, std::vector< EphemerisRow * > &vout, int ephemerisId)
Fills the vector vout (passed by reference) with pointers on elements of vin whose attributes are equ...
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
A class to represent byte order information.
asdmIDL::EphemerisTableIDL * toIDL()
Conversion Methods.
The ASDM class is the container for all tables.
void addWithoutCheckingUnique(EphemerisRow *x)
Brutally append an EphemerisRow x to the collection of rows already stored in this table...
EphemerisRow * add(EphemerisRow *x)
====> Append a row to its table.
EphemerisTable(ASDM &container)
Create a EphemerisTable.
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a EphemerisTable as those produced by the toFi...
static std::string name()
Return the name of this table.
std::string Key(int ephemerisId)
Returns a string built by concatenating the ascii representation of the parameters values suffixed wi...
virtual ~EphemerisTable()
The EphemerisRow class is a row of a EphemerisTable.
std::map< std::string, TIME_ROWS > context
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
std::vector< EphemerisRow * > privateRows
A data structure to store the pointers on the table's rows.
ASDM & getContainer() const
Return the container to which this table belongs.
std::vector< EphemerisRow * > * getByContext(int ephemerisId)
Returns all the rows sorted by ascending startTime for a given context.
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.
EphemerisRow * newRow()
====> Row creation.
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
Entity getEntity() const
Return this table's Entity.
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
void fromIDL(asdmIDL::EphemerisTableIDL x)
Populate this table from the content of a EphemerisTableIDL Corba structure.
std::string getVersion() const
Return the version information about this table.
virtual Origin origin() const =0
ABSTRACT METHODS //.
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 toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
std::string MIMEXMLPart(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Private methods involved during the export of this table into disk file(s).
A pure virtual class whose derived classes are expected to be functors whose behaviours will be to re...
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
The Representable interface is implemented by all tables and by the container.
std::vector< EphemerisRow * > TIME_ROWS
const Double e
e and functions thereof:
void append(EphemerisRow *x)
Brutally append an EphemerisRow x to the collection of rows already stored in this table...
EphemerisRow * checkAndAdd(EphemerisRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
bool loadInProgress
Load the table in memory if necessary.
EphemerisRow * lookup(ArrayTimeInterval timeInterval, int ephemerisId, std::vector< double > observerLocation, double equinoxEquator, int numPolyDir, std::vector< std::vector< double > > dir, int numPolyDist, std::vector< double > distance, ArrayTime timeOrigin, std::string origin)
Look up the table for a row whose all attributes are equal to the corresponding parameters of the met...
void setEntity(Entity e)
Set this table's Entity.
void checkPresenceInMemory()
EphemerisRow * insertByStartTime(EphemerisRow *x, std::vector< EphemerisRow * > &row)
Insert a EphemerisRow* in a vector of EphemerisRow* so that it's ordered by ascending time...
The Entity class is an identification of a persistant entity in the ALMA archive. ...
std::string getName() const
Return the name of this table.