#include <CRDFParser.h>
|
static void | ErrorHandler (void *, raptor_locator *pLocator, const char *message) |
|
static void | FatalErrorHandler (void *, raptor_locator *pLocator, const char *message) |
|
static unsigned char * | GenerateIdHandler (void *pGraph, raptor_genid_type type, unsigned char *userNodeId) |
|
static CRDFGraph * | graphFromXml (const std::string &xml) |
|
static void | NameSpaceHandler (void *pGraph, raptor_namespace *pNameSpace) |
|
static void | TripleHandler (void *pGraph, const raptor_statement *pTriple) |
|
static void | WarningHandler (void *, raptor_locator *pLocator, const char *message) |
|
◆ CRDFParser()
CRDFParser::CRDFParser |
( |
| ) |
|
◆ ~CRDFParser()
CRDFParser::~CRDFParser |
( |
| ) |
|
◆ ErrorHandler()
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 |
References CCopasiMessage::ERROR, and MCAnnotation.
Referenced by CRDFParser().
◆ FatalErrorHandler()
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 |
References CCopasiMessage::ERROR, and MCAnnotation.
Referenced by CRDFParser().
◆ GenerateIdHandler()
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
Referenced by parse().
◆ graphFromXml()
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
References parse().
Referenced by CMIRIAMInfo::load(), and CRDFGraphConverter::SBML2Copasi().
◆ NameSpaceHandler()
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 |
Referenced by parse().
◆ parse()
CRDFGraph * CRDFParser::parse |
( |
std::istream & |
stream | ) |
|
◆ TripleHandler()
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 |
References CRDFObject::BLANK_NODE, CRDFSubject::BLANK_NODE, fatalError, CRaptorInit::isLocalURI(), CRDFObject::LITERAL, CRDFLiteral::PLAIN, CRDFObject::RESOURCE, CRDFSubject::RESOURCE, CRDFObject::setBlankNodeId(), CRDFSubject::setBlankNodeId(), CRDFLiteral::setDataType(), CRDFLiteral::setLanguage(), CRDFLiteral::setLexicalData(), CRDFObject::setLiteral(), CRDFObject::setResource(), CRDFSubject::setResource(), CRDFLiteral::setType(), CRDFObject::setType(), CRDFSubject::setType(), and CRDFLiteral::TYPED.
Referenced by parse().
◆ WarningHandler()
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 |
References MCAnnotation, and CCopasiMessage::WARNING.
Referenced by CRDFParser().
◆ mpParser
raptor_parser* CRDFParser::mpParser |
|
private |
The documentation for this class was generated from the following files: