Isis 3 Programmer Reference
|
Read and store original Xml labels. More...
#include <OriginalXmlLabel.h>
Public Member Functions | |
OriginalXmlLabel () | |
Constructors a default OriginalXmlLabel with an empty label. More... | |
OriginalXmlLabel (const QString &file) | |
Constructs an OriginalXmlLabel from a cube label file. More... | |
~OriginalXmlLabel () | |
Destructor. More... | |
void | readFromXmlFile (const FileName &xmlFileName) |
Read the original label from an Xml file. More... | |
const QDomDocument & | ReturnLabels () const |
Returns the original Xml label. More... | |
QString | Type () const |
Accessor method that returns a string containing the Blob type. More... | |
QString | Name () const |
Accessor method that returns a string containing the Blob name. More... | |
int | Size () const |
Accessor method that returns the number of bytes in the blob data. More... | |
PvlObject & | Label () |
Accessor method that returns a PvlObject containing the Blob label. More... | |
void | Read (const QString &file) |
This method reads Pvl values from a specified file. More... | |
void | Read (const QString &file, const Pvl &pvlLabels) |
This method reads the given a file and labels. More... | |
virtual void | Read (const Pvl &pvl, std::istream &is) |
This method reads the Blob data from an open input file stream. More... | |
void | Write (const QString &file) |
Write the blob data out to a file. More... | |
void | Write (Pvl &pvl, std::fstream &stm, const QString &detachedFileName="") |
Write the blob data out to a Pvl object. More... | |
Protected Member Functions | |
void | ReadData (std::istream &stream) |
Read the xml file data from an input stream. More... | |
void | WriteData (std::fstream &os) |
Write the label out to a stream. More... | |
void | WriteInit () |
Prepare to write the label out. More... | |
void | Find (const Pvl &pvl) |
This method searches the given Pvl for the Blob by the Blob's type and name. More... | |
virtual void | ReadInit () |
This virtual method for classes that inherit Blob. More... | |
Protected Attributes | |
PvlObject | p_blobPvl |
Pvl Blob object. More... | |
QString | p_blobName |
Name of the Blob object. More... | |
char * | p_buffer |
Buffer blob data is stored in. More... | |
BigInt | p_startByte |
Byte blob data starts at in buffer. More... | |
int | p_nbytes |
Size of blob data (in bytes) More... | |
QString | p_type |
Type of data stored in the buffer. More... | |
QString | p_detached |
Used for reading detached blobs. More... | |
QString | p_labelFile |
The file containing the labels. More... | |
Private Attributes | |
QDomDocument | m_originalLabel |
Original Xml Label. More... | |
Read and store original Xml labels.
This class provides a means to read and store the Xml labels from the original source.
Definition at line 48 of file OriginalXmlLabel.h.
Isis::OriginalXmlLabel::OriginalXmlLabel | ( | ) |
Constructors a default OriginalXmlLabel with an empty label.
Definition at line 39 of file OriginalXmlLabel.cpp.
References Isis::Blob::p_blobPvl.
Isis::OriginalXmlLabel::OriginalXmlLabel | ( | const QString & | file | ) |
Constructs an OriginalXmlLabel from a cube label file.
file | Xml file to read labels from |
Definition at line 49 of file OriginalXmlLabel.cpp.
References Isis::Blob::p_blobPvl, and Isis::Blob::Read().
Isis::OriginalXmlLabel::~OriginalXmlLabel | ( | ) |
Destructor.
Definition at line 59 of file OriginalXmlLabel.cpp.
|
protectedinherited |
This method searches the given Pvl for the Blob by the Blob's type and name.
If found, the start byte, number of bytes are read from the Pvl. Also, if a keyword label pointer is found, the filename for the detached blob is stored and the pointer is removed from the blob pvl.
pvl | The Pvl to be searched |
Definition at line 179 of file Blob.cpp.
References _FILEINFO_, Isis::PvlContainer::isNamed(), Isis::PvlObject::object(), Isis::PvlObject::objects(), and Isis::FileName::path().
|
inherited |
Accessor method that returns a PvlObject containing the Blob label.
Definition at line 167 of file Blob.cpp.
Referenced by Isis::SpicePosition::CacheLabel(), Isis::SpiceRotation::CacheLabel(), Isis::RosettaVirtisCamera::getPointingTable(), Isis::DawnVirCamera::getPointingTable(), Isis::SpicePosition::LoadCache(), Isis::SpiceRotation::LoadCache(), and Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked().
|
inherited |
Accessor method that returns a string containing the Blob name.
Definition at line 149 of file Blob.cpp.
Referenced by Isis::Shape::isFootprintable(), Isis::Image::isFootprintable(), Isis::SpicePosition::LoadCache(), and Isis::Cube::write().
|
inherited |
This method reads Pvl values from a specified file.
file | The filename to read from. |
iException::Io | - Unable to open file |
iException::Pvl | - Invalid label format |
Definition at line 243 of file Blob.cpp.
References _FILEINFO_, and Isis::Pvl::read().
Referenced by Isis::History::History(), Isis::OriginalLabel::OriginalLabel(), OriginalXmlLabel(), Isis::History::Read(), Isis::Cube::read(), and Isis::Table::Table().
|
inherited |
This method reads the given a file and labels.
file | The filename to read from. |
pvlLabels | A Pvl containing the label information. |
iException::Io | - Unable to open file |
Definition at line 268 of file Blob.cpp.
References _FILEINFO_, and Isis::Message::FileOpen().
|
virtualinherited |
This method reads the Blob data from an open input file stream.
pvl | A Pvl containing the label information. |
istm | The input file stream containing the blob data to be read. |
iException::Io | - Unable to open file |
Reimplemented in Isis::History.
Definition at line 303 of file Blob.cpp.
References _FILEINFO_, and Isis::Message::FileOpen().
|
protectedvirtual |
Read the xml file data from an input stream.
stream | The input stream to read from. |
IException::Unknown | "XML read/parse error when parsing original label." |
Reimplemented from Isis::Blob.
Definition at line 102 of file OriginalXmlLabel.cpp.
References _FILEINFO_, m_originalLabel, Isis::Blob::p_buffer, Isis::Blob::p_nbytes, Isis::Blob::ReadData(), Isis::toString(), and Isis::IException::Unknown.
void Isis::OriginalXmlLabel::readFromXmlFile | ( | const FileName & | xmlFileName | ) |
Read the original label from an Xml file.
FileName | The Xml file containing the original label. |
IException::Io | "Could not open label file." |
IException::Unknown | "XML read/parse error in file." |
Definition at line 71 of file OriginalXmlLabel.cpp.
References _FILEINFO_, Isis::FileName::expanded(), Isis::IException::Io, m_originalLabel, Isis::toString(), and Isis::IException::Unknown.
|
protectedvirtualinherited |
This virtual method for classes that inherit Blob.
It is not defined in the Blob class.
Reimplemented in Isis::Table.
const QDomDocument & Isis::OriginalXmlLabel::ReturnLabels | ( | ) | const |
Returns the original Xml label.
Definition at line 157 of file OriginalXmlLabel.cpp.
References m_originalLabel.
|
inherited |
|
inherited |
Accessor method that returns a string containing the Blob type.
Definition at line 140 of file Blob.cpp.
Referenced by Isis::Shape::isFootprintable(), Isis::Image::isFootprintable(), and Isis::Cube::write().
|
inherited |
Write the blob data out to a file.
file | The filename to write to. |
IException::Io | - Unable to open file |
IException::Io | - Error preparing to write data to file |
IException::Io | - Error creating file |
Definition at line 369 of file Blob.cpp.
References _FILEINFO_, Isis::PvlObject::addObject(), Isis::PvlObject::findObject(), Isis::toString(), and Isis::Pvl::write().
Referenced by Isis::Cube::write().
|
inherited |
Write the blob data out to a Pvl object.
pvl | The pvl object to update |
stm | stream to write data to |
detachedFileName | If the stream is detached from the labels give the name of the file |
Definition at line 418 of file Blob.cpp.
References Isis::PvlObject::addObject(), Isis::PvlContainer::name(), Isis::PvlObject::object(), Isis::PvlObject::objects(), and Isis::toString().
|
protectedvirtual |
Write the label out to a stream.
os | The stream to write the label out to. |
Reimplemented from Isis::Blob.
Definition at line 146 of file OriginalXmlLabel.cpp.
References m_originalLabel.
|
protectedvirtual |
Prepare to write the label out.
Reimplemented from Isis::Blob.
Definition at line 127 of file OriginalXmlLabel.cpp.
References Isis::IsLsb(), m_originalLabel, Isis::Blob::p_blobPvl, and Isis::Blob::p_nbytes.
|
private |
Original Xml Label.
Definition at line 63 of file OriginalXmlLabel.h.
Referenced by ReadData(), readFromXmlFile(), ReturnLabels(), WriteData(), and WriteInit().
|
protectedinherited |
Name of the Blob object.
Definition at line 95 of file Blob.h.
Referenced by Isis::Blob::Blob(), Isis::Table::operator+=(), Isis::Blob::operator=(), Isis::Table::ReadData(), and Isis::ImagePolygon::ReadData().
|
protectedinherited |
Definition at line 94 of file Blob.h.
Referenced by Isis::Blob::Blob(), Isis::Blob::operator=(), OriginalXmlLabel(), Isis::Table::ReadInit(), Isis::Table::Table(), WriteInit(), and Isis::Table::WriteInit().
|
protectedinherited |
Buffer blob data is stored in.
Definition at line 97 of file Blob.h.
Referenced by Isis::Blob::Blob(), Isis::GisBlob::GisBlob(), Isis::Blob::operator=(), ReadData(), Isis::History::ReturnHist(), Isis::OriginalLabel::ReturnLabels(), Isis::GisBlob::setPolygon(), Isis::History::WriteInit(), and Isis::OriginalLabel::WriteInit().
|
protectedinherited |
Used for reading detached blobs.
Definition at line 101 of file Blob.h.
Referenced by Isis::Blob::Blob(), and Isis::Blob::operator=().
|
protectedinherited |
The file containing the labels.
Definition at line 102 of file Blob.h.
Referenced by Isis::Blob::Blob(), and Isis::Blob::operator=().
|
protectedinherited |
Size of blob data (in bytes)
Definition at line 99 of file Blob.h.
Referenced by Isis::Blob::Blob(), Isis::GisBlob::GisBlob(), Isis::Blob::operator=(), ReadData(), Isis::ImagePolygon::ReadData(), Isis::History::ReturnHist(), Isis::OriginalLabel::ReturnLabels(), Isis::GisBlob::setPolygon(), Isis::ImagePolygon::WriteData(), WriteInit(), Isis::OriginalLabel::WriteInit(), Isis::History::WriteInit(), Isis::Table::WriteInit(), and Isis::ImagePolygon::WriteInit().
|
protectedinherited |
Byte blob data starts at in buffer.
Definition at line 98 of file Blob.h.
Referenced by Isis::Blob::Blob(), Isis::Blob::operator=(), Isis::Table::ReadData(), and Isis::ImagePolygon::ReadData().
|
protectedinherited |
Type of data stored in the buffer.
Definition at line 100 of file Blob.h.
Referenced by Isis::Blob::Blob(), Isis::Blob::operator=(), and Isis::ImagePolygon::ReadData().