COPASI API  4.16.103
CRDFWriter.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/MIRIAM/CRDFWriter.h,v $
3 // $Revision: 1.3 $
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 #ifndef COPASI_CRDFWriter
15 #define COPASI_CRDFWriter
16 
17 #include <raptor.h>
18 
19 #include <iostream>
20 
22 
23 class CRDFGraph;
24 class CRDFNode;
25 
26 class CRDFWriter: private CRaptorInit
27  {
28  // Operations
29  public:
30  /**
31  * Constructor
32  */
33  CRDFWriter();
34 
35  /**
36  * Destructor
37  */
38  ~CRDFWriter();
39 
40  /**
41  * Convert an RDF graph to an XML string
42  * @param const CRDFGraph * pGraph
43  * @return std::string
44  */
45  static std::string xmlFromGraph(const CRDFGraph * pGraph);
46 
47  /**
48  * Convert an RDF graph to an XML string. It is the repsonsibility of
49  * user to free the allocate memory for the string. If the conversion fails
50  * a NULL pointer is returned.
51  * @param const CRDFGraph * pGraph
52  * @return char * XML
53  */
54  char * write(const CRDFGraph * pGraph);
55 
56  private:
57  /**
58  * This adds the default name spaces to the writer
59  * @param const CRDFGraph * pGraph
60  */
61  void initNamespaces(const CRDFGraph * pGraph);
62 
63  // Attributes
64  private:
65  /**
66  * Pointer to the underlying C serializer from the Raptor library
67  */
68  raptor_serializer * mpWriter;
69 
70  /**
71  * A pointer to the created RDF graph
72  */
74  };
75 #endif // COPASI_CRDFWriter
CRDFGraph * mpGraph
Definition: CRDFWriter.h:73
char * write(const CRDFGraph *pGraph)
Definition: CRDFWriter.cpp:83
raptor_serializer * mpWriter
Definition: CRDFWriter.h:68
void initNamespaces(const CRDFGraph *pGraph)
Definition: CRDFWriter.cpp:66
static std::string xmlFromGraph(const CRDFGraph *pGraph)
Definition: CRDFWriter.cpp:26