COPASI API  4.16.103
CRDFObject.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/MIRIAM/CRDFObject.h,v $
3 // $Revision: 1.9 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2008/06/10 20:31:11 $
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 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc. and EML Research, gGmbH.
16 // All rights reserved.
17 
18 #ifndef COPASI_CRDFObject
19 #define COPASI_CRDFObject
20 
21 #include <string>
22 
23 class CRDFLiteral;
24 
26  {
27  // Enumerations
28  public:
29  /**
30  * The three different types possible for objects
31  */
33 
34  // Operations
35  public:
36  /**
37  * Default Constructor
38  */
39  CRDFObject();
40 
41  /**
42  * Copy Constructor
43  * @param const CRDFObject & src
44  */
45  CRDFObject(const CRDFObject & src);
46 
47  CRDFObject& operator =(const CRDFObject& rhs);
48 
49  private:
50  bool operator ==(const CRDFObject& rhs) const;
51 
52  public:
53  /**
54  * Destructor
55  */
56  virtual ~CRDFObject();
57 
58  /**
59  * Set the type of the object
60  * @param const eObjectType & type
61  */
62  void setType(const eObjectType & type);
63 
64  /**
65  * Retrieve the type of the object
66  * @return const eObjectType & type
67  */
68  const eObjectType & getType() const;
69 
70  /**
71  * Set the resource of the object
72  * @param const std::string & resource
73  * @param const bool & isLocal
74  */
75  void setResource(const std::string & resource, const bool & isLocal);
76 
77  /**
78  * Retrieve the resource of the object
79  * @return const std::string & resource
80  */
81  const std::string & getResource() const;
82 
83  /**
84  * Check whehter the resource is local
85  * @return const bool & isLocal
86  */
87  const bool & isLocal() const;
88 
89  /**
90  * Set the ID of the blank node of the object
91  * @param const std::string & blankNodeId
92  */
93  void setBlankNodeId(const std::string & blankNodeId);
94 
95  /**
96  * Retrieve the ID of the blank node of the object
97  * @return const std::string & blankNodeId
98  */
99  const std::string & getBlankNodeID() const;
100 
101  /**
102  * Set the literal of the object
103  * @param const std::string & lexicalData
104  */
105  void setLiteral(const CRDFLiteral & literal);
106 
107  /**
108  * Retrieve the literal of the object
109  * @return CRDFLiteral & literal
110  */
112 
113  /**
114  * Retrieve the literal of the object
115  * @return const CRDFLiteral & literal
116  */
117  const CRDFLiteral & getLiteral() const;
118 
119  /**
120  * Reset all Data
121  */
122  void clearData();
123 
124  // Attributes
125  private:
126  /**
127  * The type of the object
128  */
130 
131  /**
132  * The URI of the resource of type RESOURCE
133  */
134  std::string mResource;
135 
136  /**
137  * The Id of the blank node for type BLANK_NODE
138  */
139  std::string mBlankNodeId;
140 
141  /**
142  * Stores whether the reources is resolve locally or remotely.
143  */
145 
146  /**
147  * The pointer to the literal for type LITERAL
148  */
150  };
151 
152 std::ostream & operator << (std::ostream & os, const CRDFObject & object);
153 
154 #endif // COPASI_CRDFObject
CRDFLiteral * mpLiteral
Definition: CRDFObject.h:149
const eObjectType & getType() const
Definition: CRDFObject.cpp:85
const bool & isLocal() const
Definition: CRDFObject.cpp:97
const std::string & getBlankNodeID() const
Definition: CRDFObject.cpp:103
bool operator==(const CRDFObject &rhs) const
Definition: CRDFObject.cpp:55
void clearData()
Definition: CRDFObject.cpp:128
void setLiteral(const CRDFLiteral &literal)
Definition: CRDFObject.cpp:106
std::ostream & operator<<(std::ostream &os, const CRDFObject &object)
Definition: CRDFObject.cpp:137
bool mIsLocalResource
Definition: CRDFObject.h:144
CRDFObject & operator=(const CRDFObject &rhs)
Definition: CRDFObject.cpp:39
virtual ~CRDFObject()
Definition: CRDFObject.cpp:52
eObjectType mType
Definition: CRDFObject.h:129
void setType(const eObjectType &type)
Definition: CRDFObject.cpp:82
std::string mBlankNodeId
Definition: CRDFObject.h:139
void setResource(const std::string &resource, const bool &isLocal)
Definition: CRDFObject.cpp:88
void setBlankNodeId(const std::string &blankNodeId)
Definition: CRDFObject.cpp:100
std::string mResource
Definition: CRDFObject.h:134
const std::string & getResource() const
Definition: CRDFObject.cpp:94
CRDFLiteral & getLiteral()
Definition: CRDFObject.cpp:112