COPASI API  4.16.103
SEDMLUtils.h
Go to the documentation of this file.
1 // Copyright (C) 2013 - 2014 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 /*
7  * SEDMLUtils.h
8  *
9  * Created on: 15 Jul 2013
10  * Author: dada
11  */
12 
13 #ifndef SEDMLUTILS_H_
14 #define SEDMLUTILS_H_
15 
16 #include <string>
17 
20 
21 #define SEDML_TIME_URN "urn:sedml:symbol:time"
22 #define SEDML_KISAO_STOCHASTIC "KISAO:0000241"
23 
24 class CModel;
25 class SedDataGenerator;
26 
28 {
29 public:
30  int processArchive(const std::string & archiveFile, std::string &fileName, std::string &fileContent);
31 
32  // void resmoveUnwantedChars(std::string & str, char chars[]);
33 
34  SEDMLUtils();
35 
36  static const CCopasiObject* resolveXPath(const CModel *model,
37  const std::string& xpath, bool initial = false);
38 
39  static const CCopasiObject* resolveDatagenerator(const CModel *model, const SedDataGenerator* dataReference);
40 
41  static const CCopasiObject *getObjectForSbmlId(const CModel* pModel, const std::string& id, const std::string& SBMLType, bool initial = false);
42 
43  static std::string translateTargetXpathInSBMLId(const std::string &xpath, std::string& SBMLType);
44 
45  static std::string getNextId(const std::string& base, int count);
46 
47  static std::string getXPathAndName(std::string& sbmlId, const std::string &type,
48  const CModel *pModel, const CCopasiDataModel& dataModel);
49 
50  static std::string getXPathForObject(const CCopasiObject& object);
51 
52  static std::string& removeCharactersFromString(std::string& str, const std::string& characters);
53 
54  static std::string findIdByNameAndType(const std::map<CCopasiObject*, SBase*>& map,
55  int typeCode,
56  const std::string& name);
57 
58  /**
59  * This is a hack at the moment better solution for processing XPath string may be developed in the future
60  */
61  static void splitStrings(const std::string &xpath, char delim, std::vector<std::string> &stringsContainer);
62 
63  virtual ~SEDMLUtils();
64 };
65 
66 #endif /* SEDMLUTILS_H_ */
static std::string translateTargetXpathInSBMLId(const std::string &xpath, std::string &SBMLType)
Definition: SEDMLUtils.cpp:219
static const CCopasiObject * resolveDatagenerator(const CModel *model, const SedDataGenerator *dataReference)
Definition: SEDMLUtils.cpp:203
static std::string getXPathAndName(std::string &sbmlId, const std::string &type, const CModel *pModel, const CCopasiDataModel &dataModel)
Definition: SEDMLUtils.cpp:65
static const CCopasiObject * getObjectForSbmlId(const CModel *pModel, const std::string &id, const std::string &SBMLType, bool initial=false)
Definition: SEDMLUtils.cpp:375
virtual ~SEDMLUtils()
Definition: SEDMLUtils.cpp:460
static std::string findIdByNameAndType(const std::map< CCopasiObject *, SBase * > &map, int typeCode, const std::string &name)
Definition: SEDMLUtils.cpp:26
static void splitStrings(const std::string &xpath, char delim, std::vector< std::string > &stringsContainer)
Definition: SEDMLUtils.cpp:344
static std::string getXPathForObject(const CCopasiObject &object)
Definition: SEDMLUtils.cpp:284
static const CCopasiObject * resolveXPath(const CModel *model, const std::string &xpath, bool initial=false)
Definition: SEDMLUtils.cpp:242
static std::string getNextId(const std::string &base, int count)
Definition: SEDMLUtils.cpp:294
Definition: CModel.h:50
int processArchive(const std::string &archiveFile, std::string &fileName, std::string &fileContent)
Definition: SEDMLUtils.cpp:300
static std::string & removeCharactersFromString(std::string &str, const std::string &characters)
Definition: SEDMLUtils.cpp:273