1#ifndef ImportPdsTable_h
2#define ImportPdsTable_h
105 const QString &pdsTabFile=
"",
106 const QString &pdsTableName =
"TABLE");
109 QString
name()
const;
115 void load(
const QString &pdsLabFile,
const QString &pdsTabFile =
"",
116 const QString &pdsTableName =
"TABLE");
118 bool hasColumn(
const QString &colName)
const;
120 const bool &formatted =
true)
const;
124 QString
getType(
const QString &colName)
const;
125 bool setType(
const QString &colName,
const QString &dataType);
129 const QString &isisTableName);
131 const QString &isisTableName);
157 const QString &delimiter =
"")
const;
160 const QString &delimiter =
"")
const;
165 virtual bool processRow(
const int &row,
const QString &rowdata);
171 void loadLabel(
const QString &labfile, QString &tblfile,
172 const QString &tblname =
"");
173 void loadTable(
const QString &tabfile);
180 void setPdsByteOrder(QString byteOrder);
195 QString m_pdsTableType;
199 QString m_pdsTableFile;
Import a PDS table file with a label description.
Definition ImportPdsTable.h:101
ColumnDescr * findColumn(const QString &colName)
Searches internal column descriptors for a named column.
Definition ImportPdsTable.cpp:642
virtual bool processRow(const int &row, const QString &rowdata)
Process a freshly read PDS table line of data.
Definition ImportPdsTable.cpp:1212
void setName(const QString &name="TABLE")
Set the name of the PDS table object.
Definition ImportPdsTable.cpp:98
QString name() const
Return the name of the PDS table.
Definition ImportPdsTable.cpp:89
QString getFormattedName(const QString &colname) const
Converts a column name to a camel-case after it has been cleansed.
Definition ImportPdsTable.cpp:759
int rows() const
Returns the number of rows in the table.
Definition ImportPdsTable.cpp:1011
const ColumnDescr & getColumnDescriptor(const int &nth) const
Retrieve a column description by index.
Definition ImportPdsTable.cpp:614
Table importTable(const QString &isisTableName)
Populate a Table object with the PDS table and return it.
Definition ImportPdsTable.cpp:318
QString getColumnValue(const QString &tline, const ColumnDescr &cdesc, const QString &delimiter="") const
Extracts a column from a QString based upon a description.
Definition ImportPdsTable.cpp:690
void load(const QString &pdsLabFile, const QString &pdsTabFile="", const QString &pdsTableName="TABLE")
Loads a PDS table label and (optional) data file.
Definition ImportPdsTable.cpp:132
QList< ColumnDescr > ColumnTypes
Definition ImportPdsTable.h:146
virtual ~ImportPdsTable()
Destructs the ImportPdsTable object.
Definition ImportPdsTable.cpp:84
QStringList Columns
Definition ImportPdsTable.h:147
bool setType(const QString &colName, const QString &dataType)
Change the datatype for a column.
Definition ImportPdsTable.cpp:295
QList< Columns > Rows
Definition ImportPdsTable.h:148
QString getGenericType(const QString &ttype) const
Determine generic data type of a column.
Definition ImportPdsTable.cpp:798
ImportPdsTable()
Default constructor.
Definition ImportPdsTable.cpp:43
QString getType(const QString &colName) const
Get the type associated with the specified column.
Definition ImportPdsTable.cpp:268
bool hasColumn(const QString &colName) const
This method determines whether the PDS table has a column with the given name.
Definition ImportPdsTable.cpp:186
QStringList getColumnNames(const bool &formatted=true) const
Return the names of all the columns.
Definition ImportPdsTable.cpp:242
QString getColumnName(const unsigned int &index=0, const bool &formatted=true) const
Returns the name of the specifed column.
Definition ImportPdsTable.cpp:211
int columns() const
Returns the number of columns in the table.
Definition ImportPdsTable.cpp:999
QStringList getColumnFields(const QString &tline, const ColumnDescr &cdesc, const QString &delimiter="") const
Extracts column fields from a QString based upon a description.
Definition ImportPdsTable.cpp:712
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
Class for storing an Isis::Table's field information.
Definition TableField.h:47
Class for storing Table blobs information.
Definition Table.h:61
Definition TableRecord.h:38
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
Definition ImportPdsTable.h:135
int m_colnum
Column number.
Definition ImportPdsTable.h:137
int m_startByte
Starting byte of data.
Definition ImportPdsTable.h:139
int m_numBytes
Number bytes in column.
Definition ImportPdsTable.h:140
QString m_dataType
PDS table DATA_TYPE of column.
Definition ImportPdsTable.h:138
int m_itemBytes
Number bytes per item.
Definition ImportPdsTable.h:141
int m_items
Number of items in column.
Definition ImportPdsTable.h:142
QString m_name
Name of column.
Definition ImportPdsTable.h:136