From 91128aaeba9a20b949d436be5528e3cc31b11198 Mon Sep 17 00:00:00 2001 From: Hacene SI HADJ MOHAND Date: Thu, 3 Jun 2021 14:52:45 +0200 Subject: [PATCH] kernel arguments ok --- src/TimeTableCatalog/InternalXMLData.cc | 6 ++++++ src/TimeTableCatalog/InternalXMLData.hh | 6 ++++++ src/TimeTableCatalog/InternalXMLReader.cc | 16 ++++++++++++++-- src/TimeTableCatalog/InternalXMLWriter.cc | 21 +++++++++++++++++++++ src/TimeTableCatalog/SpaceData.cc | 2 +- src/TimeTableCatalog/SpaceReader.cc | 3 --- src/TimeTableCatalog/SpaceReader.hh | 5 ----- src/TimeTableCatalog/SpaceWriter.cc | 36 ++++++++++++++++++++++++++---------- src/TimeTableCatalog/TimeTable.cc | 13 +++++++------ src/TimeTableCatalog/TimeTable.hh | 18 +++++++++++++++++- 10 files changed, 98 insertions(+), 28 deletions(-) diff --git a/src/TimeTableCatalog/InternalXMLData.cc b/src/TimeTableCatalog/InternalXMLData.cc index 22c6255..5df7193 100644 --- a/src/TimeTableCatalog/InternalXMLData.cc +++ b/src/TimeTableCatalog/InternalXMLData.cc @@ -14,6 +14,12 @@ const std::string InternalXMLData::SEPARATOR = ","; const std::string InternalXMLData::ELEM_NAME = "name"; const std::string InternalXMLData::ELEM_CREATED = "created"; + +const std::string InternalXMLData::ELEM_MODIFIED = "modified"; +const std::string InternalXMLData::SURVEY_START_DATE = "surveyStart"; +const std::string InternalXMLData::SURVEY_STOP_DATE = "surveyStop"; +const std::string InternalXMLData::ELEM_CONTACT = "contact"; + const std::string InternalXMLData::ELEM_DESCRIPTION = "description"; const std::string InternalXMLData::ELEM_HISTORY = "history"; const std::string InternalXMLData::ELEM_PARAMETERS = "parameters"; diff --git a/src/TimeTableCatalog/InternalXMLData.hh b/src/TimeTableCatalog/InternalXMLData.hh index 63865d9..07fb6f2 100644 --- a/src/TimeTableCatalog/InternalXMLData.hh +++ b/src/TimeTableCatalog/InternalXMLData.hh @@ -20,6 +20,12 @@ public: static const std::string XML_TIMETABLE_TAG; static const std::string ELEM_NAME; static const std::string ELEM_CREATED; + static const std::string ELEM_MODIFIED; + // survey start and stop date + static const std::string SURVEY_START_DATE; + static const std::string SURVEY_STOP_DATE; + + static const std::string ELEM_CONTACT; static const std::string ELEM_DESCRIPTION; static const std::string ELEM_HISTORY; static const std::string ELEM_PARAMETERS; diff --git a/src/TimeTableCatalog/InternalXMLReader.cc b/src/TimeTableCatalog/InternalXMLReader.cc index 0be9498..bacb96f 100644 --- a/src/TimeTableCatalog/InternalXMLReader.cc +++ b/src/TimeTableCatalog/InternalXMLReader.cc @@ -22,6 +22,11 @@ FTE_c3 2013-07-14T09:09:32 + 2013-07-14T09:09:32 + 2013-07-14T09:09:32 + 2013-07-14T09:09:32 + 2013-07-14T09:09:32 + tototiti Uploaded Time Table Time Table generated by AMDA @ CDPP;Description: FTE list from Cluster 3 data. From \"A new multivariate time series data analysis technique: Automated detection of flux transfer events using Cluster data\" by Karimabadi et al., JOURNAL OF GEOPHYSICAL RESEARCH, VOL. 114, A06216, doi:10.1029/2009JA014202, 2009 http://www.agu.org/journals/ja/ja0906/2009JA014202/The list is available as Auxiliary material \"Data Set S3\"Transformation into AMDA Time Table by V. Genot, CESR, Toulouse, France 29/06/2009 : - millisec have been omitted - the original event corresponds to the StartTime of the Time Table - if StopTime-StartTime = 1 sec then the event is a magnetosheath FTE - if StopTime-StartTime = 2 sec then the event is a magnetospheric FTE;Source: Upload Time Table;Creation Date : 2009-07-01 17:16:46 shared by Vincent Genot on 2009-11-24 18:52:50; created from another TT @@ -31,7 +36,6 @@ 2001-02-02T16:27:13 */ - namespace TimeTableCatalog { const std::string InternalXMLReader::FORMAT = "Internal"; @@ -111,7 +115,15 @@ void InternalXMLReader::processNode(TimeTable& pTT, xmlTextReaderPtr reader, int pTT._creationDate = readISOTime(tagValue); } else if (_tmpCurrentTag == InternalXMLData::ELEM_NB_INTERVALS) { // NOP, dont care about interval number - } else { + } else if( _tmpCurrentTag == InternalXMLData::ELEM_MODIFIED) { + pTT._modificationDate = readISOTime(tagValue); + }else if( _tmpCurrentTag == InternalXMLData::SURVEY_START_DATE) { + pTT._listStartDate = readISOTime(tagValue); + }else if( _tmpCurrentTag == InternalXMLData::SURVEY_STOP_DATE) { + pTT._listStopDate = readISOTime(tagValue); + }else if( _tmpCurrentTag == InternalXMLData::ELEM_CONTACT) { + pTT._contact = readISOTime(tagValue); + }else{ // read intervals if (_tmpCurrentTag == InternalXMLData::ELEM_START) { _tmpIntervalstartdate = readISOTime(tagValue); diff --git a/src/TimeTableCatalog/InternalXMLWriter.cc b/src/TimeTableCatalog/InternalXMLWriter.cc index 8e72d58..5073d4c 100644 --- a/src/TimeTableCatalog/InternalXMLWriter.cc +++ b/src/TimeTableCatalog/InternalXMLWriter.cc @@ -33,6 +33,11 @@ InternalXMLWriter::~InternalXMLWriter() { FTE_c3 2013-07-14T09:09:32 + 2013-07-14T09:09:32 + 2013-07-14T09:09:32 + 2013-07-14T09:09:32 + 2013-07-14T09:09:32 + tototiti Uploaded Time Table Time Table generated by AMDA @ CDPP;Description: FTE list from Cluster 3 data. From \"A new multivariate time series data analysis technique: Automated detection of flux transfer events using Cluster data\" by Karimabadi et al., JOURNAL OF GEOPHYSICAL RESEARCH, VOL. 114, A06216, doi:10.1029/2009JA014202, 2009 http://www.agu.org/journals/ja/ja0906/2009JA014202/The list is available as Auxiliary material \"Data Set S3\"Transformation into AMDA Time Table by V. Genot, CESR, Toulouse, France 29/06/2009 : - millisec have been omitted - the original event corresponds to the StartTime of the Time Table - if StopTime-StartTime = 1 sec then the event is a magnetosheath FTE - if StopTime-StartTime = 2 sec then the event is a magnetospheric FTE;Source: Upload Time Table;Creation Date : 2009-07-01 17:16:46 shared by Vincent Genot on 2009-11-24 18:52:50; created from another TT @@ -89,6 +94,22 @@ void InternalXMLWriter::writeMetadata(const TimeTable& pTT, std::ostringstream os; writeISOTime(pTT._creationDate, pTT._timeFormat, os); writeElement(pTT, pWriter, InternalXMLData::ELEM_CREATED, os.str()); + os.str(""); + + writeISOTime(pTT._modificationDate, pTT._timeFormat, os); + writeElement(pTT, pWriter, InternalXMLData::ELEM_MODIFIED, os.str()); + os.str(""); + + writeISOTime(pTT._listStartDate, pTT._timeFormat, os); + writeElement(pTT, pWriter, InternalXMLData::SURVEY_START_DATE, os.str()); + os.str(""); + + writeISOTime(pTT._listStopDate, pTT._timeFormat, os); + writeElement(pTT, pWriter, InternalXMLData::SURVEY_STOP_DATE, os.str()); + os.str(""); + + writeElement(pTT, pWriter, InternalXMLData::ELEM_CONTACT, pTT._name); + // -- write description tag if (!pTT._description.empty()) { std::string description = pTT._description.at(0); diff --git a/src/TimeTableCatalog/SpaceData.cc b/src/TimeTableCatalog/SpaceData.cc index 094013f..6d37a06 100644 --- a/src/TimeTableCatalog/SpaceData.cc +++ b/src/TimeTableCatalog/SpaceData.cc @@ -17,7 +17,7 @@ namespace TimeTableCatalog { const std::string SpaceData::LIST_ID_KEYWORD = "ListID:"; const std::string SpaceData::CREATION_DATE_KEYWORD = "CreationDate:"; const std::string SpaceData::MODIFY_DATE_KEYWORD = "ModifyDate:"; - const std::string SpaceData::FIELD_NAMES_KEYWORD = " FieldNames:"; + const std::string SpaceData::FIELD_NAMES_KEYWORD = "FieldNames:"; const std::string SpaceData::FIELD_UNIT_KEYWORD = "FieldUnits:"; const std::string SpaceData::FIELD_TYPES_KEYWORD = "FieldTypes:"; const std::string SpaceData::FIELD_NULLS_KEYWORD = "FieldNulls:"; diff --git a/src/TimeTableCatalog/SpaceReader.cc b/src/TimeTableCatalog/SpaceReader.cc index 8b18210..e033abe 100644 --- a/src/TimeTableCatalog/SpaceReader.cc +++ b/src/TimeTableCatalog/SpaceReader.cc @@ -194,9 +194,6 @@ void SpaceReader::addDescription(const std::string & pline, TimeTable& ptt) { ptt._description.push_back(value); } -void SpaceReader::addParameter(const std::string & pline, TimeTable& ptt) { -} - ParameterDescription::ParameterType SpaceReader::getTypeFromString(std::string type) { boost::algorithm::trim(type); boost::algorithm::to_lower(type); diff --git a/src/TimeTableCatalog/SpaceReader.hh b/src/TimeTableCatalog/SpaceReader.hh index 74a0845..b63b466 100644 --- a/src/TimeTableCatalog/SpaceReader.hh +++ b/src/TimeTableCatalog/SpaceReader.hh @@ -69,11 +69,6 @@ private: */ void addDescription(const std::string & pline, TimeTable& ptt); - /** - * Adds a parameter description to a time table. - */ - void addParameter(const std::string & pline, TimeTable& ptt); - int timeSize; }; diff --git a/src/TimeTableCatalog/SpaceWriter.cc b/src/TimeTableCatalog/SpaceWriter.cc index 10e7ae7..8b60fc9 100644 --- a/src/TimeTableCatalog/SpaceWriter.cc +++ b/src/TimeTableCatalog/SpaceWriter.cc @@ -64,11 +64,11 @@ const std::string SpaceWriter::getExtension() const { void SpaceWriter::writeMetaData(const TimeTable& pTT, std::ostream& pOut) { // write version - pOut << "# " < #include #include +#include "SpaceData.hh" namespace TimeTableCatalog { @@ -23,18 +24,18 @@ log4cxx::LoggerPtr TimeTable::_logger( log4cxx::Logger::getLogger("AMDA-Kernel.TimeTable")); TimeTable::TimeTable() : - _creationDate(0), _timeFormat(TimeTable::TIME_FORMAT::UNKNOWN), _extTimeFormat(AMDA::OutputFormatTime::FORMAT_OUTPUT_TIME_ISO), - _listStartDate(0), _listStopDate(0), _contact("None"), _contactID("None"){ + _creationDate(0), _timeFormat(TimeTable::TIME_FORMAT::UNKNOWN), _extTimeFormat(AMDA::OutputFormatTime::FORMAT_OUTPUT_TIME_ISO), _modificationDate(0), + _listStartDate(0), _listStopDate(0), _contact("None"), _contactID("None"),_eventTableVersion(SpaceData::EVENT_TABLE_VERSION_DEFAULT), _listID(SpaceData::LIST_ID_DEFAULT){ } TimeTable::TimeTable(TIME_FORMAT pFormat) : - _creationDate(0), _timeFormat(pFormat), _extTimeFormat(AMDA::OutputFormatTime::FORMAT_OUTPUT_TIME_ISO), - _listStartDate(0), _listStopDate(0), _contact("None"), _contactID("None") { + _creationDate(0), _timeFormat(pFormat), _extTimeFormat(AMDA::OutputFormatTime::FORMAT_OUTPUT_TIME_ISO), _modificationDate(0), + _listStartDate(0), _listStopDate(0), _contact("None"), _contactID("None"),_eventTableVersion(SpaceData::EVENT_TABLE_VERSION_DEFAULT), _listID(SpaceData::LIST_ID_DEFAULT) { } TimeTable::TimeTable(AMDA::OutputFormatTime pFormat) : - _creationDate(0), _timeFormat(TimeTable::TIME_FORMAT::UNKNOWN), _extTimeFormat(pFormat), - _listStartDate(0), _listStopDate(0), _contact("None"), _contactID("None") { + _creationDate(0), _timeFormat(TimeTable::TIME_FORMAT::UNKNOWN), _extTimeFormat(pFormat),_modificationDate(0), + _listStartDate(0), _listStopDate(0), _contact("None"), _contactID("None"),_eventTableVersion(SpaceData::EVENT_TABLE_VERSION_DEFAULT), _listID(SpaceData::LIST_ID_DEFAULT) { } TimeTable::~TimeTable() { diff --git a/src/TimeTableCatalog/TimeTable.hh b/src/TimeTableCatalog/TimeTable.hh index 1908277..50fff75 100644 --- a/src/TimeTableCatalog/TimeTable.hh +++ b/src/TimeTableCatalog/TimeTable.hh @@ -20,6 +20,7 @@ #include "log4cxx/logger.h" + namespace TimeTableCatalog { /** @@ -166,12 +167,17 @@ public: * TT creation date and interval dates ISO format (with or without msk) */ TIME_FORMAT _timeFormat; - + /** * TT creation date and interval dates extented format */ AMDA::OutputFormatTime _extTimeFormat; + /** + * TT modification date. + */ + double _modificationDate; + /** * ListStartDate => start date of the survey */ @@ -191,6 +197,16 @@ public: * contactID spase contact id */ std::string _contactID; + + /** + * EventTableVersion version of the format + */ + std::string _eventTableVersion; + + /** + * listID : spase id of the ccatalog if existe + */ + std::string _listID; protected: -- libgit2 0.21.2