44 if(!snTemp.isEmpty()) {
82 return Compose(p, def2filename);
93 static PvlGroup dataDir(Preference::Preferences().findGroup(
"DataDirectory"));
96 static QString missionTransFile = (QString) dataDir[
"base"] +
"/translations/MissionName2DataDir.trn";
98 missionXlater.SetLabel(label);
99 QString mission = missionXlater.
Translate(
"MissionName");
102 static QString instTransFile = (QString) dataDir[
"base"] +
"/translations/Instruments.trn";
104 instrumentXlater.SetLabel(label);
105 QString instrument = instrumentXlater.
Translate(
"InstrumentName");
114 static std::map<QString, PvlToPvlTranslationManager> missionTranslators;
117 QString key = mission +
"_" + instrument;
120 std::map<QString, PvlToPvlTranslationManager>::iterator translationIterator = missionTranslators.find(key);
123 if(translationIterator == missionTranslators.end()) {
125 FileName snFile((QString) dataDir[mission] +
"/translations/" +
126 instrument +
"SerialNumber????.trn");
130 missionTranslators.insert(
134 translationIterator = missionTranslators.find(key);
137 translationIterator->second.SetLabel(label);
138 translationIterator->second.Auto(outLabel);
154 QString sn = snGroup[
"Keyword1"][0];
155 for(
int i = 2; i <= keys; i++) {
156 QString keyword = QString(
"Keyword%1").arg(i);
157 sn +=
"/" + snGroup[keyword][0];
175 QString filename = list.
fileName(sn);
int keywords() const
Returns the number of keywords contained in the PvlContainer.
static QString CreateSerialNumber(PvlGroup &snGroup, int key)
Create the SerialNumber string by concatenating the keywords in the label with '/' in between serialN...
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
File name manipulation and expansion.
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Allows applications to translate simple text files.
virtual ~SerialNumber()
Destroy a SerialNumber object.
static QString Compose(Pvl &label, bool def2filename=false)
Compose a SerialNumber from a PVL.
QString fileName(const QString &sn)
Return a filename given a serial number.
static QString Compose(Pvl &label, bool def2filename=false)
Compose a ObservationNumber from a PVL.
Contains multiple PvlContainers.
A single keyword-value pair.
SerialNumber()
Create an empty SerialNumber object.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
virtual QString Translate(QString translationGroupName, int findex=0)
Returns a translated value.
Container for cube-like labels.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
static QString ComposeObservation(const QString &sn, SerialNumberList &list, bool def2filename=false)
Creates the ObservationNumber from a string representing the SerialNumber and a SerialList.
QString fileName() const
Returns the filename used to initialise the Pvl object.
FileName highestVersion() const
Searches the directory specified in the file name for the highest version of the file name...
Namespace for ISIS/Bullet specific routines.
Serial Number list generator.
static PvlGroup FindSerialTranslation(Pvl &label)
Get Groups by translating from correct Translation table.
IO Handler for Isis Cubes.