40 if ((pEntity = dynamic_cast< CModelEntity * >(pObject)) != NULL)
43 if ((pEvent = dynamic_cast< CEvent * >(pObject)) != NULL)
44 return static_cast< CAnnotation * >(pEvent);
46 if ((pReaction = dynamic_cast< CReaction * >(pObject)) != NULL)
47 return static_cast< CAnnotation * >(pReaction);
49 if ((pParameterSet = dynamic_cast< CModelParameterSet * >(pObject)) != NULL)
50 return static_cast< CAnnotation * >(pParameterSet);
52 if ((pFunction = dynamic_cast< CFunction * >(pObject)) != NULL)
53 return static_cast< CAnnotation * >(pFunction);
62 const CEvent * pEvent = NULL;
66 if ((pEntity = dynamic_cast< const CModelEntity * >(pObject)) != NULL)
69 if ((pEvent = dynamic_cast< const CEvent * >(pObject)) != NULL)
70 return static_cast< const CAnnotation * >(pEvent);
72 if ((pReaction = dynamic_cast< const CReaction * >(pObject)) != NULL)
73 return static_cast< const CAnnotation * >(pReaction);
75 if ((pFunction = dynamic_cast< const CFunction * >(pObject)) != NULL)
76 return static_cast< const CAnnotation * >(pFunction);
86 mUnsupportedAnnotations()
92 mMiriamAnnotation(src.mMiriamAnnotation),
94 mUnsupportedAnnotations(src.mUnsupportedAnnotations)
109 const std::string & newId,
110 const std::string & oldId)
138 std::string::const_iterator it = Annotation.begin();
139 std::string::const_iterator end = Annotation.end();
143 while (it != end && itRhs != endRhs)
156 if (*it ==
'\x20' || *it ==
'\x09' || *it ==
'\x0d' || *it ==
'\x0a')
167 while (itRhs != endRhs)
169 if (*itRhs ==
'\x20' || *itRhs ==
'\x09' || *itRhs ==
'\x0d' || *itRhs ==
'\x0a')
179 if (it == end && itRhs == endRhs)
184 if (it == end || itRhs == endRhs)
277 std::istringstream XML;
279 XML.imbue(std::locale::classic());
289 #define BUFFER_SIZE 0xfffe
296 if (XML.eof()) done =
true;
298 if (XML.fail() && !done)
304 if (!Parser.
parse(pBuffer, -1, done))
bool remove(const std::string &key)
Header file of class CModelEntity and CModelValue.
bool operator==(const CAnnotation &rhs) const
static unsigned C_INT32 fixLocalFileAboutReference(std::string &rdfXml, const std::string &newId, const std::string &oldId)
std::string mMiriamAnnotation
void setNotes(const std::string ¬es)
UnsupportedAnnotation mUnsupportedAnnotations
void setMiriamAnnotation(const std::string &miriamAnnotation, const std::string &newId, const std::string &oldId)
const std::string & getMiriamAnnotation() const
static CAnnotation * castObject(CCopasiObject *pObject)
const std::string & getNotes() const
static bool isValidXML(const std::string &xml)
bool removeUnsupportedAnnotation(const std::string &name)
bool addUnsupportedAnnotation(const std::string &name, const std::string &xml)
static CKeyFactory * getKeyFactory()
std::map< std::string, std::string > UnsupportedAnnotation
static CCopasiMessage getLastMessage()
The class for handling a chemical kinetic function.
UnsupportedAnnotation & getUnsupportedAnnotations()
bool replaceUnsupportedAnnotation(const std::string &name, const std::string &xml)
bool parse(const char *pszBuffer, int nLength=-1, bool fIsFinal=true)
Header file of class CEvent.
virtual const std::string & getKey() const