36 if(!snTemp.isEmpty()) {
67 return Compose(p, def2filename);
77 static PvlGroup dataDir(Preference::Preferences().findGroup(
"DataDirectory"));
80 static QString missionTransFile = (QString) dataDir[
"base"] +
"/translations/MissionName2DataDir.trn";
82 missionXlater.SetLabel(label);
83 QString mission = missionXlater.
Translate(
"MissionName");
86 static QString instTransFile = (QString) dataDir[
"base"] +
"/translations/Instruments.trn";
88 instrumentXlater.SetLabel(label);
89 QString instrument = instrumentXlater.
Translate(
"InstrumentName");
96 static std::map<QString, std::pair<PvlToPvlTranslationManager, PvlKeyword> > missionTranslators;
97 QString key = mission +
"_" + instrument;
98 std::map<QString, std::pair<PvlToPvlTranslationManager, PvlKeyword> >::iterator
99 translationIterator = missionTranslators.find(key);
101 if(translationIterator == missionTranslators.end()) {
103 FileName snFile((QString) dataDir[mission] +
"/translations/" +
104 instrument +
"SerialNumber????.trn");
110 if(translation.hasKeyword(
"ObservationKeys")) {
111 observationKeys = translation[
"ObservationKeys"];
115 missionTranslators.insert(
116 std::pair<QString, std::pair<PvlToPvlTranslationManager, PvlKeyword> >
120 translationIterator = missionTranslators.find(key);
123 translationIterator->second.first.SetLabel(label);
124 translationIterator->second.first.Auto(outLabel);
128 if(!translationIterator->second.second.name().isEmpty()) {
129 snGroup += translationIterator->second.second;
147 std::vector<QString> sn;
148 for(
int i = 0; i < list.
size(); i++) {
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 serialNumber(const QString &filename)
Return a serial number given a filename.
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.
static QString Compose(Pvl &label, bool def2filename=false)
Compose a ObservationNumber from a PVL.
Contains multiple PvlContainers.
A single keyword-value pair.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
virtual ~ObservationNumber()
Destroy a SerialNumber object.
virtual QString Translate(QString translationGroupName, int findex=0)
Returns a translated value.
std::vector< QString > PossibleSerial(const QString &on, SerialNumberList &list)
Creates a vector of plasible SerialNumbers from a string representing the ObservationNumber and a Ser...
Container for cube-like labels.
int size() const
How many serial number / filename combos are in the list.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
static PvlGroup FindObservationTranslation(Pvl &label)
Get Groups by translating from correct Translation table.
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.
ObservationNumber()
Create an empty SerialNumber object.
IO Handler for Isis Cubes.