COPASI API  4.40.278
CProvenanceXMLWriter Class Reference

#include <CProvenanceXMLWriter.h>

Public Member Functions

void combineVersionProvenance (QString ParentVersionName, QString VersionName)
 
 CProvenanceXMLWriter (QWidget *parent=0, CUndoStack *undoStack=NULL, QString PathFile="", QString ProvenanceOrigionFiletype="", QString ProvenanceOrigionTime="", QList< QString > VersionsPathToCurrentModel=QList< QString >())
 
void deleteParentofCurrentVersionProvenance (QString VersionName)
 
void deleteVersionProvenance (QString VersionName)
 
void updateCurrentSessionProvenance ()
 
void updateMainBodyProvenace ()
 
void updateOrigionOfProvenance (QString OrigionalFile)
 
void updateVersionProvenanceXMLFile (QString VersionName)
 
 ~CProvenanceXMLWriter ()
 

Private Member Functions

void mergeProvenanceFiles (QString SourceFile1, QString SourceFile2, QString TargetFile)
 
QHash< QString, QString > reconstructProvenanceEntityNameMap ()
 

Private Attributes

QString mPathFile
 
QMap< QString, QString > mProvenanceAuthorNameMap
 
QString mProvenanceOrigionFileType
 
QString mProvenanceOrigionTime
 
int mProvenanceTotalActionNumber
 
int mProvenanceTotalAgentNumber
 
int mProvenanceTotalEntityNumber
 
CUndoStackmpUndoStack
 
QList< QString > mVersionsPathToCurrentModel
 

Constructor & Destructor Documentation

◆ CProvenanceXMLWriter()

CProvenanceXMLWriter::CProvenanceXMLWriter ( QWidget *  parent = 0,
CUndoStack undoStack = NULL,
QString  PathFile = "",
QString  ProvenanceOrigionFiletype = "",
QString  ProvenanceOrigionTime = "",
QList< QString >  VersionsPathToCurrentModel = QList<QString> () 
)
explicit

References mPathFile.

◆ ~CProvenanceXMLWriter()

CProvenanceXMLWriter::~CProvenanceXMLWriter ( )

Member Function Documentation

◆ combineVersionProvenance()

void CProvenanceXMLWriter::combineVersionProvenance ( QString  ParentVersionName,
QString  VersionName 
)

Add the Provenance of Parent Version to the Version Provenance

References mergeProvenanceFiles(), and mPathFile.

◆ deleteParentofCurrentVersionProvenance()

void CProvenanceXMLWriter::deleteParentofCurrentVersionProvenance ( QString  VersionName)

If the Parent of Current Version deleted, Update the Current Verison main body provenance

References mergeProvenanceFiles(), and mPathFile.

◆ deleteVersionProvenance()

void CProvenanceXMLWriter::deleteVersionProvenance ( QString  VersionName)

Delete Provenance of a deleted version

References mPathFile.

◆ mergeProvenanceFiles()

void CProvenanceXMLWriter::mergeProvenanceFiles ( QString  SourceFile1,
QString  SourceFile2,
QString  TargetFile 
)
private

Merge two provenance files into a target file. Source file1 is older provenance in saving time thand Source file 2

References mPathFile.

Referenced by combineVersionProvenance(), deleteParentofCurrentVersionProvenance(), and updateMainBodyProvenace().

◆ reconstructProvenanceEntityNameMap()

QHash< QString, QString > CProvenanceXMLWriter::reconstructProvenanceEntityNameMap ( )
private

◆ updateCurrentSessionProvenance()

◆ updateMainBodyProvenace()

void CProvenanceXMLWriter::updateMainBodyProvenace ( )

Update Main Body Provenance when session ends

References mergeProvenanceFiles(), and mPathFile.

Referenced by updateVersionProvenanceXMLFile().

◆ updateOrigionOfProvenance()

void CProvenanceXMLWriter::updateOrigionOfProvenance ( QString  OrigionalFile)

◆ updateVersionProvenanceXMLFile()

void CProvenanceXMLWriter::updateVersionProvenanceXMLFile ( QString  VersionName)

Update Provenance and store it as the newly created Version Provenance

References mPathFile, updateCurrentSessionProvenance(), and updateMainBodyProvenace().

Member Data Documentation

◆ mPathFile

◆ mProvenanceAuthorNameMap

QMap<QString, QString> CProvenanceXMLWriter::mProvenanceAuthorNameMap
private

The last Provenance parent of current model version File save and ending a session will take care of by COMBINE Archive The parent of current model version Last Created/Restored Version A map between Author provenance ID and their names Name = 'Givenanem + FamilyName'

Referenced by reconstructProvenanceEntityNameMap(), and updateCurrentSessionProvenance().

◆ mProvenanceOrigionFileType

QString CProvenanceXMLWriter::mProvenanceOrigionFileType
private

Provenance Orgional file type : Create/Open/Import

Referenced by updateOrigionOfProvenance().

◆ mProvenanceOrigionTime

QString CProvenanceXMLWriter::mProvenanceOrigionTime
private

Time of Create/Open/Import action (first action)

Referenced by updateOrigionOfProvenance().

◆ mProvenanceTotalActionNumber

int CProvenanceXMLWriter::mProvenanceTotalActionNumber
private

◆ mProvenanceTotalAgentNumber

int CProvenanceXMLWriter::mProvenanceTotalAgentNumber
private

◆ mProvenanceTotalEntityNumber

int CProvenanceXMLWriter::mProvenanceTotalEntityNumber
private

◆ mpUndoStack

CUndoStack* CProvenanceXMLWriter::mpUndoStack
private

A point to Undo Stack

Referenced by updateCurrentSessionProvenance().

◆ mVersionsPathToCurrentModel

QList<QString> CProvenanceXMLWriter::mVersionsPathToCurrentModel
private

A list of Versions from the root to the Parent of Current Model

Referenced by reconstructProvenanceEntityNameMap().


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