raptor.h | raptor.h | |||
---|---|---|---|---|
/* -*- Mode: c; c-basic-offset: 2 -*- | /* -*- Mode: c; c-basic-offset: 2 -*- | |||
* | * | |||
* raptor.h - Redland Parser Toolkit for RDF (Raptor) interfaces and defini tion | * raptor.h - Redland Parser Toolkit for RDF (Raptor) interfaces and defini tion | |||
* | * | |||
* Copyright (C) 2000-2006, David Beckett http://purl.org/net/dajobe/ | * Copyright (C) 2000-2007, David Beckett http://purl.org/net/dajobe/ | |||
* Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac .uk/ | * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac .uk/ | |||
* | * | |||
* This package is Free Software and part of Redland http://librdf.org/ | * This package is Free Software and part of Redland http://librdf.org/ | |||
* | * | |||
* It is licensed under the following three licenses as alternatives: | * It is licensed under the following three licenses as alternatives: | |||
* 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version | * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version | |||
* 2. GNU General Public License (GPL) V2 or any newer version | * 2. GNU General Public License (GPL) V2 or any newer version | |||
* 3. Apache License, V2.0 or any newer version | * 3. Apache License, V2.0 or any newer version | |||
* | * | |||
* You may not use this file except in compliance with at least one of | * You may not use this file except in compliance with at least one of | |||
skipping to change at line 100 | skipping to change at line 100 | |||
RAPTOR_API | RAPTOR_API | |||
extern const char * const raptor_version_string; | extern const char * const raptor_version_string; | |||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned int raptor_version_major; | extern const unsigned int raptor_version_major; | |||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned int raptor_version_minor; | extern const unsigned int raptor_version_minor; | |||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned int raptor_version_release; | extern const unsigned int raptor_version_release; | |||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned int raptor_version_decimal; | extern const unsigned int raptor_version_decimal; | |||
RAPTOR_API | ||||
extern const char * const raptor_license_string; | ||||
RAPTOR_API | ||||
extern const char * const raptor_home_url_string; | ||||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned char * const raptor_xml_namespace_uri; | extern const unsigned char * const raptor_xml_namespace_uri; | |||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned char * const raptor_rdf_namespace_uri; | extern const unsigned char * const raptor_rdf_namespace_uri; | |||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned char * const raptor_rdf_schema_namespace_uri; | extern const unsigned char * const raptor_rdf_schema_namespace_uri; | |||
RAPTOR_API | RAPTOR_API | |||
extern const unsigned char * const raptor_xmlschema_datatypes_namespace_uri ; | extern const unsigned char * const raptor_xmlschema_datatypes_namespace_uri ; | |||
RAPTOR_API | RAPTOR_API | |||
skipping to change at line 320 | skipping to change at line 324 | |||
* @RAPTOR_FEATURE_START_URI: Set the start URI for serlalizing to use. | * @RAPTOR_FEATURE_START_URI: Set the start URI for serlalizing to use. | |||
* @RAPTOR_FEATURE_WRITER_AUTO_INDENT: Automatically indent elements when | * @RAPTOR_FEATURE_WRITER_AUTO_INDENT: Automatically indent elements when | |||
* seriailizing. | * seriailizing. | |||
* @RAPTOR_FEATURE_WRITER_AUTO_EMPTY: Automatically detect and | * @RAPTOR_FEATURE_WRITER_AUTO_EMPTY: Automatically detect and | |||
* abbreviate empty elements when serializing. | * abbreviate empty elements when serializing. | |||
* @RAPTOR_FEATURE_WRITER_INDENT_WIDTH: Integer number of spaces to use | * @RAPTOR_FEATURE_WRITER_INDENT_WIDTH: Integer number of spaces to use | |||
* for each indent level when serializing with auto indent. | * for each indent level when serializing with auto indent. | |||
* @RAPTOR_FEATURE_WRITER_XML_VERSION: Integer XML version XML 1.0 (10) or XML 1.1 (11) | * @RAPTOR_FEATURE_WRITER_XML_VERSION: Integer XML version XML 1.0 (10) or XML 1.1 (11) | |||
* @RAPTOR_FEATURE_WRITER_XML_DECLARATION: Write XML 1.0 or 1.1 declaration . | * @RAPTOR_FEATURE_WRITER_XML_DECLARATION: Write XML 1.0 or 1.1 declaration . | |||
* @RAPTOR_FEATURE_NO_NET: Deny network requests | * @RAPTOR_FEATURE_NO_NET: Deny network requests | |||
* @RAPTOR_FEATURE_RESOURCE_BORDER: Border color of resource | ||||
* nodes for GraphViz DOT serializer. | ||||
* @RAPTOR_FEATURE_LITERAL_BORDER: Border color of literal nodes | ||||
* for GraphViz DOT serializer. | ||||
* @RAPTOR_FEATURE_BNODE_BORDER: Border color of blank nodes for | ||||
* GraphViz DOT serializer. | ||||
* @RAPTOR_FEATURE_RESOURCE_FILL: Fill color of resource nodes | ||||
* for GraphViz DOT serializer. | ||||
* @RAPTOR_FEATURE_LITERAL_FILL: Fill color of literal nodes for | ||||
* GraphViz DOT serializer. | ||||
* @RAPTOR_FEATURE_BNODE_FILL: Fill color of blank nodes for | ||||
* GraphViz DOT serializer. | ||||
* @RAPTOR_FEATURE_LAST: Internal | * @RAPTOR_FEATURE_LAST: Internal | |||
* | * | |||
* Raptor parser, serializer or XML writer features. | * Raptor parser, serializer or XML writer features. | |||
*/ | */ | |||
typedef enum { | typedef enum { | |||
RAPTOR_FEATURE_SCANNING, | RAPTOR_FEATURE_SCANNING, | |||
RAPTOR_FEATURE_ASSUME_IS_RDF, | RAPTOR_FEATURE_ASSUME_IS_RDF, | |||
RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES, | RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES, | |||
RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES, | RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES, | |||
RAPTOR_FEATURE_ALLOW_BAGID, | RAPTOR_FEATURE_ALLOW_BAGID, | |||
skipping to change at line 343 | skipping to change at line 359 | |||
RAPTOR_FEATURE_WARN_OTHER_PARSETYPES, | RAPTOR_FEATURE_WARN_OTHER_PARSETYPES, | |||
RAPTOR_FEATURE_CHECK_RDF_ID, | RAPTOR_FEATURE_CHECK_RDF_ID, | |||
RAPTOR_FEATURE_RELATIVE_URIS, | RAPTOR_FEATURE_RELATIVE_URIS, | |||
RAPTOR_FEATURE_START_URI, | RAPTOR_FEATURE_START_URI, | |||
RAPTOR_FEATURE_WRITER_AUTO_INDENT, | RAPTOR_FEATURE_WRITER_AUTO_INDENT, | |||
RAPTOR_FEATURE_WRITER_AUTO_EMPTY, | RAPTOR_FEATURE_WRITER_AUTO_EMPTY, | |||
RAPTOR_FEATURE_WRITER_INDENT_WIDTH, | RAPTOR_FEATURE_WRITER_INDENT_WIDTH, | |||
RAPTOR_FEATURE_WRITER_XML_VERSION, | RAPTOR_FEATURE_WRITER_XML_VERSION, | |||
RAPTOR_FEATURE_WRITER_XML_DECLARATION, | RAPTOR_FEATURE_WRITER_XML_DECLARATION, | |||
RAPTOR_FEATURE_NO_NET, | RAPTOR_FEATURE_NO_NET, | |||
RAPTOR_FEATURE_LAST=RAPTOR_FEATURE_NO_NET | RAPTOR_FEATURE_RESOURCE_BORDER, | |||
RAPTOR_FEATURE_LITERAL_BORDER, | ||||
RAPTOR_FEATURE_BNODE_BORDER, | ||||
RAPTOR_FEATURE_RESOURCE_FILL, | ||||
RAPTOR_FEATURE_LITERAL_FILL, | ||||
RAPTOR_FEATURE_BNODE_FILL, | ||||
RAPTOR_FEATURE_LAST=RAPTOR_FEATURE_BNODE_FILL | ||||
} raptor_feature; | } raptor_feature; | |||
/** | /** | |||
* raptor_genid_type: | * raptor_genid_type: | |||
* @RAPTOR_GENID_TYPE_BNODEID: Generated ID is for a blank node | * @RAPTOR_GENID_TYPE_BNODEID: Generated ID is for a blank node | |||
* @RAPTOR_GENID_TYPE_BAGID: Generated ID is for rdf:bagID | * @RAPTOR_GENID_TYPE_BAGID: Generated ID is for rdf:bagID | |||
* | * | |||
* Intended type for a generated identifier asked for by the handler | * Intended type for a generated identifier asked for by the handler | |||
* registered with raptor_set_generate_id_handler(). | * registered with raptor_set_generate_id_handler(). | |||
*/ | */ | |||
skipping to change at line 771 | skipping to change at line 793 | |||
int raptor_get_feature(raptor_parser *parser, raptor_feature feature); | int raptor_get_feature(raptor_parser *parser, raptor_feature feature); | |||
RAPTOR_API | RAPTOR_API | |||
const unsigned char* raptor_parser_get_feature_string(raptor_parser *parser , raptor_feature feature); | const unsigned char* raptor_parser_get_feature_string(raptor_parser *parser , raptor_feature feature); | |||
RAPTOR_API | RAPTOR_API | |||
unsigned int raptor_get_feature_count(void); | unsigned int raptor_get_feature_count(void); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_strict); | void raptor_set_parser_strict(raptor_parser* rdf_parser, int is_strict); | |||
RAPTOR_API | RAPTOR_API | |||
const char* raptor_parser_get_accept_header(raptor_parser* rdf_parser); | const char* raptor_parser_get_accept_header(raptor_parser* rdf_parser); | |||
unsigned char* raptor_parser_generate_id(raptor_parser *rdf_parser, raptor_ | ||||
genid_type type); | ||||
/* Get serializer names */ | /* Get serializer names */ | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serializers_enumerate(const unsigned int counter, const char **n ame, const char **label, const char **mime_type, const unsigned char **uri_ string); | int raptor_serializers_enumerate(const unsigned int counter, const char **n ame, const char **label, const char **mime_type, const unsigned char **uri_ string); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_serializer_syntax_name_check(const char *name); | int raptor_serializer_syntax_name_check(const char *name); | |||
/* Serializing */ | /* Serializing */ | |||
RAPTOR_API | RAPTOR_API | |||
raptor_serializer* raptor_new_serializer(const char *name); | raptor_serializer* raptor_new_serializer(const char *name); | |||
RAPTOR_API | RAPTOR_API | |||
skipping to change at line 873 | skipping to change at line 897 | |||
/* Utility functions */ | /* Utility functions */ | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_print_ntriples_string(FILE *stream, const unsigned char *string, const char delim); | int raptor_print_ntriples_string(FILE *stream, const unsigned char *string, const char delim); | |||
RAPTOR_API RAPTOR_DEPRECATED | RAPTOR_API RAPTOR_DEPRECATED | |||
unsigned char* raptor_ntriples_string_as_utf8_string(raptor_parser* rdf_par ser, const unsigned char *src, int len, size_t *dest_lenp); | unsigned char* raptor_ntriples_string_as_utf8_string(raptor_parser* rdf_par ser, const unsigned char *src, int len, size_t *dest_lenp); | |||
RAPTOR_API RAPTOR_DEPRECATED | RAPTOR_API RAPTOR_DEPRECATED | |||
const char* raptor_ntriples_term_as_string(raptor_ntriples_term_type term); | const char* raptor_ntriples_term_as_string(raptor_ntriples_term_type term); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_string_ntriples(raptor_iostream *iostr, const uns igned char *string, size_t len, const char delim); | int raptor_iostream_write_string_ntriples(raptor_iostream *iostr, const uns igned char *string, size_t len, const char delim); | |||
RAPTOR_API | RAPTOR_API | |||
void raptor_iostream_write_string_turtle(raptor_iostream *iostr, const unsi | ||||
gned char *string, size_t len); | ||||
RAPTOR_API | ||||
void raptor_iostream_write_statement_ntriples(raptor_iostream* iostr, const raptor_statement *statement); | void raptor_iostream_write_statement_ntriples(raptor_iostream* iostr, const raptor_statement *statement); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_xml_any_escape_string(const unsigned char *string, size_t len, u nsigned char *buffer, size_t length, char quote, int xml_version, raptor_si mple_message_handler error_handler, void *error_data); | int raptor_xml_any_escape_string(const unsigned char *string, size_t len, u nsigned char *buffer, size_t length, char quote, int xml_version, raptor_si mple_message_handler error_handler, void *error_data); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_xml_any_escaped_string(raptor_iostream* iostr, co nst unsigned char *string, size_t len, char quote, int xml_version, raptor_ simple_message_handler error_handler, void *error_data); | int raptor_iostream_write_xml_any_escaped_string(raptor_iostream* iostr, co nst unsigned char *string, size_t len, char quote, int xml_version, raptor_ simple_message_handler error_handler, void *error_data); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_xml_escape_string(const unsigned char *string, size_t len, unsig ned char *buffer, size_t length, char quote, raptor_simple_message_handler error_handler, void *error_data); | int raptor_xml_escape_string(const unsigned char *string, size_t len, unsig ned char *buffer, size_t length, char quote, raptor_simple_message_handler error_handler, void *error_data); | |||
RAPTOR_API | RAPTOR_API | |||
int raptor_iostream_write_xml_escaped_string(raptor_iostream* iostr, const unsigned char *string, size_t len, char quote, raptor_simple_message_handle r error_handler, void *error_data); | int raptor_iostream_write_xml_escaped_string(raptor_iostream* iostr, const unsigned char *string, size_t len, char quote, raptor_simple_message_handle r error_handler, void *error_data); | |||
End of changes. 6 change blocks. | ||||
2 lines changed or deleted | 30 lines changed or added | |||