COPASI API  4.40.278
CRDFUtilities Class Reference

#include <CRDFUtilities.h>

Public Member Functions

 CRDFUtilities ()
 
virtual ~CRDFUtilities ()
 

Static Public Member Functions

static bool findNextElement (const std::string &rdfXml, const std::string &elementName, std::string::size_type &start, std::string::size_type &end)
 
static unsigned C_INT32 fixLocalFileAboutReference (std::string &rdfXml, const std::string &newId, const std::string &oldId)
 
static unsigned C_INT32 fixSBMLRdf (std::string &rdfXml)
 
static std::string getNameSpaceQualifier (const std::string &rdfXml, const std::string &nameSpace)
 

Constructor & Destructor Documentation

◆ CRDFUtilities()

CRDFUtilities::CRDFUtilities ( )

Constructor

◆ ~CRDFUtilities()

CRDFUtilities::~CRDFUtilities ( )
virtual

Destructor

Member Function Documentation

◆ findNextElement()

bool CRDFUtilities::findNextElement ( const std::string &  rdfXml,
const std::string &  elementName,
std::string::size_type &  start,
std::string::size_type &  end 
)
static

Find the the next XML element with the given name (either start or end).

Parameters
conststd::string & rdfXml
conststd::string & elementName
std::string::size_type& start
std::string::size_type& end
Returns
bool found

Referenced by fixLocalFileAboutReference(), and fixSBMLRdf().

◆ fixLocalFileAboutReference()

unsigned C_INT32 CRDFUtilities::fixLocalFileAboutReference ( std::string &  rdfXml,
const std::string &  newId,
const std::string &  oldId 
)
static

Fix local rdf:about attributes of the rdf:Description element. It returned the number of replacements made.

Parameters
std::string& rdfXml
conststd::string & newId
conststd::string & oldId
Returns
unsigned C_INT32 replacements

References C_INT32, findNextElement(), and getNameSpaceQualifier().

Referenced by CAnnotation::operator==(), CAnnotation::setMiriamAnnotation(), and CSBMLExporter::updateMIRIAMAnnotation().

◆ fixSBMLRdf()

unsigned C_INT32 CRDFUtilities::fixSBMLRdf ( std::string &  rdfXml)
static

Fix broken SBML RDF: <dc:creator rdf:parseType="Resource"> <rdf:Bag> It is not allowed to use the attribute rdf:parseType="Resource" and <rdf:Bag> simultaneously

Parameters
std::string& rdfXml
Returns
unsigned C_INT32 corrections

References C_INT32, findNextElement(), getNameSpaceQualifier(), and min.

Referenced by CRDFGraphConverter::SBML2Copasi().

◆ getNameSpaceQualifier()

std::string CRDFUtilities::getNameSpaceQualifier ( const std::string &  rdfXml,
const std::string &  nameSpace 
)
static

Find the qualifier for the given name space. Please note the qualifier if found has a ':' already appended.

Parameters
conststd::string & rdfXml
conststd::string & nameSpace
Returns
std::string qualifier

Referenced by fixLocalFileAboutReference(), and fixSBMLRdf().


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