COPASI API
4.16.103
|
#include <CAnnotation.h>
Public Types | |
typedef std::map< std::string, std::string > | UnsupportedAnnotation |
Public Member Functions | |
bool | addUnsupportedAnnotation (const std::string &name, const std::string &xml) |
CAnnotation () | |
CAnnotation (const CAnnotation &src) | |
virtual const std::string & | getKey () const |
const std::string & | getMiriamAnnotation () const |
const std::string & | getNotes () const |
UnsupportedAnnotation & | getUnsupportedAnnotations () |
const UnsupportedAnnotation & | getUnsupportedAnnotations () const |
bool | operator== (const CAnnotation &rhs) const |
bool | removeUnsupportedAnnotation (const std::string &name) |
bool | replaceUnsupportedAnnotation (const std::string &name, const std::string &xml) |
void | setMiriamAnnotation (const std::string &miriamAnnotation, const std::string &newId, const std::string &oldId) |
void | setNotes (const std::string ¬es) |
virtual | ~CAnnotation () |
Static Public Member Functions | |
static CAnnotation * | castObject (CCopasiObject *pObject) |
static const CAnnotation * | castObject (const CCopasiObject *pObject) |
Protected Attributes | |
std::string | mKey |
Static Private Member Functions | |
static bool | isValidXML (const std::string &xml) |
Private Attributes | |
std::string | mMiriamAnnotation |
std::string | mNotes |
UnsupportedAnnotation | mUnsupportedAnnotations |
std::string | mXMLId |
Definition at line 14 of file CAnnotation.h.
typedef std::map< std::string, std::string > CAnnotation::UnsupportedAnnotation |
Definition at line 17 of file CAnnotation.h.
CAnnotation::CAnnotation | ( | ) |
Default constructor
Definition at line 81 of file CAnnotation.cpp.
CAnnotation::CAnnotation | ( | const CAnnotation & | src | ) |
Copy constructor
const | CAnnotation & src |
Definition at line 89 of file CAnnotation.cpp.
|
virtual |
Destructor
Definition at line 97 of file CAnnotation.cpp.
References CCopasiRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().
bool CAnnotation::addUnsupportedAnnotation | ( | const std::string & | name, |
const std::string & | xml | ||
) |
Add an unsupported annotation
const | std::string & name |
const | std::string & xml |
Definition at line 211 of file CAnnotation.cpp.
References CCopasiMessage::ERROR, isValidXML(), MCAnnotation, and mUnsupportedAnnotations.
Referenced by SBMLImporter::importNotes().
|
static |
Definition at line 32 of file CAnnotation.cpp.
Referenced by CMIRIAMInfo::load(), CQNotes::load(), CMIRIAMInfo::save(), CQNotes::save(), and CQMiriamWidget::showEvent().
|
static |
Definition at line 59 of file CAnnotation.cpp.
|
virtual |
Retrieve the key
Reimplemented in CModel, CEvent, CReaction, CModelEntity, CFunction, and CModelParameterSet.
Definition at line 103 of file CAnnotation.cpp.
References mKey.
Referenced by CFunction::getKey(), CModelEntity::getKey(), CReaction::getKey(), CEvent::getKey(), and CMIRIAMInfo::save().
const std::string & CAnnotation::getMiriamAnnotation | ( | ) | const |
Retrieve the RDF/XML representation of the MIRIAM annotation
Definition at line 117 of file CAnnotation.cpp.
References mMiriamAnnotation.
Referenced by CEvent::CEvent(), CFunction::CFunction(), CModelEntity::CModelEntity(), CReaction::CReaction(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateEvent(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CModelExpansion::duplicateReaction(), CQRDFTreeView::enterProtected(), CMIRIAMInfo::load(), CCopasiXML::saveAnnotation(), CQMiriamWidget::showEvent(), test000092::test_miriam_export_8(), test000092::test_miriam_export_9(), test000092::test_miriam_import_1(), and CSBMLExporter::updateMIRIAMAnnotation().
const std::string & CAnnotation::getNotes | ( | ) | const |
Retrieve the XHTML notes
Definition at line 124 of file CAnnotation.cpp.
References mNotes.
Referenced by CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateEvent(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CModelExpansion::duplicateReaction(), CModel::initObjects(), CQNotes::load(), CQNotes::save(), CCopasiXML::saveAnnotation(), and CSBMLExporter::setSBMLNotes().
CAnnotation::UnsupportedAnnotation & CAnnotation::getUnsupportedAnnotations | ( | ) |
Retrieve the unsupported annotations in xml format.
Definition at line 201 of file CAnnotation.cpp.
References mUnsupportedAnnotations.
Referenced by CCopasiXMLParser::ReactionElement::end(), CCopasiXMLParser::EventElement::end(), CCopasiXMLParser::ModelElement::end(), CCopasiXMLParser::FunctionElement::end(), CCopasiXML::saveAnnotation(), and CSBMLExporter::setSBMLNotes().
const CAnnotation::UnsupportedAnnotation & CAnnotation::getUnsupportedAnnotations | ( | ) | const |
Definition at line 206 of file CAnnotation.cpp.
References mUnsupportedAnnotations.
|
staticprivate |
Definition at line 275 of file CAnnotation.cpp.
References BUFFER_SIZE, CCopasiMessage::getLastMessage(), CExpatTemplate< CType >::parse(), and CCopasiMessage::size().
Referenced by addUnsupportedAnnotation(), and replaceUnsupportedAnnotation().
bool CAnnotation::operator== | ( | const CAnnotation & | rhs | ) | const |
Comparison operator
const | CAnnotation & rhs |
Definition at line 129 of file CAnnotation.cpp.
References CRDFUtilities::fixLocalFileAboutReference(), mMiriamAnnotation, mNotes, and mXMLId.
bool CAnnotation::removeUnsupportedAnnotation | ( | const std::string & | name | ) |
Remove an unsupported annotation
const | std::string & name |
Definition at line 260 of file CAnnotation.cpp.
References mUnsupportedAnnotations.
bool CAnnotation::replaceUnsupportedAnnotation | ( | const std::string & | name, |
const std::string & | xml | ||
) |
Replace an unsupported annotation
const | std::string & name |
const | std::string & xml |
Definition at line 239 of file CAnnotation.cpp.
References CCopasiMessage::ERROR, isValidXML(), MCAnnotation, and mUnsupportedAnnotations.
void CAnnotation::setMiriamAnnotation | ( | const std::string & | miriamAnnotation, |
const std::string & | newId, | ||
const std::string & | oldId | ||
) |
Set the RDF/XML representation of the MIRIAM annotation
const | std::string & miriamAnnotation |
const | std::string & newId |
const | std::string & oldId |
Definition at line 108 of file CAnnotation.cpp.
References CRDFUtilities::fixLocalFileAboutReference(), mMiriamAnnotation, and mXMLId.
Referenced by CEvent::CEvent(), CFunction::CFunction(), CModelEntity::CModelEntity(), CReaction::CReaction(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateEvent(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CModelExpansion::duplicateReaction(), CCopasiXMLParser::ModelParameterSetElement::end(), CCopasiXMLParser::ReactionElement::end(), CCopasiXMLParser::EventElement::end(), CCopasiXMLParser::ModelElement::end(), CCopasiXMLParser::FunctionElement::end(), SBMLImporter::importMIRIAM(), CMIRIAMInfo::save(), CQMiriamWidget::showEvent(), and test000092::test_miriam_export_7().
void CAnnotation::setNotes | ( | const std::string & | notes | ) |
Set the XHTML Notes
const | std::string & notes |
Definition at line 120 of file CAnnotation.cpp.
References mNotes.
Referenced by CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateEvent(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CModelExpansion::duplicateReaction(), CCopasiXMLParser::ReactionElement::end(), CCopasiXMLParser::EventElement::end(), CCopasiXMLParser::ModelElement::end(), CCopasiXMLParser::FunctionElement::end(), SBMLImporter::importNotes(), CModel::load(), and CQNotes::save().
|
protected |
Key of the model entity. It is stored here, but constructed in the derived classes.
Definition at line 119 of file CAnnotation.h.
Referenced by CCompartment::CCompartment(), CEvent::CEvent(), CFunction::CFunction(), CMetab::CMetab(), CModelEntity::CModelEntity(), CMetab::compile(), CReaction::CReaction(), getKey(), CModel::getKey(), CModel::initObjects(), ~CAnnotation(), CCompartment::~CCompartment(), CEvent::~CEvent(), CFunction::~CFunction(), CMetab::~CMetab(), CModel::~CModel(), and CReaction::~CReaction().
|
private |
MIRIAM compliant annotation in RDF/XML format
Definition at line 130 of file CAnnotation.h.
Referenced by getMiriamAnnotation(), operator==(), and setMiriamAnnotation().
|
private |
Notes in XHTML format
Definition at line 125 of file CAnnotation.h.
Referenced by getNotes(), operator==(), and setNotes().
|
private |
The annotations which are not supported by COPASI. Note, the name is enforced to be unique.
Definition at line 141 of file CAnnotation.h.
Referenced by addUnsupportedAnnotation(), getUnsupportedAnnotations(), removeUnsupportedAnnotation(), and replaceUnsupportedAnnotation().
|
private |
The XMLId used in the about statement
Definition at line 135 of file CAnnotation.h.
Referenced by operator==(), and setMiriamAnnotation().