Commit de7354f6485854a643276879fcc2b9703c92a5f8

Authored by Benjamin Renard
1 parent d321080e

Fix arraysize in VOTable for time fields

Showing 1 changed file with 9 additions and 3 deletions   Show diff stats
src/TimeTableCatalog/VOTableWriter.cc
... ... @@ -112,7 +112,13 @@ void VOTableWriter::writeField(const TimeTable& pTT,
112 112 if (unit.size() != 0)
113 113 addAttribute(pTT, pWriter, VOTableData::FIELD_UNIT_ATTRIB, unit);
114 114 if (arraysize != 1) {
115   - std::string arraySizeString = std::to_string(arraysize);
  115 + std::string arraySizeString;
  116 + if (arraysize == -1) {
  117 + arraySizeString = "*";
  118 + }
  119 + else {
  120 + arraySizeString = std::to_string(arraysize);
  121 + }
116 122 addAttribute(pTT, pWriter, VOTableData::FIELD_ARRAYSIZE_ATTRIB, arraySizeString);
117 123 }
118 124  
... ... @@ -142,8 +148,8 @@ void VOTableWriter::writeVOTable(const TimeTable& pTT,
142 148 openTag(pTT, pWriter, VOTableData::TABLE_TAG);
143 149  
144 150 // --------------- FIELD(S) -----------------------------
145   - writeField (pTT, pWriter, "startTime", "startTime", "time.epoch", "char", "dateTime", "", "", "", 1);
146   - writeField (pTT, pWriter, "stopTime", "stopTime", "time.epoch", "char", "dateTime", "", "", "", 1);
  151 + writeField (pTT, pWriter, "startTime", "startTime", "time.epoch", "char", "dateTime", "", "", "", -1);
  152 + writeField (pTT, pWriter, "stopTime", "stopTime", "time.epoch", "char", "dateTime", "", "", "", -1);
147 153  
148 154 // Write parameter description if defined (Catalog ONLY)
149 155 ParameterDescriptionList pdl = pTT.getParameterDescritptions();
... ...