Top | ![]() |
![]() |
![]() |
![]() |
raptor_parser * | raptor_new_parser () |
raptor_parser * | raptor_new_parser_for_content () |
void | raptor_free_parser () |
void | (*raptor_graph_mark_handler) () |
void | (*raptor_namespace_handler) () |
void | raptor_parser_set_statement_handler () |
void | raptor_parser_set_graph_mark_handler () |
void | raptor_parser_set_namespace_handler () |
const raptor_syntax_description * | raptor_parser_get_description () |
raptor_locator * | raptor_parser_get_locator () |
void | raptor_parser_parse_abort () |
int | raptor_parser_parse_chunk () |
int | raptor_parser_parse_file () |
int | raptor_parser_parse_file_stream () |
int | raptor_parser_parse_iostream () |
int | raptor_parser_parse_start () |
int | raptor_parser_parse_uri () |
int | raptor_parser_parse_uri_with_connection () |
raptor_uri * | raptor_parser_get_graph () |
const char * | raptor_parser_get_name () |
int | raptor_parser_set_option () |
int | raptor_parser_get_option () |
const char * | raptor_parser_get_accept_header () |
void | raptor_parser_set_uri_filter () |
raptor_world * | raptor_parser_get_world () |
The parsing class that allows creating a parser for reading from a particular syntax (or can guess and use contextual information) that will on demand generate RDF triples to a handler function, as chunks of syntax data are passed into the parser. Parsing can be done from strings in memory, files or from URIs on the web.
There are also methods to deal with handling errors, warnings and returned triples as well as setting options (features) that can adjust how parsing is performed.
raptor_parser * raptor_new_parser_for_content (raptor_world *world
,raptor_uri *uri
,const char *mime_type
,const unsigned char *buffer
,size_t len
,const unsigned char *identifier
);
void (*raptor_graph_mark_handler) (void *user_data
,raptor_uri *graph
,int flags
);
Graph start/end mark handler function.
Records start and end of graphs happening in a stream of generated
raptor_statement via the statement handler. The callback starts a
graph when flags
has RAPTOR_GRAPH_MARK_START bit set.
The start and ends may be either declared in the syntax via some
keyword or mechanism such as TRiG {} syntax when flags
has bit
RAPTOR_GRAPH_MARK_DECLARED set, or be implied by the start/end of
the data in other syntaxes, and the bit will be unset.
user_data |
user data |
|
graph |
graph to report, NULL for the default graph |
|
flags |
bitmask of raptor_graph_mark_flags flags |
void (*raptor_namespace_handler) (void *user_data
,raptor_namespace *nspace
);
XML Namespace declaration reporting handler set by
raptor_parser_set_namespace_handler()
.
void raptor_parser_set_statement_handler (raptor_parser *parser
,void *user_data
,raptor_statement_handler handler
);
void raptor_parser_set_graph_mark_handler (raptor_parser *parser
,void *user_data
,raptor_graph_mark_handler handler
);
void raptor_parser_set_namespace_handler (raptor_parser *parser
,void *user_data
,raptor_namespace_handler handler
);
const raptor_syntax_description *
raptor_parser_get_description (raptor_parser *rdf_parser
);
raptor_locator *
raptor_parser_get_locator (raptor_parser *rdf_parser
);
int raptor_parser_parse_chunk (raptor_parser *rdf_parser
,const unsigned char *buffer
,size_t len
,int is_end
);
int raptor_parser_parse_file (raptor_parser *rdf_parser
,raptor_uri *uri
,raptor_uri *base_uri
);
int raptor_parser_parse_file_stream (raptor_parser *rdf_parser
,FILE *stream
,const char *filename
,raptor_uri *base_uri
);
int raptor_parser_parse_iostream (raptor_parser *rdf_parser
,raptor_iostream *iostr
,raptor_uri *base_uri
);
int raptor_parser_parse_start (raptor_parser *rdf_parser
,raptor_uri *uri
);
int raptor_parser_parse_uri (raptor_parser *rdf_parser
,raptor_uri *uri
,raptor_uri *base_uri
);
int raptor_parser_parse_uri_with_connection (raptor_parser *rdf_parser
,raptor_uri *uri
,raptor_uri *base_uri
,void *connection
);
int raptor_parser_set_option (raptor_parser *parser
,raptor_option option
,const char *string
,int integer
);
int raptor_parser_get_option (raptor_parser *parser
,raptor_option option
,char **string_p
,int *integer_p
);
const char *
raptor_parser_get_accept_header (raptor_parser *rdf_parser
);
void raptor_parser_set_uri_filter (raptor_parser *parser
,raptor_uri_filter_func filter
,void *user_data
);