COPASI API  4.16.103
CReference.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_CReference
12 #define COPASI_CReference
13 
14 #include <string>
15 
18 
20 
21 /**
22  * CReferences: Stores publication details such as PubMed Id and DOI.
23  */
25 {
26  // Attributes
27 private:
28  /**
29  * Triplet in the RDF graph representing the reference.
30  */
32 
33  /**
34  * The predicate path to the node.
35  */
37 
38  /**
39  * The key of the object needed for the COPASI tables.
40  */
41  std::string mKey;
42 
43  /**
44  * Triplet in the RDF graph representing the reference.
45  */
47 
48  /**
49  * MIRIAM resource for holding database and Id.
50  */
52 
53 public:
54  // Operations
55  /**
56  * Default constructor
57  * @param const std::string & objectName
58  * @param const CCopasiContainer * pParent (default: NULL)
59  */
60  CReference(const std::string & objectName,
61  const CCopasiContainer * pParent = NULL);
62 
63  /**
64  * Specific constructor
65  * @param const CRDFTriplet & triplet
66  * @param const std::string & objectName (default: "")
67  * @param const CCopasiContainer * pParent (default: NULL)
68  */
69  CReference(const CRDFTriplet & triplet,
70  const std::string & objectName = "",
71  const CCopasiContainer * pParent = NULL);
72 
73  /**
74  * Copy constructor
75  * @param "const CReference &" src
76  * @param const CCopasiContainer * pParent (default: NULL)
77  */
78  CReference(const CReference & src,
79  const CCopasiContainer * pParent = NULL);
80 
81  /**
82  * Destructor
83  */
84  ~CReference();
85 
86  /**
87  * Retrieve the RDF triplet holding the information for this reference.
88  * @return const CRDFTriplet & triplet
89  */
90  const CRDFTriplet & getTriplet() const;
91 
92  /**
93  * Retrieve the MIRIAM resource object for this reference
94  */
96 
97  /**
98  * Retrieve the key for the object
99  * @return const std::string & key
100  */
101  virtual const std::string & getKey() const;
102 
103  /**
104  * Retrieve the MIRIAM resource for the reference.
105  * @return std::string resource
106  */
107  std::string getResource() const;
108 
109  /**
110  * Retrieve the id of the reference in the MIRIAM resource.
111  * @return const std::string & id
112  */
113  const std::string & getId() const;
114 
115  /**
116  * Retrieve the description for the reference.
117  * @return std::string description
118  */
119  const std::string & getDescription() const;
120 
121  /**
122  * Retrieve the URI (comprised of resource an id) specifying this reference.
123  * @return std::string uri
124  */
125  std::string getURI() const;
126 
127  /**
128  * Set the MIRIAM resource for the reference
129  * @param const std::string & resource
130  */
131  void setResource(const std::string & resource);
132 
133  /**
134  * Set the id of the reference in the MIRIAM resource.
135  * @param const std::string & id
136  */
137  void setId(const std::string & id);
138 
139  /**
140  * Set the description for the reference.
141  * @param std::string description
142  */
143  void setDescription(const std::string & description);
144 
145  /**
146  * Remove invalid combinations of resource and id
147  */
148  void clearInvalidEntries();
149 };
150 
151 #endif //COPASI_CReference
std::string getResource() const
Definition: CReference.cpp:98
void setId(const std::string &id)
Definition: CReference.cpp:130
const CMIRIAMResourceObject & getMIRIAMResourceObject() const
Definition: CReference.cpp:90
const std::string & getId() const
Definition: CReference.cpp:127
CRDFTriplet mIdTriplet
Definition: CReference.h:46
CMIRIAMResourceObject mResource
Definition: CReference.h:51
void setResource(const std::string &resource)
Definition: CReference.cpp:101
std::string getURI() const
Definition: CReference.cpp:154
void clearInvalidEntries()
Definition: CReference.cpp:165
Header file of class CCopasiContainer.
CRDFPredicate::Path mNodePath
Definition: CReference.h:36
const std::string & getDescription() const
Definition: CReference.cpp:157
std::string mKey
Definition: CReference.h:41
void setDescription(const std::string &description)
Definition: CReference.cpp:160
virtual const std::string & getKey() const
Definition: CReference.cpp:95
const CRDFTriplet & getTriplet() const
Definition: CReference.cpp:88
CRDFTriplet mTriplet
Definition: CReference.h:31
std::vector< ePredicateType > Path
Definition: CRDFPredicate.h:91
CReference(const std::string &objectName, const CCopasiContainer *pParent=NULL)
Definition: CReference.cpp:22