copasi API  0.1
Public Member Functions | Static Public Member Functions
CRDFParser Class Reference

#include <CRDFParser.h>

Inheritance diagram for CRDFParser:
CRaptorInit

List of all members.

Public Member Functions

 CRDFParser ()
 ~CRDFParser ()
CRDFGraphparse (std::istream &stream)

Static Public Member Functions

static CRDFGraphgraphFromXml (const std::string &xml)
static void TripleHandler (void *pGraph, const raptor_statement *pTriple)
static void NameSpaceHandler (void *pGraph, raptor_namespace *pNameSpace)
static unsigned char * GenerateIdHandler (void *pGraph, raptor_genid_type type, unsigned char *userNodeId)
static void FatalErrorHandler (void *, raptor_locator *pLocator, const char *message)
static void ErrorHandler (void *, raptor_locator *pLocator, const char *message)
static void WarningHandler (void *, raptor_locator *pLocator, const char *message)

Constructor & Destructor Documentation

CRDFParser::CRDFParser ( )

Default Constructor

CRDFParser::~CRDFParser ( )

Destructor


Member Function Documentation

void CRDFParser::ErrorHandler ( void *  ,
raptor_locator *  pLocator,
const char *  message 
) [static]

A static handler to interface with the C parser library. This is called whenever the parser encounters an error;

Parameters:
void* userdata (ignored)
raptor_locator* pLocator
constchar * message
void CRDFParser::FatalErrorHandler ( void *  ,
raptor_locator *  pLocator,
const char *  message 
) [static]

A static handler to interface with the C parser library. This is called whenever the parser encounters a fatal error;

Parameters:
void* userdata (ignored)
raptor_locator* pLocator
constchar * message
unsigned char * CRDFParser::GenerateIdHandler ( void *  pGraph,
raptor_genid_type  type,
unsigned char *  userNodeId 
) [static]

A static handler to interface with the C parser library. This is called whenever a node id needs to be generated.

Parameters:
void* pGraph
raptor_genid_typetype
unsignedchar * userNodeId
Returns:
unsigned char * generatedId
CRDFGraph * CRDFParser::graphFromXml ( const std::string &  xml) [static]

Convert an RDF/XML syntax string to an RDF Graph. If the conversion fails a NULL pointer is returned. Otherwise a pointer to the resulting graph is returned. It is the responsibility of the caller to destroy the created graph.

Parameters:
conststd::string & xml
Returns:
CRDFGraph * graphFromXml
void CRDFParser::NameSpaceHandler ( void *  pGraph,
raptor_namespace *  pNameSpace 
) [static]

A static handler to interface with the C parser library. This is called whenever a namespace is declared.

Parameters:
void* pGraph
raptor_namespace* pNameSpace
CRDFGraph * CRDFParser::parse ( std::istream &  stream)

Parse the stream. If the parsing fails a NULL pointer is returned. Otherwise a pointer to the resulting graph is returned. It is the responsibility of the caller to destroy the created graph. &param std::istream & stream

Returns:
CRDFGraph * pGraph
void CRDFParser::TripleHandler ( void *  pGraph,
const raptor_statement *  pTriple 
) [static]

A static handler to interface with the C parser library. This is called whenever an RDF triple is created. Its only purpose is to add the triple to the graph which must provide addTriplet(CRDFSubject, std::string, CRDFObject);

Parameters:
void* pGraph
constraptor_statement * pTriple
void CRDFParser::WarningHandler ( void *  ,
raptor_locator *  pLocator,
const char *  message 
) [static]

A static handler to interface with the C parser library. This is called whenever the parser encounters a warning;

Parameters:
void* userdata (ignored)
raptor_locator* pLocator
constchar * message

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines