COPASI API  4.16.103
CConstants.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 #ifndef COPASI_CConstants
12 #define COPASI_CConstants
13 
14 #include <string>
15 #include <map>
16 #include <vector>
17 #include "CMIRIAMResource.h"
18 
19 class CRDFNode;
20 
21 class CMIRIAMResources;
22 
24 {
25 
26 private:
28 
29  void extractId(const std::string & URI);
30 
31 public:
32 
33  size_t getResource(const std::string & URI);
34 
35  static const CMIRIAMResources & getResourceList();
36 
38 
39  CMIRIAMResourceObject(const std::string & displayName, const std::string & id);
40 
42 
43  bool setId(const std::string & id);
44 
45  const std::string & getId() const;
46 
47  bool setURI(const std::string & URI);
48 
49  std::string getURI() const;
50 
51  std::string getIdentifiersOrgURL() const;
52 
53  bool setNode(CRDFNode * pNode);
54 
55  CRDFNode * getNode() const;
56 
57  bool setDisplayName(const std::string & displayName);
58 
59  std::string getDisplayName() const;
60 
61  bool isValid() const;
62 
63  bool isValid(const std::string & URI) const;
64 
65  static void setMIRIAMResources(const CMIRIAMResources * pResources);
66 
67  /**
68  * Destructor
69  */
70  virtual ~CMIRIAMResourceObject();
71 
72 private:
73  static const CMIRIAMResources * mpResources;
74 
75  static void unescapeId(std::string & id);
76 
77  static std::string trimId(const std::string & id);
78 
79  size_t mResource;
80  std::string mId;
82 };
83 
84 #endif
size_t getResource(const std::string &URI)
Definition: CConstants.cpp:23
static const CMIRIAMResources * mpResources
Definition: CConstants.h:73
bool isValid() const
Definition: CConstants.cpp:182
static void setMIRIAMResources(const CMIRIAMResources *pResources)
Definition: CConstants.cpp:81
std::string getURI() const
Definition: CConstants.cpp:133
virtual ~CMIRIAMResourceObject()
Definition: CConstants.cpp:262
static void unescapeId(std::string &id)
Definition: CConstants.cpp:31
bool setURI(const std::string &URI)
Definition: CConstants.cpp:119
bool setId(const std::string &id)
Definition: CConstants.cpp:101
bool setDisplayName(const std::string &displayName)
Definition: CConstants.cpp:163
bool setNode(CRDFNode *pNode)
Definition: CConstants.cpp:150
CRDFNode * getNode() const
Definition: CConstants.cpp:160
static std::string trimId(const std::string &id)
Definition: CConstants.cpp:48
static const CMIRIAMResources & getResourceList()
Definition: CConstants.cpp:27
std::string getDisplayName() const
Definition: CConstants.cpp:173
std::string getIdentifiersOrgURL() const
Definition: CConstants.cpp:138
const std::string & getId() const
Definition: CConstants.cpp:116
void extractId(const std::string &URI)
Definition: CConstants.cpp:205