COPASI API
4.16.103
|
#include <CRDFParser.h>
Public Member Functions | |
CRDFParser () | |
CRDFGraph * | parse (std::istream &stream) |
~CRDFParser () | |
Static Public Member Functions | |
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) |
Private Attributes | |
raptor_parser * | mpParser |
Additional Inherited Members | |
![]() | |
CRaptorInit () | |
~CRaptorInit () | |
![]() | |
static bool | isLocalURI (raptor_uri *pURI) |
Definition at line 29 of file CRDFParser.h.
CRDFParser::CRDFParser | ( | ) |
Default Constructor
Definition at line 40 of file CRDFParser.cpp.
References ErrorHandler(), FatalErrorHandler(), mpParser, and WarningHandler().
CRDFParser::~CRDFParser | ( | ) |
A static handler to interface with the C parser library. This is called whenever the parser encounters an error;
void | * userdata (ignored) |
raptor_locator | * pLocator |
const | char * message |
Definition at line 241 of file CRDFParser.cpp.
References CCopasiMessage::ERROR, and MCAnnotation.
Referenced by CRDFParser().
|
static |
A static handler to interface with the C parser library. This is called whenever the parser encounters a fatal error;
void | * userdata (ignored) |
raptor_locator | * pLocator |
const | char * message |
Definition at line 232 of file CRDFParser.cpp.
References CCopasiMessage::ERROR, and MCAnnotation.
Referenced by CRDFParser().
|
static |
A static handler to interface with the C parser library. This is called whenever a node id needs to be generated.
void | * pGraph |
raptor_genid_type | type |
unsigned | char * userNodeId |
Definition at line 217 of file CRDFParser.cpp.
Referenced by parse().
|
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.
const | std::string & xml |
Definition at line 30 of file CRDFParser.cpp.
References parse().
Referenced by CQRDFTreeView::enterProtected(), CMIRIAMInfo::load(), and CRDFGraphConverter::SBML2Copasi().
A static handler to interface with the C parser library. This is called whenever a namespace is declared.
void | * pGraph |
raptor_namespace | * pNameSpace |
Definition at line 199 of file CRDFParser.cpp.
Referenced by parse().
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
Definition at line 57 of file CRDFParser.cpp.
References BUFFER_SIZE, C_INT32, fatalError, GenerateIdHandler(), CRDFGraph::guessGraphRoot(), mpParser, NameSpaceHandler(), pdelete, pRaptorFreeUri, and TripleHandler().
Referenced by graphFromXml().
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);
void | * pGraph |
const | raptor_statement * pTriple |
Definition at line 121 of file CRDFParser.cpp.
References CRDFSubject::BLANK_NODE, CRDFObject::BLANK_NODE, fatalError, CRaptorInit::isLocalURI(), CRDFObject::LITERAL, CRDFLiteral::PLAIN, CRDFSubject::RESOURCE, CRDFObject::RESOURCE, CRDFSubject::setBlankNodeId(), CRDFObject::setBlankNodeId(), CRDFLiteral::setDataType(), CRDFLiteral::setLanguage(), CRDFLiteral::setLexicalData(), CRDFObject::setLiteral(), CRDFSubject::setResource(), CRDFObject::setResource(), CRDFLiteral::setType(), CRDFSubject::setType(), CRDFObject::setType(), and CRDFLiteral::TYPED.
Referenced by parse().
A static handler to interface with the C parser library. This is called whenever the parser encounters a warning;
void | * userdata (ignored) |
raptor_locator | * pLocator |
const | char * message |
Definition at line 250 of file CRDFParser.cpp.
References MCAnnotation, and CCopasiMessage::WARNING.
Referenced by CRDFParser().
|
private |
Pointer to the underlying C parser from the Raptor library
Definition at line 122 of file CRDFParser.h.
Referenced by CRDFParser(), parse(), and ~CRDFParser().