GLIMSView Source Code Documentation

Session Class Reference

#include <session.h>

Inheritance diagram for Session:

Inheritance graph
[legend]

List of all members.


Detailed Description

An class representation of the session.shp file as described in the GLIMS specifications.

This is user and dataset information that is session wide.

History:
2007-06-01 Deborah Lee Soltesz - Added validate function to check that Session information exists and is valid.
What's New:
2007-06-14 Deborah Lee Soltesz - Validation function checks for required metadata, and reports to ValidationReport. Provides warning for non-required invalid/missing items, and errors for required items.

Definition at line 25 of file session.h.


Public Member Functions

virtual bool fromXML (QDomElement &elem)
 Read Session information from the project XML file.
virtual bool toXML (QDomDocument &doc, QDomElement &elem, std::string id="")
 Write Session information to the XML file.
bool validate (ValidationReport *valRep)
 Check that required session information is present.
virtual bool toXMLFile (std::string fname, std::string docname)
virtual bool fromXMLFile (std::string fname, std::string docname)
virtual void setCurrentVersion (std::string versionString)
virtual void setCurrentVersion (QDate versionQDate)
virtual QDate getCurrentVersion ()
virtual std::string getCurrentVersionStr ()

Public Attributes

int mRC_ID
 Regional Center ID.
std::string mDataSrc
 Data Source.
std::string mProcDesc
 Processing description.
std::string manlst_surn
 Analyst's surname.
std::string manlst_givn
 Analyst's given name.
std::string m3d_desc
 3D description
std::string manaly_time
 Analysis time.
Node mCenterPoint
 Center point of image.

Protected Member Functions

virtual bool writeTextTag (QDomDocument &doc, QDomElement &elem, std::string tagName, std::string text, std::string id="")
virtual bool writeIntTag (QDomDocument &doc, QDomElement &elem, std::string tagName, int val, std::string id="")
virtual bool writeDoubleTag (QDomDocument &doc, QDomElement &elem, std::string tagName, double val, std::string id="")
virtual std::string readTextTag (QDomElement elem, std::string tagName="", std::string id="")
virtual int readIntTag (QDomElement elem, std::string tagName="", std::string id="")
virtual double readDoubleTag (QDomElement elem, std::string tagName="", std::string id="")
virtual QDomElement createBaseTag (QDomDocument &doc, QDomElement &elem, std::string id, std::string tagName)
virtual QDomElement getElemByTagName (QDomElement &elem, std::string name)
virtual std::string qDateToString (const QDate *aQDate)
virtual bool stringToQDate (const std::string aStrDate, QDate *aQDate)
virtual std::string qDateTimeToString (const QDateTime *aQDateTime)
virtual bool stringToQDateTime (const std::string aStrDateTime, QDateTime *aQDateTime)

Protected Attributes

QDate mCurrentVersion

Member Function Documentation

virtual bool Session::fromXML ( QDomElement &  elem  )  [inline, virtual]

Read Session information from the project XML file.

History:
2005-08-04 Deborah Lee Soltesz - fixed issue with data not being read from XML file correctly (several elements read into mDataSrc instead of the appropriate member vars)

Implements XMLSerializeable.

Definition at line 45 of file session.h.

References Node::fromXML(), m3d_desc, manaly_time, manlst_givn, manlst_surn, mCenterPoint, mDataSrc, mProcDesc, mRC_ID, XMLSerializeable::readIntTag(), and XMLSerializeable::readTextTag().

Referenced by GLIMSDataset::fromXML().

Here is the call graph for this function:

virtual bool Session::toXML ( QDomDocument &  doc,
QDomElement &  elem,
std::string  id = "" 
) [inline, virtual]

Write Session information to the XML file.

Implements XMLSerializeable.

Definition at line 60 of file session.h.

References XMLSerializeable::createBaseTag(), m3d_desc, manaly_time, manlst_givn, manlst_surn, mCenterPoint, mDataSrc, mProcDesc, mRC_ID, Node::toXML(), XMLSerializeable::writeIntTag(), and XMLSerializeable::writeTextTag().

Referenced by GLIMSDataset::toXML().

Here is the call graph for this function:

bool Session::validate ( ValidationReport valRep  ) 

Check that required session information is present.

Definition at line 6 of file session.cpp.

References ValidationReport::breakBegin(), ValidationReport::breakEnd(), m3d_desc, manaly_time, manlst_givn, manlst_surn, mDataSrc, mProcDesc, mRC_ID, ValidationReport::reportError(), ValidationReport::reportOkay(), and ValidationReport::reportWarning().

Referenced by GLIMSProject::validate().

Here is the call graph for this function:

bool XMLSerializeable::writeTextTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
std::string  text,
std::string  id = "" 
) [protected, virtual, inherited]

virtual bool XMLSerializeable::writeIntTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
int  val,
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual bool XMLSerializeable::writeDoubleTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
double  val,
std::string  id = "" 
) [inline, protected, virtual, inherited]

std::string XMLSerializeable::readTextTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [protected, virtual, inherited]

virtual int XMLSerializeable::readIntTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual double XMLSerializeable::readDoubleTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual QDomElement XMLSerializeable::createBaseTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  id,
std::string  tagName 
) [inline, protected, virtual, inherited]

Definition at line 79 of file xmlserializeable.h.

Referenced by ZoomAttr::toXML(), ViewState::toXML(), toXML(), and MainToolbar::toXML().

QDomElement XMLSerializeable::getElemByTagName ( QDomElement &  elem,
std::string  name 
) [protected, virtual, inherited]

Definition at line 119 of file xmlserializeable.cpp.

Referenced by GlacierIDDef::fromXML().

std::string XMLSerializeable::qDateToString ( const QDate *  aQDate  )  [protected, virtual, inherited]

bool XMLSerializeable::stringToQDate ( const std::string  aStrDate,
QDate *  aQDate 
) [protected, virtual, inherited]

std::string XMLSerializeable::qDateTimeToString ( const QDateTime *  aQDateTime  )  [protected, virtual, inherited]

Definition at line 149 of file xmlserializeable.cpp.

References XMLSerializeable::qDateToString().

Here is the call graph for this function:

bool XMLSerializeable::stringToQDateTime ( const std::string  aStrDateTime,
QDateTime *  aQDateTime 
) [protected, virtual, inherited]

Definition at line 205 of file xmlserializeable.cpp.

References XMLSerializeable::stringToQDate().

Here is the call graph for this function:

bool XMLSerializeable::toXMLFile ( std::string  fname,
std::string  docname 
) [virtual, inherited]

bool XMLSerializeable::fromXMLFile ( std::string  fname,
std::string  docname 
) [virtual, inherited]

void XMLSerializeable::setCurrentVersion ( std::string  versionString  )  [virtual, inherited]

Definition at line 249 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion, and XMLSerializeable::stringToQDate().

Referenced by MainToolbar::setupProj().

Here is the call graph for this function:

void XMLSerializeable::setCurrentVersion ( QDate  versionQDate  )  [virtual, inherited]

Definition at line 254 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion.

QDate XMLSerializeable::getCurrentVersion (  )  [virtual, inherited]

Definition at line 258 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion.

std::string XMLSerializeable::getCurrentVersionStr (  )  [virtual, inherited]

Definition at line 262 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion, and XMLSerializeable::qDateToString().

Here is the call graph for this function:


Member Data Documentation

std::string Session::mDataSrc

std::string Session::mProcDesc

Processing description.

Definition at line 29 of file session.h.

Referenced by GLIMSProject::exportGLIMSIngest(), fromXML(), SessionDlg::loadData(), SessionDlg::pdchanged(), toXML(), and validate().

std::string Session::manlst_surn

Analyst's surname.

Definition at line 30 of file session.h.

Referenced by GLIMSProject::exportGLIMSIngest(), fromXML(), SessionDlg::lnchanged(), SessionDlg::loadData(), toXML(), and validate().

std::string Session::manlst_givn

Analyst's given name.

Definition at line 31 of file session.h.

Referenced by GLIMSProject::exportGLIMSIngest(), SessionDlg::fnchanged(), fromXML(), SessionDlg::loadData(), toXML(), and validate().

std::string Session::m3d_desc

std::string Session::manaly_time

Center point of image.

Definition at line 34 of file session.h.

Referenced by fromXML(), and toXML().

QDate XMLSerializeable::mCurrentVersion [protected, inherited]


The documentation for this class was generated from the following files:

Home | Search | Disclaimers & Privacy | Contact Us
GLIMSView Maintainer: dsoltesz@usgs.gov