34 #ifndef AnnotationTable_CLASS
35 #define AnnotationTable_CLASS
100 #include <asdmIDLC.h>
266 static const std::vector<std::string>&
getKeyName();
283 unsigned int size()
const;
301 static std::string
name() ;
341 std::string
toXML() ;
350 asdmIDL::AnnotationTableIDL *
toIDL() ;
359 void toIDL(asdmIDL::AnnotationTableIDL& x)
const;
370 void fromIDL(asdmIDL::AnnotationTableIDL x) ;
442 std::vector<AnnotationRow *>
get() ;
450 const std::vector<AnnotationRow *>&
get()
const ;
556 std::vector<AnnotationRow *>
row;
614 void toFile(std::string directory);
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
std::vector< AnnotationRow * > row
static const ByteOrder * Machine_Endianity
AnnotationTable(ASDM &container)
Create a AnnotationTable.
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
void setEntity(Entity e)
Set this table's Entity.
std::string getName() const
Return the name of this table.
A class to represent byte order information.
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 setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
virtual ~AnnotationTable()
static std::string name()
Return the name of this table.
void append(AnnotationRow *x)
Brutally append an AnnotationRow x to the collection of rows already stored in this table...
asdmIDL::AnnotationTableIDL * toIDL()
Conversion Methods.
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
The ASDM class is the container for all tables.
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
std::map< std::string, int > noAutoIncIds
A map for the autoincrementation algorithm.
bool loadInProgress
Load the table in memory if necessary.
void autoIncrement(std::string key, AnnotationRow *x)
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 setFromXMLFile(const std::string &directory)
Entity getEntity() const
Return this table's Entity.
AnnotationRow * add(AnnotationRow *x)
====> Append a row to its table.
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
AnnotationRow * checkAndAdd(AnnotationRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
std::string getVersion() const
Return the version information about this table.
AnnotationRow * lookup(ArrayTime time, std::string issue, std::string details)
Look up the table for a row whose all attributes except the autoincrementable one are equal to the co...
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...
The AnnotationRow class is a row of a AnnotationTable.
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
AnnotationRow * getRowByKey(Tag annotationId)
Returns a AnnotationRow* given a key.
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
void addWithoutCheckingUnique(AnnotationRow *x)
Brutally append an AnnotationRow x to the collection of rows already stored in this table...
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.
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.
std::string toXML()
Produces an XML representation conform to the schema defined for Annotation (AnnotationTable.xsd).
const Double e
e and functions thereof:
void fromIDL(asdmIDL::AnnotationTableIDL x)
Populate this table from the content of a AnnotationTableIDL Corba structure.
AnnotationRow * newRow()
====> Row creation.
ASDM & getContainer() const
Return the container to which this table belongs.
unsigned int size() const
Return the number of rows in the table.
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a AnnotationTable as those produced by the toF...
void checkPresenceInMemory()
The AnnotationTable class is an Alma table.
std::vector< AnnotationRow * > privateRows
A data structure to store the pointers on the table's rows.
std::string MIMEXMLPart(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Private methods involved during the export of this table into disk file(s).
The Entity class is an identification of a persistant entity in the ALMA archive. ...