39 OriginalXmlLabel::OriginalXmlLabel() :
Isis::
Blob(
"IsisCube",
"OriginalXmlLabel") {
50 Isis::
Blob(
"IsisCube",
"OriginalXmlLabel") {
72 QFile xmlFile(xmlFileName.
expanded());
73 if ( !xmlFile.open(QIODevice::ReadOnly) ) {
74 QString msg =
"Could not open label file [" + xmlFileName.
expanded() +
81 if ( !
m_originalLabel.setContent(&xmlFile,
false, &errmsg, &errline, &errcol) ) {
83 QString msg =
"XML read/parse error in file [" + xmlFileName.
expanded()
85 +
"], message: " + errmsg;
107 QString errorMessage;
113 QString msg =
"XML read/parse error when parsing original label. " 114 "Error at line [" +
toString(errorLine) +
115 "], column [" +
toString(errorColumn) +
116 "]. Error message: " + errorMessage;
131 p_blobPvl[
"ByteOrder"] = Isis::ByteOrderName(Isis::Lsb);
134 p_blobPvl[
"ByteOrder"] = Isis::ByteOrderName(Isis::Msb);
148 os.write( labelByteArray.data(), labelByteArray.size() );
void WriteInit()
Prepare to write the label out.
const QDomDocument & ReturnLabels() const
Returns the original Xml label.
File name manipulation and expansion.
void Read(const QString &file)
This method reads Pvl values from a specified file.
Namespace for the standard library.
int p_nbytes
Size of blob data (in bytes)
PvlObject p_blobPvl
Pvl Blob object.
OriginalXmlLabel()
Constructors a default OriginalXmlLabel with an empty label.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
A type of error that occurred when performing an actual I/O operation.
virtual void ReadData(std::istream &is)
Read binary data from an input stream into the Blob object.
char * p_buffer
Buffer blob data is stored in.
QDomDocument m_originalLabel
Original Xml Label.
#define _FILEINFO_
Macro for the filename and line number.
A single keyword-value pair.
bool IsLsb()
Return true if this host is an LSB first machine and false if it is not.
A type of error that cannot be classified as any of the other error types.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
void WriteData(std::fstream &os)
Write the label out to a stream.
void ReadData(std::istream &stream)
Read the xml file data from an input stream.
Namespace for ISIS/Bullet specific routines.
void readFromXmlFile(const FileName &xmlFileName)
Read the original label from an Xml file.
~OriginalXmlLabel()
Destructor.