#include <CRDFParser.h>
List of all members.
Public Member Functions |
| CRDFParser () |
| ~CRDFParser () |
CRDFGraph * | parse (std::istream &stream) |
Static Public Member Functions |
static CRDFGraph * | graphFromXml (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 |
( |
| ) |
|
CRDFParser::~CRDFParser |
( |
| ) |
|
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 |
const | char * 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 |
const | char * 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_type | type |
unsigned | char * 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:
-
- 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. ¶m 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 |
const | raptor_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 |
const | char * message |
The documentation for this class was generated from the following files: