Volksdata 1.0b7
RDF library
Loading...
Searching...
No Matches
parser_nt.h File Reference
#include "volksdata/codec.h"
Include dependency graph for parser_nt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

VOLK_rc VOLK_nt_parse_term (const char *rep, VOLK_Term **term)
 Parse a single term.
VOLK_rc VOLK_nt_parse_doc (FILE *fh, const char *sh, VOLK_Graph **gr, size_t *ct, char **err)
 Parse an RDF document in N-Triples format.

Function Documentation

◆ VOLK_nt_parse_term()

VOLK_rc VOLK_nt_parse_term ( const char * rep,
VOLK_Term ** term )

Parse a single term.

Parameters
[in]repN-Triples representation as a character string.
[out]termTerm to be created from the string.
Returns
VOLK_OK on success, VOLK_VALUE_ERR if the string is not valid N-Triples syntax for a IRI ref, Literal or BNode.

Definition at line 1749 of file parser_nt.c.

◆ VOLK_nt_parse_doc()

VOLK_rc VOLK_nt_parse_doc ( FILE * fh,
const char * sh,
VOLK_Graph ** gr,
size_t * ct,
char ** err )

Parse an RDF document in N-Triples format.

Either an open file handle or an in-memory string can be passed for parsing.

Parameters
[in]fhN-Triples doc file handle. Exclusive with sh.
[in]shN-Triples doc string handle. Exclusive with fh.
[out]grPointer to a graph handle to be created. The new graph will have a random UUID URN.
[out]ctIf not NULL it is populated with the number of triples parsed. This may be more than the triples in the resulting graph.
[out]errString handle to be populated with an error message.
Returns
VOLK_OK on success, VOLK_VALUE_ERR if a parsing error was encountered. On error, err will contain the error message.

Definition at line 1769 of file parser_nt.c.