14#include "OriginalXmlLabel.h" 
   15#include "Application.h" 
   33    Blob blob = 
Blob(
"IsisCube", 
"OriginalXmlLabel");
 
 
   58  void OriginalXmlLabel::fromBlob(
Isis::Blob blob) {
 
   63    if ( !
m_originalLabel.setContent( QByteArray(blob.getBuffer(), blob.Size()) ) ) {
 
   64      QString msg = 
"XML read/parse error when parsing original label. " 
   65                    "Error at line [" + 
toString(errorLine) +
 
   66                    "], column [" + 
toString(errorColumn) +
 
   67                    "]. Error message: " + errorMessage;
 
   79    std::stringstream sstream;
 
   81    string orglblStr = sstream.str();
 
   82    Isis::Blob blob(
"IsisCube", 
"OriginalXmlLabel");
 
   83    blob.setData((
char*)orglblStr.data(), orglblStr.length());
 
   86      blob.Label()[
"ByteOrder"] = Isis::ByteOrderName(Isis::Lsb);
 
   89      blob.Label()[
"ByteOrder"] = Isis::ByteOrderName(Isis::Msb);
 
 
  104    QFile xmlFile(xmlFileName.expanded());
 
  105     if ( !xmlFile.open(QIODevice::ReadOnly) ) {
 
  106       QString msg = 
"Could not open label file [" + xmlFileName.expanded() +
 
  113     if ( !
m_originalLabel.setContent(&xmlFile, 
false, &errmsg, &errline, &errcol) ) {
 
  115       QString msg = 
"XML read/parse error in file [" + xmlFileName.expanded()
 
  117            + 
"], message: " + errmsg;
 
 
File name manipulation and expansion.
@ Unknown
A type of error that cannot be classified as any of the other error types.
@ Io
A type of error that occurred when performing an actual I/O operation.
const QDomDocument & ReturnLabels() const
Returns the original Xml label.
void readFromXmlFile(const FileName &xmlFileName)
Read the original label from an Xml file.
QDomDocument m_originalLabel
Original Xml Label.
OriginalXmlLabel()
Constructors a default OriginalXmlLabel with an empty label.
~OriginalXmlLabel()
Destructor.
Blob toBlob() const
Serialize the OriginalXmlLabel to a Blob.
A single keyword-value pair.
This is free and unencumbered software released into the public domain.
bool IsLsb()
Return true if this host is an LSB first machine and false if it is not.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Namespace for the standard library.