COPASI API  4.16.103
CRDFUtilities.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/MIRIAM/CRDFUtilities.h,v $
3 // $Revision: 1.2 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2009/01/07 18:58:54 $
7 // End CVS Header
8 
9 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
11 // and The University of Manchester.
12 // All rights reserved.
13 
14 #ifndef COPASI_CRDFUtilities
15 #define COPASI_CRDFUtilities
16 
17 #include <string>
18 
20  {
21  public:
22  /**
23  * Constructor
24  */
25  CRDFUtilities();
26 
27  /**
28  * Destructor
29  */
30  virtual ~CRDFUtilities();
31 
32  /**
33  * Fix local rdf:about attributes of the rdf:Description element. It returned the
34  * number of replacements made.
35  * @param std::string & rdfXml
36  * @param const std::string & newId
37  * @param const std::string & oldId
38  * @return unsigned C_INT32 replacements
39  */
40  static unsigned C_INT32 fixLocalFileAboutReference(std::string & rdfXml,
41  const std::string & newId,
42  const std::string & oldId);
43 
44  /**
45  * Fix broken SBML RDF:
46  * <dc:creator rdf:parseType="Resource">
47  * <rdf:Bag>
48  * It is not allowed to use the attribute rdf:parseType="Resource" and <rdf:Bag> simultaneously
49  * @param std::string & rdfXml
50  * @return unsigned C_INT32 corrections
51  */
52  static unsigned C_INT32 fixSBMLRdf(std::string & rdfXml);
53 
54  /**
55  * Find the qualifier for the given name space. Please note the qualifier if found has a ':'
56  * already appended.
57  * @param const std::string & rdfXml
58  * @param const std::string & nameSpace
59  * @return std::string qualifier
60  */
61  static std::string getNameSpaceQualifier(const std::string & rdfXml,
62  const std::string & nameSpace);
63 
64  /**
65  * Find the the next XML element with the given name (either start or end).
66  * @param const std::string & rdfXml
67  * @param const std::string & elementName
68  * @param std::string::size_type & start
69  * @param std::string::size_type & end
70  * @return bool found
71  */
72  static bool findNextElement(const std::string & rdfXml,
73  const std::string & elementName,
74  std::string::size_type & start,
75  std::string::size_type & end);
76  };
77 
78 #endif // COPASI_CRDFUtilities
static unsigned C_INT32 fixSBMLRdf(std::string &rdfXml)
static unsigned C_INT32 fixLocalFileAboutReference(std::string &rdfXml, const std::string &newId, const std::string &oldId)
#define C_INT32
Definition: copasi.h:90
static bool findNextElement(const std::string &rdfXml, const std::string &elementName, std::string::size_type &start, std::string::size_type &end)
virtual ~CRDFUtilities()
static std::string getNameSpaceQualifier(const std::string &rdfXml, const std::string &nameSpace)